Re: [O] Boxquote for code in UTF-8 export

2014-09-13 Thread Nicolas Goaziou

Samuel Wales writes:

 if boxquote is going to be changed, perhaps another option that would
 be nice for boxquote would be to optionally not print anything to the
 left of the contents?

 On 9/12/14, Sebastien Vauban wrote:
   │ (defun org-ascii--box-string (s info)

Providing only this option is a waste, as it's already very easy to
obtain the feature using a src-block filter.

OTOH, we could provide an option allowing to choose styles to format
source code. Offered styles could include `boxquote' (i.e. the current
one), `plain' (code only), another one looking like

  --[ language ]
  source code

Of course, this is only interesting if we provide at least 3-4 styles to
choose from.


Nicolas Goaziou

Re: [O] Improved way to include some headlines from an external org file

2014-09-13 Thread Xavier Garrido

Hi Andrea,

Le 12/09/2014 02:45, Andrea Rossetti a écrit :

Xavier Garrido writes:

Of course, I can achieve that by using =:lines= and calculating how many
lines embeds the given headline.

   Hi Xavier, another possible approach (maybe less handy, but in
some cases it might fit): the user could keep one .org file
per headline, and #+INCLUDE one headline (= one entire file)
when needed.

This is something I use when dealing with a book or report with 
basically one big file per chapter. Here the problem is slightly 
different : I have 4 org/Beamer presentations that almost 80% of them 
are the same. So instead of maintening this 80% in 4 different places, 
I'd like to write them and change them in one place and then include the 
needed headlines at the right place in each of the 4 presentations.

I know this can't be done with #+INCLUDE maybe with a nice babel 
function or a bit of elisp. So maybe someone already did that. Otherwise 
this may be a nice addition for further release of org ;)


Re: [O] Using color in latex export

2014-09-13 Thread Chaitanya Krishna
Thank you (Nick and Tom). Both the solutions above worked.


On Fri, Sep 12, 2014 at 9:53 PM, Thomas S. Dye wrote:

 Aloha Chai,

 Chaitanya Krishna writes:

  Hello all,
  I would like to have some text in color when I export my org document to
  I tried this:
  #+latex_header: \usepackage{color}
  \textcolor{red}{Text I want in red}

 One way is with a macro, e.g.,

 #+MACRO: red \textcolor{red}{$1}

 This is {{{red(Text I want in red)}}}.

 Which exports to

 This is \textcolor{red}{Text I want in red}.

 Or, more generally,
 #+MACRO: color \textcolor{$1}{$2}

 This is {{{color(green,Text I want in green)}}}.

 Which exports to
 This is \textcolor{green}{Text I want in green}.


 Thomas S. Dye


Re: [O] [RFC] Rewrite radio tables

2014-09-13 Thread Nicolas Goaziou
Correcting myself,

Nicolas Goaziou writes:

 This doesn't match the specs, though. According to the (current)

   :splice  When set to t, return only table body lines, don't wrap
them into :tstart and :tend.  Default is nil.  When :splice
is non-nil, this also means that the exporter should not look
for and interpret header and footer sections.

Actually, I misinterpreted the specs. Here, header and footer do not
refer to table's header and footer, but to generated code around the
table.  IOW, :splice is not expected to remove table's header.

I pushed the rewrite on master with this problem solved.

Re: [O] Marking items done in the past

2014-09-13 Thread Karl Voit
* Noah Slater wrote:

 I have a number of habits set up that I regularly fill in the day
 after the activity was done. Is there a way to mark an item as done
 (in a way that hooks into the habits stuff) but for a day in the past?

How about org-(agenda-)todo-yesterday ?

Re: [O] org-ref no key found

2014-09-13 Thread John Kitchin
No problem. Thanks for the tips to replicate this. It was pretty helpful
in solving the problem (and thanks again to Nick who pointed me towards
edebug-defun a while ago!)

I think I have fixed this. The problem was org-ref was not finding a key
that exists in a file. the way that is done all over org-ref is to
insert the contents of the bibfile in temp buffer, and then use
bibtex-search-entry on that buffer. It works like a charm usually, but
not in the replicated steps you have below. once it works once, though,
it seems to always work. 

Anyway, I think it is fixed now. there is a new version at

Thanks for reporting the bug!

Julian M. Burgos writes:

 Hi John,

 I am resending this... I think it did not went through the previous

 I think I can replicate the org-ref bug now (if it is a bug).  This is
 the situation:

 a) If I open emacs, load a file that already has some link, and click on
 the link (or place the cursor on it and press enter) I get the no key
 found message and I cannot open the notes file (I get a Wrong type
 argument: stringp, nil), although the link to the pdf file works.  If I
 open more than one file, links do not work in any of them.  At this
 point if I check the value of the org-ref-default-bibliography
 variable, I get the correct path and filename of my .bib file.

 b) If I insert a new citation (using Ctrl-]) in any of the documents,
 links work as they should in all documents (this is, I get the title and
 I can open the notes file).

 I should say that I am not using the org-ref-insert-bibliography-link
 function, because I use biblatex and I prefer to insert the Latex
 \printbibliography command.  But if use it and insert the bibliography
 link, the behaviour does not change.

 This is what I have in my .emacs file that is related to RefTex and

 ;; Load RefTex
 (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
 (autoload 'reftex-mode reftex RefTeX Minor Mode t)
 (autoload 'turn-on-reftex  reftex RefTeX Minor Mode nil)
 (autoload 'reftex-citation reftex-cite Make citation nil)
 (autoload 'reftex-index-phrase-mode reftex-index Phrase mode t)
 (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
 (add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode

 ;; Make RefTeX faster
 (setq reftex-enable-partial-scans t)
 (setq reftex-save-parse-info t)
 (setq reftex-use-multiple-selection-buffers t)
 (setq reftex-plug-into-AUCTeX t)

 (setq reftex-default-bibliography 
 (setq reftex-sort-bibtex-matches author)   ; Sort entries found in BibTex 
 (setq bibtex-dialect biblatex)

 (require 'org-ref)

 (setq org-ref-bibliography-notes /home/julian/Documents/org files/
   org-ref-pdf-directory /home/julian/Documents/Refs/)
  (setq org-ref-default-citation-link parencite)

 Below I am sending you very simple .org and .bib files that (in my computer)
 reproduce this behaviour.  In this file I did use
 org-ref-insert-bibliography-link.  Let me know if I can give you any other 

 All the best,


 --Start file 

 * Trial
 Some references


 --End file 

 --Start trial.bib file 

   Title= {Quantitative approaches in climate change 
   Author   = {Brown, C.J. and Schoeman, D.S. and Sydeman, 
 W.J. and Brander, K. and Buckley, L.B. and Burrows, M. and Duarte, C.M. and 
 Moore, P.J. and Pandolfi, J.M. and Poloczanska, E. and others},
   Journaltitle = {Global Change Biology},
   Year = {2011},

   Crossref = {burnhm},
   File = {:Brown2011a.pdf:PDF},
   Publisher= {Wiley Online Library}

   Title= {Alternatives to statistical hypothesis testing 
 in ecology: a guide to self teaching},
   Author   = {Hobbs, N.T. and Hilborn, R.},
   Journaltitle = {Ecological Applications},
   Year = {2006},
   Number   = {1},
   Pages= {5--19},
   Volume   = {16},

   Crossref = {Quick2010},

Re: [O] key-binding for all plotting styles

2014-09-13 Thread Thierry Banel
Le 08/09/2014 18:30, Nicolas Goaziou a écrit :

 It is better than C-c p, but I think a common prefix for plotting table
 would be better. You need to also tell org.texi about this change.

A common prefix for plotting is a good idea. Which common prefix?
C-c #(should be shared with `org-update-statistics-cookies')
C-c :(should be shared with `org-toggle-fixed-width')
C-c (currently unused)
C-c |(currently does weird things within a table)

So for instance we could have the following (extensible) key-bindings:
C-c  a   insert an ascii plot column
C-c  g   insert a #+PLOT: line and run GnuPlot
C-c  r   insert a Babel R plotting block and run it

Any thoughts, People of the List?

 Note that there is no such limitation for statistics cookies:

  - My plan [1/2]
- [X] Step 1
- [ ] Step 2

 It is even technically possible to have one in a table.

Ok then let us forget about C-c #
I will take care of the patch as soon as there is a consensus on what to do.

Have fun

Re: [O] org-mode-hook not called when entering org files

2014-09-13 Thread Rémi Letot
Nick Dokos writes: (Rémi Letot) writes:

 all org seems to work fine, but for some reason org-mode-hook is not
 called when I open an org file...

 That's very unlikely: the hook is run using a general emacs mechanism,
 so if it were broken, a *lot* of things would be broken.

 You can check with

 (setq org-mode-hook nil)
 (add-hook 'org-mode-hook (function (lambda () (message RL - my
 org-mode-hook ran this

emacs -Q, copied your instructions in scratch buffer and C-x C-e them
both, then opened my file, and nothing happened.

Tried in another emacs -Q to set up a basic org-crypt using scratch:

(require 'org-crypt)

C-x C-e on both, then opened a org-mode-hook is as it should,
but before-save-hook is nil.

Now I noticed a message that I have received for some times when I open
an org file:

File mode specification error: (error `recenter'ing a window that does
not display current-buffer.)

I didn't notice it before since it has happened for quite some times and
didn't appear to cause any problem, but could it be the cause of this
problem ?

 perhaps in a minimal .emacs, and then opening a file (assuming
 your auto-mode-alist is set up correctly).

auto-mode-alist does include org-mode for org files.

Any idea ? is the error message that I receive a possible cause ?


[O] Selected export depending on back-end

2014-09-13 Thread Lars Tveito

I am writing a compendium in org, and want to be able to generate slides
from the same org file.

I'd like to be able to mark some sections for exporting if I'm
generating slides, and for other formats (like LaTeX and HTML) export
everything as normal. It would also be nice if I could change the
#+OPTIONS according to what I'm exporting to.

Any ideas?

- Lars