Re: [O] Creating hline in table from source block?

2013-11-26 Thread Loris Bennett
Eric Schulte schulte.e...@gmail.com writes:

 Loris Bennett loris.benn...@fu-berlin.de writes:

 Dear List,

 This

 #+BEGIN_SRC sh
 echo a b c d
 echo 1 2 3 4
 echo 5 6 7 8
 #+END_SRC

 produces this:

 #+RESULTS:
 |   a | b | c | d |
 |   1 | 2 | 3 | 4 |
 |   5 | 6 | 7 | 8 |

 How do I get this

 #+RESULTS:
 |   a | b | c | d |
 |-+---+---+---|
 |   1 | 2 | 3 | 4 |
 |   5 | 6 | 7 | 8 |

 ?


 Most easily done with an Emacs Lisp code block.

 #+BEGIN_SRC emacs-lisp
   '((a b c d)
 hline
 (1 2 3 4)
 (5 6 7 8))
 #+END_SRC

 #+RESULTS:
 | a | b | c | d |
 |---+---+---+---|
 | 1 | 2 | 3 | 4 |
 | 5 | 6 | 7 | 8 |

Oops, my example was obviously a little too simple.  What I am actually doing
is something like this:

#+NAME: current_data
#+BEGIN_SRC sh :dir /home/loris/remote/far/far/away/results
echo step level time clicks
grep statistics *.log | awk '{print 
$(NF-9),\t,$(NF-6),\t,$(NF-4),\t,$(NF-1)}'
#+END_SRC

So Achim's suggestion of using :results raw might be the way to go
(once I've worked out what the sed bit is doing ...)

However, the table will ultimately be around 4 lines long,
so from a performance point of view it would be nice not to have to pipe
the whole thing through sed, particularly as the files are on a remote
server.  Having said that though, it is not a performance-critical
application.

So maybe I'll look at Rasmus' simpler suggestion (my lisp skill are
unfortunately not quite up to the fun variant ...)

How complex would the elisp version of my grep and awk above be?  Just
having one code block would be a little neater from my point of view.

Thanks for all the help.

Cheers,

Loris

-- 
This signature is currently under construction.




[O] Agenda filter on tags

2013-11-26 Thread Fredrik
I'm looking for a way to set a filter for an agenda. I want to use a 
logical filter like : this+todo=THAT|foo+todo=BAR when displaying 
tasks scheduled for today.
Is there any ways to set filters like this for a custom agenda? Or is it 
anyway to add filters like this when viewing an agenda?


Regards,

Fredrik



Re: [O] Creating hline in table from source block?

2013-11-26 Thread Rasmus
Loris Bennett loris.benn...@fu-berlin.de writes:

 So Achim's suggestion of using :results raw might be the way to go
 (once I've worked out what the sed bit is doing ...)

 However, the table will ultimately be around 4 lines long,
 so from a performance point of view it would be nice not to have to pipe
 the whole thing through sed, particularly as the files are on a remote
 server.  Having said that though, it is not a performance-critical
 application.

 So maybe I'll look at Rasmus' simpler suggestion (my lisp skill are
 unfortunately not quite up to the fun variant ...)

The fun variant works with any table.  You just specify a list of
positions where you want hlines, e.g. '(0 1 last) or '(0 1 -1).

 How complex would the elisp version of my grep and awk above be?  Just
 having one code block would be a little neater from my point of view.

If you use :post you can keep your utility functions in a :noexport:
section at the bottom of your file (or even in a library-of-babel (see
org-babel-lob-ingest)) and you don't litter your code with unnecessary
stuff.  It's also usable across blocks.  

–Rasmus
 
-- 
When the facts change, I change my mind. What do you do, sir?




Re: [O] M-up-arrow no longer moves text up

2013-11-26 Thread Carsten Dominik

On Nov 25, 2013, at 2:03 PM, Susan Cragin susancra...@earthlink.net wrote:

 I have confirmed that the problem is with the emacs build. Emacs24 works with 
 today's org-mode.

Thank you for following up.

- Carsten

 
 --Susan message--
 I compile both emacs and org-mode daily. 
 Today M-up and M-down have stopped working as a mode of moving a line of 
 plain text up and down. 
 The problem may be with emacs rather than with org-mode. I'm having other 
 trouble such as that the ribbon on top (File / Edit / Options / Buffers / 
 Tools / Help) doesn't work either. 
 
 
 
 




Re: [O] Near real-time preview of PDF/ODT export?

2013-11-26 Thread Alan Schmitt
kjambunat...@gmail.com writes:

 Alan Schmitt alan.schm...@polytechnique.org writes:

 where can I find documentation about creating a package?

 (info (elisp) Packaging)

Double thanks: for the links, and for making me notice that my info was
showing me some things from an old emacs.

Alan



Re: [O] [RFC] Alternative to sub/superscript regexp

2013-11-26 Thread Carsten Dominik
Hi Nicolas,

I have tested this a bit, and it does pretty much what I want.
Just to be sure:  We will also support expressions with braces, right?

- Carsten

On Nov 25, 2013, at 6:14 PM, Nicolas Goaziou n.goaz...@gmail.com wrote:

 Hello,
 
 For the record `org-match-substring-regexp' is a variation on:
 
 \\(\\S-\\)\\([_^]\\)\\(\\(?:\\*\\|[-+]?[^-+*!@#$%^_ 
 \t\r\n,:\?~;./{}=()]+\\)\\)\\)
 
 I think it is a bit convoluted and therefore difficult to predict. For
 example, as recent bug report showed, you may tend to interpret
 a_b[fn:1] as
 
   a_{b}[fn:1]
 
 but, in fact, it is equivalent to
 
   a_{b[fn}:1]
 
 Of course, we can prevent this by forbidding [ and ] in the last
 part of the regexp. But I wonder if there's something better to do.
 
 The idea behind this regexp is that we should be able to write simple
 sub/superscript, including numbers and entities, without requiring curly
 braces (see `org-use-sub-superscripts' docstring for details). Maybe
 something like the following could be an interesting alternative:
 
  
 \\(\\S-\\)\\([_^]\\)\\(\\*\\|[+-]?\\(?:\\w\\|[0-9.,\\]\\)*\\(\\w\\|[0-9]\\)\\)
 
 That is, without braces, either an asterisk or any combination of word,
 number, dot, comma and backslash characters, which may start with either
 a plus or a minus sign but cannot end with either a dot or a comma.
 
 I find it arguably more predictable (no inverted class). Also, we gain
 the following:
 
  a^3.14. = a^{3.14}.
 
 At the moment, a^3.14. = a^{3}.14.
 
 What do you think?
 
 
 Regards,
 
 -- 
 Nicolas Goaziou
 




Re: [O] Agenda filter on tags

2013-11-26 Thread Bastien
Hi Fredrik,

Fredrik fred...@jumans.net writes:

 I'm looking for a way to set a filter for an agenda. I want to use a
 logical filter like : this+todo=THAT|foo+todo=BAR when displaying
 tasks scheduled for today.

You can't.

 Is there any ways to set filters like this for a custom agenda? Or is
 it anyway to add filters like this when viewing an agenda?

No.

You can set tag filters and regexp filters independently with

  org-agenda-tag-filter-preset
  org-agenda-regexp-filter-preset

But you cannot have TODO keywords filters and combine filters
logically into one single filter.

My suggestion would be to define a new agenda custom command:
filters are mainly meant for interactive use rather than for
predefined agenda views.

-- 
 Bastien



[O] Orgtbl, Radiotables: :booktabs t

2013-11-26 Thread AW

\documentclass[parskip=half]{scrartcl}
\usepackage{booktabs, verbatim}

\begin{document}

Hello!

Once in a while I need a radiotable inside my LaTeX file and I'm asking to 
implement a parameter for the use of booktabs.

This is an example I picked from the manual of orgmode and added
\verb|\toprule|, \verb|\bottomrule|, :booktabs t and some other details.

This is the tabular in \LaTeX:

 \begin{tabular}{lrrr}\toprule
 Month  \multicolumn{1}{c}{Days}  Nr.\ sold  per day\\\midrule
 % BEGIN RECEIVE ORGTBL salesfigures
Jan  23  55  2.4 \\
Feb  21  16  0.8 \\
March  22  278  12.6 \\
\hline
S:  66 \\
 % END RECEIVE ORGTBL salesfigures
\bottomrule
 \end{tabular}

And here comes the source:
 
\begin{verbatim}
 #+ORGTBL: SEND salesfigures orgtbl-to-latex :splice t :skip 2 :booktabs t
 | Month | Days | Nr sold | per day |
 |---+--+-+-|
 | Jan   |   23 |  55 | 2.4 |
 | Feb   |   21 |  16 | 0.8 |
 | March |   22 | 278 |12.6 |
 |---+--+-+-|
 | S:|   66 | | |
 #+TBLFM: $4=$3/$2;%.1f::@5$2=vsum(@I..II)
 
\end{verbatim}

The parameter :booktabs t would be new. 

To what end? You see, my table uses the booktabs package and I can, as
displayed above, use \verb|\toprule| and \verb|\bottomrule| in the spliced
tabular. But inside the tabular, all horizontal lines become
hline(s), which is, well, not ugly, but disturbing. Instead of each
hline a midrule is needed.

You can take this email and compile it with pdflatex. You'll see, that
some space is missing between the ``S:'' and the hline.

So would it be possible to implement the parameter :booktabs t
without much trouble?

Kind regards,

Alexander

\end{document}




Re: [O] problems while editing in org-columns mode

2013-11-26 Thread Carsten Dominik
Hi Andrea,

I have fixed problem A.  Problem B has to do with the fact that the property 
search function does not find a property with an empty value.  I need to look 
into this some more.

- Carsten
On Nov 22, 2013, at 8:30 PM, andrea.rosse...@gmail.com wrote:

 
 Hello everyone,
 
  I get some unexpected behaviour in org-column mode on my
 workstation (Emacs 24.3, org-version 8.2.2, Win 7 64 bit).
 May I ask support in order to understand:
 
 - if this is reproducible for you as well
 - if it is actually a bug, or a mess on my local installation,
  or if I misunderstood how to use org-column properly
 
  Thanks in advance to anyone patient enough to read this
 and give it a try. Kindest regards, Andrea.
 
 
 
 
 HOW TO REPRODUCE PROBLEM A:
 
 1) create an example Org file like this:
 
 * myproject
 ** mytask1
 ** mytask2
 
 2) click on the word myproject, C-c C-x C-c to enable
 column view
 
 3) M-S-right, then answer the wizard questions:
 property=cost, title=cost, width=8, summary=add_numbers
 
 4) now click on the word myproject, type q to leave
 org-columns mode
 
 5) you will see that in the first row of the buffer
 a new line appears:
 
 #+COLUMNS: %25ITEM %8cost %TODO %3PRIORITY %TAGS
 
  I expected %8cost{+} instead of %8cost. Even
 if f I change manually %8cost to %8cost{+} the
 automatic sums (cost of myproject sums cost of
 mytask1+mytask2) still don't work.
 
  The sums work properly if I remove the entire
 #+COLUMNS statement and add to the :PROPERTIES: of
 row myproject the following property:
 
 :COLUMNS: %25ITEM %8cost{+} %TODO %3PRIORITY %TAGS
 
 
 
 HOW TO REPRODUCE PROBLEM B:
 
 1, 2, 3) same steps than problem A
 
 4) go on row mytask1 column cost, type e to edit
 the value, set it to 1234, type RET
 
 5) type e and change the proposed value 1234 into
 the empty string, then type RET 
 
 6) type e and set the value to 3456, then type RET
 
 7) go on row mytask1, type TAB to see the properties:
 you will see that the properties are now:
 
   :PROPERTIES:
   :cost: 
   :cost: 3456
   :END:
 
 (I did not expect that empty :cost: column)
 




[O] Problem with property matching

2013-11-26 Thread Carsten Dominik
Hi,

I think there is an error in the property matching regexp.  It will not match a 
line where the property value is empty.  I propose the following change, which 
makes the value part optional:


diff --git a/lisp/org.el b/lisp/org.el
index 7a4d244..4641ce5 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6205,7 +6205,7 @@ Use `org-reduced-level' to remove the effect of 
`org-odd-levels'.
 Match group 3 will be set to the value if it exists.
   (concat ^\\(?4:[ \t]*\\)\\(?1::\\(?2:
  (if literal property (regexp-quote property))
- \\):\\)[ \t]+\\(?3:[^ \t\r\n].*?\\)\\(?5:[ \t]*\\)$))
+ \\):\\)\\([ \t]+\\(?3:[^ \t\r\n].*?\\)\\)?\\(?5:[ \t]*\\)$))
 
 (defconst org-property-re
   (org-re-property .*? 'literal)


Can anyone think of problems this would cause?  Nicolas, does the syntax 
definition require a non-empty value?

- Carsten


Re: [O] Creating hline in table from source block?

2013-11-26 Thread Eric Schulte
Loris Bennett loris.benn...@fu-berlin.de writes:

 Eric Schulte schulte.e...@gmail.com writes:

 Loris Bennett loris.benn...@fu-berlin.de writes:

 Dear List,

 This

 #+BEGIN_SRC sh
 echo a b c d
 echo 1 2 3 4
 echo 5 6 7 8
 #+END_SRC

 produces this:

 #+RESULTS:
 |   a | b | c | d |
 |   1 | 2 | 3 | 4 |
 |   5 | 6 | 7 | 8 |

 How do I get this

 #+RESULTS:
 |   a | b | c | d |
 |-+---+---+---|
 |   1 | 2 | 3 | 4 |
 |   5 | 6 | 7 | 8 |

 ?


 Most easily done with an Emacs Lisp code block.

 #+BEGIN_SRC emacs-lisp
   '((a b c d)
 hline
 (1 2 3 4)
 (5 6 7 8))
 #+END_SRC

 #+RESULTS:
 | a | b | c | d |
 |---+---+---+---|
 | 1 | 2 | 3 | 4 |
 | 5 | 6 | 7 | 8 |

 Oops, my example was obviously a little too simple.  What I am actually doing
 is something like this:

 #+NAME: current_data
 #+BEGIN_SRC sh :dir /home/loris/remote/far/far/away/results
 echo step level time clicks
 grep statistics *.log | awk '{print 
 $(NF-9),\t,$(NF-6),\t,$(NF-4),\t,$(NF-1)}'
 #+END_SRC


How about

#+NAME: current_data
#+BEGIN_SRC sh :dir /home/loris/remote/far/far/away/results :colnames '(step 
level time clicks)
grep statistics *.log | awk '{print 
$(NF-9),\t,$(NF-6),\t,$(NF-4),\t,$(NF-1)}'
#+END_SRC

or do the column names need to be generated by the code block?


 So Achim's suggestion of using :results raw might be the way to go
 (once I've worked out what the sed bit is doing ...)

 However, the table will ultimately be around 4 lines long,
 so from a performance point of view it would be nice not to have to pipe
 the whole thing through sed, particularly as the files are on a remote
 server.  Having said that though, it is not a performance-critical
 application.

 So maybe I'll look at Rasmus' simpler suggestion (my lisp skill are
 unfortunately not quite up to the fun variant ...)

 How complex would the elisp version of my grep and awk above be?  Just
 having one code block would be a little neater from my point of view.

 Thanks for all the help.

 Cheers,

 Loris

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] ox-bibtex.el -- how to join sequential citations

2013-11-26 Thread Eric Schulte
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Feng Shu tuma...@gmail.com writes:

 Eric Schulte schulte.e...@gmail.com writes:

 When exporting multiple sequential citations e.g., cite:foo cite:bar
 etc... I would like to see something like the following (latex used for
 this example) \cite{foo, bar}, but instead I'm getting \cite{foo}
 \cite{bar}, which leads to poorly formed PDFs (a similar thing happens
 for HTML export).

 May be you should use \cite{foo, bar} directly in org file.

 That was, indeed, the original way to handle citations in the former
 org-export-bibtex.el. It is still supported in both LaTeX, obviously,
 and HTML (which will split the above among two anchors).

 cite link support was added later, and is lacking in this area.

 My question is how best to fix this, should I write a filter function,
 or does the export engine already have processes in place to handle
 these sorts of export context issues?

 At the user level, a filter is definitely the way to go.


Thanks, the following seems to be working.  Perhaps the filter function
should be added to ox-bibtex.el?

(defun org-bibtex-group-citations (text backend info)
  Convert begin/end{verbatim} to begin/end{Verbatim}.
  Allows use of the fancyvrb latex package.
  (with-temp-buffer
(insert text) (goto-char (point-min))
(cond
 ((org-export-derived-backend-p backend 'latex)
  (while (re-search-forward
  cite{\\([^[:space:]\n\r]+\\)}[[:space:]\n\r]*cite{
  nil t)
(replace-match cite{\\1,)
(goto-char (point-min
 ((org-export-derived-backend-p backend 'html)
  (while (re-search-forward
  \\(#[[:alnum:]]+\[0-9]+\/a\\)\\][[:space:]\n\r]*\\[\\(a 
href=\#[[:alnum:]]+\[0-9]+\/a\\)
  nil t)
(replace-match \\1,\\2)
(goto-char (point-min)
(buffer-string)))

(add-to-list 'org-export-filter-final-output-functions
 'org-bibtex-group-citations)

Cheers,


 Though, it is an interesting feature to implement in ox-bibtex.el. One
 idea would be to write another parse-tree filter function which would
 change cite links into \cite{...} commands and consecutive cite links
 into \cite{..., ...} commands.

 This would also allow us to get rid of both `org-html-link' and
 `org-latex-link' advices, as no more cite link would be left in the
 parse tree anyway.

 What do you think?


 Regards,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



[O] Controlling image width and placement in Beamer export

2013-11-26 Thread Jarmo Hurri

Greetings.

I needed to create an Asymptote-generated centered image with a smaller
width than the default .9\linewidth in a Beamer export. After trial and
error I ended with the method shown below. In particular, to my surprise
an

#+ATTR_LATEX: :width 5cm

_above_ the #+BEGIN_SRC did not work, so I had to place the line above
#+RESULTS:

Is the following the best way to do this, or is there a more concise
method?

# ---
#+BEGIN_SRC asymptote :file triangle.pdf
  size (8cm, 0);
  pair A = (0, 0), B = (4, 1), C = (3, 2);
  draw (A -- B -- C -- cycle);
#+END_SRC

#+LATEX: \begin{center}
#+ATTR_LATEX: :width 5cm
#+RESULTS:
[[file:triangle.pdf]]
#+LATEX: \end{center}
# ---

All the best,

Jarmo




Re: [O] Creating hline in table from source block?

2013-11-26 Thread Loris Bennett
Eric Schulte schulte.e...@gmail.com writes:

 Loris Bennett loris.benn...@fu-berlin.de writes:

 Eric Schulte schulte.e...@gmail.com writes:

 Loris Bennett loris.benn...@fu-berlin.de writes:

 Dear List,

 This

 #+BEGIN_SRC sh
 echo a b c d
 echo 1 2 3 4
 echo 5 6 7 8
 #+END_SRC

 produces this:

 #+RESULTS:
 |   a | b | c | d |
 |   1 | 2 | 3 | 4 |
 |   5 | 6 | 7 | 8 |

 How do I get this

 #+RESULTS:
 |   a | b | c | d |
 |-+---+---+---|
 |   1 | 2 | 3 | 4 |
 |   5 | 6 | 7 | 8 |

 ?


 Most easily done with an Emacs Lisp code block.

 #+BEGIN_SRC emacs-lisp
   '((a b c d)
 hline
 (1 2 3 4)
 (5 6 7 8))
 #+END_SRC

 #+RESULTS:
 | a | b | c | d |
 |---+---+---+---|
 | 1 | 2 | 3 | 4 |
 | 5 | 6 | 7 | 8 |

 Oops, my example was obviously a little too simple.  What I am actually doing
 is something like this:

 #+NAME: current_data
 #+BEGIN_SRC sh :dir /home/loris/remote/far/far/away/results
 echo step level time clicks
 grep statistics *.log | awk '{print 
 $(NF-9),\t,$(NF-6),\t,$(NF-4),\t,$(NF-1)}'
 #+END_SRC


 How about

 #+NAME: current_data
 #+BEGIN_SRC sh :dir /home/loris/remote/far/far/away/results :colnames '(step 
 level time clicks)
 grep statistics *.log | awk '{print 
 $(NF-9),\t,$(NF-6),\t,$(NF-4),\t,$(NF-1)}'
 #+END_SRC

 or do the column names need to be generated by the code block?

No, the column names are fixed, so that's perfect, thank you.  I
suspected there might be some more straight-forward way than the
interesting, but slightly more involved methods suggested by Achim and
Rasmus.

However, it is good have some examples for :results raw and :post
and I shall certainly be looking into Library of Babel, as I seem to
be sliding gradually into programming in Org.

Cheers,

Loris

 So Achim's suggestion of using :results raw might be the way to go
 (once I've worked out what the sed bit is doing ...)

 However, the table will ultimately be around 4 lines long,
 so from a performance point of view it would be nice not to have to pipe
 the whole thing through sed, particularly as the files are on a remote
 server.  Having said that though, it is not a performance-critical
 application.

 So maybe I'll look at Rasmus' simpler suggestion (my lisp skill are
 unfortunately not quite up to the fun variant ...)

 How complex would the elisp version of my grep and awk above be?  Just
 having one code block would be a little neater from my point of view.

 Thanks for all the help.

 Cheers,

 Loris

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de




[O] Captions on Code Blocks -- work for ox-ascii but not ox-html or ox-latex

2013-11-26 Thread Eric Schulte
Hi,

I see that Captions on code blocks work as expected for ASCII export,
but not for HTML or LaTeX export.  Is this intentional?  If not could
captions be easily added to HTML and LaTeX export?

Thanks,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] Captions on Code Blocks -- work for ox-ascii but not ox-html or ox-latex

2013-11-26 Thread Rüdiger Sonderfeld
On Tuesday 26 November 2013 07:23:33 Eric Schulte wrote:
 I see that Captions on code blocks work as expected for ASCII export,
 but not for HTML or LaTeX export.  Is this intentional?  If not could
 captions be easily added to HTML and LaTeX export?

What do you expect differently?  For me the captions are exported in both HTML 
and LaTeX (also checked for lstlisting and minted) as well.

Regards,
Rüdiger




Re: [O] Controlling image width and placement in Beamer export

2013-11-26 Thread John Hendy
On Tue, Nov 26, 2013 at 7:51 AM, Jarmo Hurri jarmo.hu...@syk.fi wrote:

 Greetings.

 I needed to create an Asymptote-generated centered image with a smaller
 width than the default .9\linewidth in a Beamer export. After trial and
 error I ended with the method shown below. In particular, to my surprise
 an

 #+ATTR_LATEX: :width 5cm

 _above_ the #+BEGIN_SRC did not work, so I had to place the line above
 #+RESULTS:

 Is the following the best way to do this, or is there a more concise
 method?

 # ---
 #+BEGIN_SRC asymptote :file triangle.pdf
   size (8cm, 0);
   pair A = (0, 0), B = (4, 1), C = (3, 2);
   draw (A -- B -- C -- cycle);
 #+END_SRC

 #+LATEX: \begin{center}
 #+ATTR_LATEX: :width 5cm
 #+RESULTS:
 [[file:triangle.pdf]]
 #+LATEX: \end{center}
 # ---

This comes up all the time. See this thread:
- http://lists.gnu.org/archive/html/emacs-orgmode/2012-07/msg00323.html

The key is to put it 1) before results (as you've done) and 2) to use
a named source block (with #+name: foo above your babel code) so that
Org knows what the results block actually is. Otherwise, as you
currently have it, if you re-run the babel block, you'll keep the
results section you already have and it will spit out another one
below it since it no longer recognizes that the babel block and
current, modified results block go together.


Good luck,
John


 All the best,

 Jarmo





Re: [O] Controlling image width and placement in Beamer export

2013-11-26 Thread John Hendy
On Tue, Nov 26, 2013 at 7:51 AM, Jarmo Hurri jarmo.hu...@syk.fi wrote:

 Greetings.

 I needed to create an Asymptote-generated centered image with a smaller
 width than the default .9\linewidth in a Beamer export. After trial and
 error I ended with the method shown below. In particular, to my surprise
 an

 #+ATTR_LATEX: :width 5cm

 _above_ the #+BEGIN_SRC did not work, so I had to place the line above
 #+RESULTS:

 Is the following the best way to do this, or is there a more concise
 method?

 # ---
 #+BEGIN_SRC asymptote :file triangle.pdf
   size (8cm, 0);
   pair A = (0, 0), B = (4, 1), C = (3, 2);
   draw (A -- B -- C -- cycle);
 #+END_SRC

 #+LATEX: \begin{center}
 #+ATTR_LATEX: :width 5cm
 #+RESULTS:
 [[file:triangle.pdf]]
 #+LATEX: \end{center}
 # ---


Oh, and not that it matters, but I typically do:

#+begin_center
#+ATTR_LATEX: :width 5cm
#+RESULTS:
[[file:triangle.pdf]]
#+end_center

Theoretically, more flexible for different types of exports. Even if
you're only doing LaTeX, it's still less characters to type :)


John

 All the best,

 Jarmo





Re: [O] Controlling image width and placement in Beamer export

2013-11-26 Thread Nick Dokos
Jarmo Hurri jarmo.hu...@syk.fi writes:

 Greetings.

 I needed to create an Asymptote-generated centered image with a smaller
 width than the default .9\linewidth in a Beamer export. After trial and
 error I ended with the method shown below. In particular, to my surprise
 an

 #+ATTR_LATEX: :width 5cm

 _above_ the #+BEGIN_SRC did not work, so I had to place the line above
 #+RESULTS:

 Is the following the best way to do this, or is there a more concise
 method?

 # ---
 #+BEGIN_SRC asymptote :file triangle.pdf
   size (8cm, 0);
   pair A = (0, 0), B = (4, 1), C = (3, 2);
   draw (A -- B -- C -- cycle);
 #+END_SRC
 #+LATEX: \begin{center}
 #+ATTR_LATEX: :width 5cm
 #+RESULTS:
 [[file:triangle.pdf]]
 #+LATEX: \end{center}
 # ---


My recommendation is to always name code blocks: then the corresponding results
blocks are named as well, tying the two together; subsequent evaluations
will just refresh the appropriate results block without introducincg new
results blocks. This is not as much of a problem as it used to be, but
naming code blocks is still a good guideline, imo.

Other than that, I think that's the best that you can do.

Nick





[O] Use org-element to figure out if I am in a drawer.

2013-11-26 Thread Carsten Dominik
Hmmm,

what is the magic incantation to use org-element to figure out if point is 
currently inside a drawer?

Thanks

- Carsten


Re: [O] Use org-element to figure out if I am in a drawer.

2013-11-26 Thread Nick Dokos
Carsten Dominik carsten.domi...@gmail.com writes:


 what is the magic incantation to use org-element to figure out if
 point is currently inside a drawer?


(eq 'drawer (org-element-type (org-element-at-point)))

is my (untested) guess, but I don't think you can be at an arbitrary
place inside: you'll need to be on the :DRAWER: line or on the :END:
line, otherwise you'll get the type of the drawer contents.

Nick




Re: [O] Use org-element to figure out if I am in a drawer.

2013-11-26 Thread Rasmus
Carsten Dominik carsten.domi...@gmail.com writes:

 Hmmm,

 what is the magic incantation to use org-element to figure out if
 point is currently inside a drawer?

What about org-element-at-point?

E.g. like here:

* This is a headline
  Still outside the drawer
   :DRAWERNAME:
   This is inside the drawer.
   :END:
   After the drawer.
   

   =org-element-at-point= within the drawer:
(paragraph
 (:begin 65 :end 95 :contents-begin 65 :contents-end 95 :post-blank 0 
:post-affiliated 65 :parent
 (drawer
 (:begin 49 :end 104 :drawer-name DRAWERNAME :contents-begin 65 
:contents-end 95 :post-blank 0 :post-affiliated 49 :parent nil


-- 
Together we'll stand, divided we'll fall




Re: [O] Use org-element to figure out if I am in a drawer.

2013-11-26 Thread Nicolas Goaziou
Hello,

Carsten Dominik carsten.domi...@gmail.com writes:

 Hmmm,

 what is the magic incantation to use org-element to figure out if
 point is currently inside a drawer?

Something like:

  (let ((element (org-element-at-point)))
(while (and element
(not (memq (org-element-type element) '(drawer 
property-drawer
  (setq element (org-element-property :parent element)))
element)

which should return containing drawer or nil.


Regards,

-- 
Nicolas Goaziou



Re: [O] Creating hline in table from source block?

2013-11-26 Thread Daniel E. Doherty

And if you are generating this programatically, this works:

#+BEGIN_SRC sh :results raw
(
echo |a |b |c |d
echo |-
echo |1 |2 |3 |4
echo |5 |6 |7 |8
)
#+END_SRC


-- 

Daniel E. Doherty



Re: [O] [RFC] Alternative to sub/superscript regexp

2013-11-26 Thread Nicolas Goaziou
Hello,

Carsten Dominik carsten.domi...@gmail.com writes:

 I have tested this a bit, and it does pretty much what I want.

Great.

 Just to be sure:  We will also support expressions with braces, right?

Of course, we will. Curly braces are not ambiguous so I'm no suggesting
to change this part of the syntax (even though it would be best to parse
them with an appropriate syntax table rather than a regexp).

OTOH, while we're at it, I wonder if we should keep grouping with
parenthesis. I guess that if you want to use parenthesis, you're going
to need math mode anyway, so there's no real need to make it easy to
type, e.g. :

  x^(2-i)

which will become x$^\text{(2-i)}$ anyway.

What do you think?


Regards,

-- 
Nicolas Goaziou



Re: [O] Problem with property matching

2013-11-26 Thread Nicolas Goaziou
Hello,

Carsten Dominik carsten.domi...@gmail.com writes:

 I think there is an error in the property matching regexp.  It will not match 
 a line where the property value is empty.  I propose the following change, 
 which makes the value part optional:

 
 diff --git a/lisp/org.el b/lisp/org.el
 index 7a4d244..4641ce5 100644
 --- a/lisp/org.el
 +++ b/lisp/org.el
 @@ -6205,7 +6205,7 @@ Use `org-reduced-level' to remove the effect of 
 `org-odd-levels'.
  Match group 3 will be set to the value if it exists.
(concat ^\\(?4:[ \t]*\\)\\(?1::\\(?2:
 (if literal property (regexp-quote property))
 -   \\):\\)[ \t]+\\(?3:[^ \t\r\n].*?\\)\\(?5:[ \t]*\\)$))
 +   \\):\\)\\([ \t]+\\(?3:[^ \t\r\n].*?\\)\\)?\\(?5:[ \t]*\\)$))

Why \\(?3:[^ \t\r\n].*?\\) instead of \\(?3:.*?\\) ?

  (defconst org-property-re
(org-re-property .*? 'literal)
 

 Can anyone think of problems this would cause? Nicolas, does the
 syntax definition require a non-empty value?

Not really. It just means that we cannot have a property named END.


Regards,

-- 
Nicolas Goaziou



Re: [O] ox-bibtex.el -- how to join sequential citations

2013-11-26 Thread Nicolas Goaziou
Hello,

Eric Schulte schulte.e...@gmail.com writes:

 Thanks, the following seems to be working.  Perhaps the filter function
 should be added to ox-bibtex.el?

Thanks for sharing your filter.

Though, if we include it in ox-bibtex (and I agree we should), it would
be better to make it more robust and use a parse tree filter instead.
Then we will be able to operate on objects instead of strings and
regexps.

I will have a look at it, but I'm not sure it will happen before the end
of the week.


Regards,

-- 
Nicolas Goaziou



Re: [O] Captions on Code Blocks -- work for ox-ascii but not ox-html or ox-latex

2013-11-26 Thread Eric Schulte
Rüdiger Sonderfeld ruedi...@c-plusplus.de writes:

 On Tuesday 26 November 2013 07:23:33 Eric Schulte wrote:
 I see that Captions on code blocks work as expected for ASCII export,
 but not for HTML or LaTeX export.  Is this intentional?  If not could
 captions be easily added to HTML and LaTeX export?

 What do you expect differently?  For me the captions are exported in both 
 HTML 
 and LaTeX (also checked for lstlisting and minted) as well.

 Regards,
 Rüdiger


Oh, you're correct, sorry for the noise.  I was missing the captions due
to the way the org-src-name class is styled in HTML, but that is easily
fixed.

Thanks,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] Opening an Org file slowed down

2013-11-26 Thread Nicolas Goaziou
 Please note that the parsing process is inherently linear, since we're
 in a context-dependent grammar. Thus, there's not much to do about the
 parsing algorithm.

 However, the cache is always up-to-date. So, we are not bound to start
 again from headline if we can find a cached element between it and the
 point. The closer, the better.

 I think there's room for improvement in this area. An idea could be to
 start `org-element-at-point' with an opportunistic search. Before going
 back to the headline, we could, indeed, `search-backward' on
 `org-element-paragraph-start' a couple of times and check if location
 found is already cached. This would work well when parsing successively
 elements in the same section or when editing the current paragraph.

I implemented it.

`org-element-at-point' runs in a mean constant time now (worst case is
still linear, though).

-- 
Nicolas Goaziou



[O] derived exporter EXPORT_... options

2013-11-26 Thread Robert Klein
Hi,

I'm trying to user EXPORT_... options in subtree export in a derived
exporter.

Using attached ox-hans exporter and the org file hans.org,
I only get Wurst as :hans-option, never Bratwurst, as given under
the heading Two, using both options with subtree export (C-c C-e C-d j
h  and C-c C-e C-d j H.

Do I misunderstand subtree export?

Thanks for any help.

Best regards
Robert



-- 
Robert Klein
UNIX Operations, Max Planck-Institut für Polymerforschung
Ackermannweg 10
55218 Mainz


hans.org
Description: Lotus Organizer
;; hans example derived exporter
(require 'ox-html)

(org-export-define-derived-backend
 'hans 'html
 :menu-entry
 '(?j Export w/ HTML-derived hans exporter
  ((?h To temporary buffer (wurst) org-hans-export-as-wurst)
   (?H To temporary buffer (bratwurst) org-hans-export-as-bratwurst)))
 :options-alist
 '((:hans-option HANS_OPTION nil nil t)))


(defun org-hans-export-as-wurst (optional a subtreep v b ext-plist)
  (interactive)
  (let* ((doc-env (org-export-get-environment 'hans subtreep ext-plist)))
(message HANS-OPTION: %s
 (org-element-interpret-data
  (plist-get doc-env :hans-option)))
(message EXPORT-HANS-OPTION: %s
 (org-element-interpret-data
  (plist-get doc-env :export-hans-option)


(defun org-hans-export-as-bratwurst (optional a subtreep v b ext-plist)
  (interactive)
  (save-excursion
(save-restriction
  (when subtreep
(org-narrow-to-subtree)
(goto-char (point-min))
(forward-line)
(narrow-to-region (point) (point-max)))
(let* ((doc-env (org-export-get-environment 'hans subtreep ext-plist)))
  (message HANS-OPTION: %s
   (org-element-interpret-data
(plist-get doc-env :hans-option)))
  (message EXPORT-HANS-OPTION: %s
   (org-element-interpret-data
(plist-get doc-env :export-hans-option)))



(provide 'ox-hans)


[O] Bug: Symbol's function definition is void: vc-git-root

2013-11-26 Thread Jonathan Leech-Pepin
Hello,

Using 8.2.2 I get the following error when using any org-attach-* commands:

(From *Messages* buffer)

Select command: [acmlzoOfFdD]
org-attach-commit: Symbol's function definition is void: vc-git-root


I don't have git installed on this Windows machine, so vc-git is never loaded.

Regards,
Jon



Re: [O] commit 5ea0228 has problem opening big org-mode file

2013-11-26 Thread Achim Gratz
York Zhao writes:
 (add-to-list 'load-path path/to/org-mode)

This line is not needed.

 (add-to-list 'load-path path/to/org-mode/lisp)  ; this line is the
 key

Key for what?  Did you create autoload files for this installation?

 Third, file yhj-mode.el has to be byte-compiled.

You'll have to byte-compile it while the load-path is already set to
include your Org installation, otherwise it will pick up the Org shipped
with Emacs.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




[O] hide leading starts in a specific sub-tree in an org file

2013-11-26 Thread Xebar Saram
Hi all

i know there is an option to hiding leading stars in outline headings, and
for indenting outlines. i was wondering if there is an option to do so for
a specific header and sub headers (like can be done for some properties
etc..
in example have these 2 structures in 1 org file

* header 1
* header 2
* header 3

* header 1
** header 1
*** header 1

thx!

Z


Re: [O] derived exporter EXPORT_... options

2013-11-26 Thread Nicolas Goaziou
Hello,

Robert Klein klein...@mpip-mainz.mpg.de writes:

 I'm trying to user EXPORT_... options in subtree export in a derived
 exporter.

 Using attached ox-hans exporter and the org file hans.org,
 I only get Wurst as :hans-option, never Bratwurst, as given under
 the heading Two, using both options with subtree export (C-c C-e C-d j
 h  and C-c C-e C-d j H.

 Do I misunderstand subtree export?

Keyword are global. Subtree export options are expected to be properties
attached to the root headline:

  * Two
:PROPERTIES:
:EXPORT_HANS_OPTION: Bratwurst
:END:

Also, the property name will still be :hans-option (i.e. no export-
appended). During a subtree export the property has precedence over the
keyword.


Regards,

-- 
Nicolas Goaziou



Re: [O] Opening an Org file slowed down

2013-11-26 Thread Michael Brand
Hi Nicolas

On Tue, Nov 26, 2013 at 6:28 PM, Nicolas Goaziou n.goaz...@gmail.com wrote:
 I implemented it.

 `org-element-at-point' runs in a mean constant time now (worst case is
 still linear, though).

Thank you. As I wrote in the other post my recipe is not a real use
case any more for me so it doesn't really matter that opening the Org
file is still slow. My understanding why seems to be limited. But your
change makes a big difference for things like org-cycle on the only
heading or org-element-at-point at the very end, org-element-at-point
repeated many times to be able to notice the difference visually.

Michael



Re: [O] Creating hline in table from source block?

2013-11-26 Thread Achim Gratz
Loris Bennett writes:
 No, the column names are fixed, so that's perfect, thank you.  I
 suspected there might be some more straight-forward way than the
 interesting, but slightly more involved methods suggested by Achim and
 Rasmus.

There might be way to do that, but it's not implemented for shell blocks
since there isn't an easy way to deal with arrays in a shell.  You'd be
much better off using a language that has support for that (like Perl).

In your case (when the first line is always a header and you don't need
hlines anywhere else), the following trick using the end header
arguments of a call line works just as well:

--8---cut here---start-8---
#+NAME: table
#+BEGIN_SRC sh :results table
echo a b c d
echo 1 2 3 4
echo 5 6 7 8
#+END_SRC

#+CALL: table() :results table :colnames yes

#+RESULTS:
| a | b | c | d |
|---+---+---+---|
| 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 |
--8---cut here---end---8---


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] Opening an Org file slowed down

2013-11-26 Thread Nicolas Goaziou
Hello,

Michael Brand michael.ch.br...@gmail.com writes:

 Thank you. As I wrote in the other post my recipe is not a real use
 case any more for me so it doesn't really matter that opening the Org
 file is still slow.

Is opening the file still slow? I get:

  org-mode   1   0.458615558   0.458615558
  org-set-startup-visibility 1   0.454637818   0.454637818
  org-cycle-hide-drawers 2   0.450697582   0.225348791
  org-element-at-point   400 0.4234304369  0.001058576


Regards,

-- 
Nicolas Goaziou



Re: [O] Opening an Org file slowed down

2013-11-26 Thread Michael Brand
Hi Nicolas

On Tue, Nov 26, 2013 at 9:09 PM, Nicolas Goaziou n.goaz...@gmail.com wrote:
 Is opening the file still slow? I get:

What I don't understand is the still quadratic increase but if you
expect that for opening then it is ok for me. Uncompiled
release_8.2.3c-302-g15246d on a not new machine:

Open 400er:
org-mode1   6.877958  6.877958
org-set-startup-visibility  1   6.829008  6.829008
org-cycle-hide-drawers  2   6.813782  3.406891
org-element-at-point400 6.784125  0.0169603125
org-element-cache-get   82199   1.251139  1.522...e-05
org-element-type162000  0.610653  3.769...e-06

Open 800er:
org-mode1   29.970716 29.970716
org-set-startup-visibility  1   29.862721 29.862721
org-cycle-hide-drawers  2   29.85923  14.929615
org-element-at-point800 29.639263000  0.0370490787
org-element-cache-get   324399  4.531656  1.396...e-05
org-element-type644000  1.765317  2.741...e-06

Michael



Re: [O] Problem with property matching

2013-11-26 Thread Achim Gratz
Carsten Dominik writes:
 I think there is an error in the property matching regexp.  It will
 not match a line where the property value is empty.

See 3c933adaf6 and 68276fd62d for how this regex developed, the
requirement of the whitespace after the colon was in the original regex
from Nicolas.  I think that makes sense given the description of
properties as key-value pairs.  In other places we use () for an empty
value aka nil.

  I propose the following change, which makes the value part optional:

 
 diff --git a/lisp/org.el b/lisp/org.el
 index 7a4d244..4641ce5 100644
 --- a/lisp/org.el
 +++ b/lisp/org.el
 @@ -6205,7 +6205,7 @@ Use `org-reduced-level' to remove the effect of 
 `org-odd-levels'.
  Match group 3 will be set to the value if it exists.
(concat ^\\(?4:[ \t]*\\)\\(?1::\\(?2:
 (if literal property (regexp-quote property))
 -   \\):\\)[ \t]+\\(?3:[^ \t\r\n].*?\\)\\(?5:[ \t]*\\)$))
 +   \\):\\)\\([ \t]+\\(?3:[^ \t\r\n].*?\\)\\)?\\(?5:[ \t]*\\)$))

The extra group introduced should be shy.

 Why \\(?3:[^ \t\r\n].*?\\) instead of \\(?3:.*?\\) ?

In fact, this would be preferred (you need whitespace after the colon
for an empty key):

--8---cut here---start-8---
diff --git a/lisp/org.el b/lisp/org.el
index c9055a6..d2aff2f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6203,7 +6203,7 @@ (defsubst org-re-property (property optional literal)
 Match group 3 will be set to the value if it exists.
   (concat ^\\(?4:[ \t]*\\)\\(?1::\\(?2:
  (if literal property (regexp-quote property))
- \\):\\)[ \t]+\\(?3:[^ \t\r\n].*?\\)\\(?5:[ \t]*\\)$))
+ \\):\\)[ \t]+\\(?3:.*?\\)\\(?5:[ \t]*\\)$))
 
 (defconst org-property-re
   (org-re-property .*? 'literal)
--8---cut here---end---8---

since it still passes the test suite (which may be accidental since I
don't think there's any whitespace after :PROPERTIES: or :END: and we
may actually need to enforce this).  If you don't want to require
whitespace after the colon for an empty key you'd do this:

--8---cut here---start-8---
diff --git a/lisp/org.el b/lisp/org.el
index c9055a6..d2aff2f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6203,7 +6203,7 @@ (defsubst org-re-property (property optional literal)
 Match group 3 will be set to the value if it exists.
   (concat ^\\(?4:[ \t]*\\)\\(?1::\\(?2:
  (if literal property (regexp-quote property))
- \\):\\)[ \t]+\\(?3:[^ \t\r\n].*?\\)\\(?5:[ \t]*\\)$))
+ \\):\\)[ \t]*\\(?3:.*?\\)\\(?5:[ \t]*\\)$))
 
 (defconst org-property-re
   (org-re-property .*? 'literal)
--8---cut here---end---8---

but this fails Babel header arg tests.  I don't think there's anything
that specifically tests for empty values since it wasn't specified or
possible so far, but this somehow messes up property inheritance.  You'd
need to explicitly disallow :PROPERTIES: and :END: as a key, since this
will now be matched by the regex.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptation for Waldorf Blofeld V1.15B11:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] imaxima babel

2013-11-26 Thread yggdrasil
Eric Schulte schulte.e...@gmail.com writes:

 yggdra...@gmx.co.uk writes:

 [... how to use maxima code from org-mode and display results inline
 in the org-buffer ...]

 You would switch from :results latex to :results raw, in which case
 the latex will be inserted directly into the Org-mode buffer, and
 org-mode's existing pretty display functionality may be used to view the
 equations inline and should work for export to HTML as well.

 Alternately, if you really want to get fancy you could use noweb
 expansion (see the manual) to insert the results of the imaxima code
 block into a latex code block, and then use the existing latex code
 block functionality to convert the imaxima output to images of different
 types depending on the export target [1].


Many thanks for all the help! I have now figured out how to use maxima
from org-mode source blocks and display the results as pretty printed
equations online. To remember, I made a small summarising example file,
attached below for posteriority.

All the best,

Johnny



orgmaxima_example.org
Description: Lotus Organizer


Re: [O] Opening an Org file slowed down

2013-11-26 Thread Nicolas Goaziou
Hello,

Michael Brand michael.ch.br...@gmail.com writes:

 What I don't understand is the still quadratic increase but if you
 expect that for opening then it is ok for me.

No, it should be linear. See below.

 Uncompiled release_8.2.3c-302-g15246d on a not new machine:

 Open 400er:
 org-mode1   6.877958  6.877958
 org-set-startup-visibility  1   6.829008  6.829008
 org-cycle-hide-drawers  2   6.813782  3.406891
 org-element-at-point400 6.784125  0.0169603125
 org-element-cache-get   82199   1.251139  1.522...e-05
 org-element-type162000  0.610653  3.769...e-06

 Open 800er:
 org-mode1   29.970716 29.970716
 org-set-startup-visibility  1   29.862721 29.862721
 org-cycle-hide-drawers  2   29.85923  14.929615
 org-element-at-point800 29.639263000  0.0370490787
 org-element-cache-get   324399  4.531656  1.396...e-05
 org-element-type644000  1.765317  2.741...e-06

For 800 I get (compiled)

  org-mode   1   0.990066643   0.990066643
  org-set-startup-visibility 1   0.984746413   0.984746413
  org-cycle-hide-drawers 2   0.980225726   0.490112863
  org-element-at-point   800 0.7476192910  0.000934524

So, it is a linear increase here. Have you disabled cache?


Regards,

-- 
Nicolas Goaziou



Re: [O] org-contacts, multi-line properties, postal addresses

2013-11-26 Thread Kyle Machulis
Thought about maybe trying to extend AsynK with an org-contacts backend?
That'd be ridiculously useful.

http://karra-asynk.appspot.com/


On Sat, Nov 16, 2013 at 1:13 PM, Karl Voit devn...@karl-voit.at wrote:

 * Norman Walsh n...@nwalsh.com wrote:
 
  Hello world,

 Hello Norman!

  I'm just taking another look at org-contacts. I wonder what the best
  practice is for dealing with multi-line properties like postal
  addresses.

 I split them up to single lines.

  I can just make them part of the entry, of course, not in a property,
  but that seems oddly different from the other properites.

 I am afraid that there is no standard (yet).

 However, I can give you my personal approach:

  ** Firstname Lastname
 :FirstnameLastname:
  :PROPERTIES:
  :TYPE: person
  :TITLE:
  :EMAIL:
  :URL:
  :MOBILE:   0043/
  :HOMEPHONE:
  :WORKPHONE:
  :PHONE:
  :COMPANY:
  :STREET:
  :POSTALCODE:
  :CITY:
  :COUNTRY:  Austria
  :PHOTOGRAPH: [[photo:FirstnameLastname.jpg]]
  :BORN:
  :ITOLDTHEM_EMAIL:
  :ITOLDTHEM_ADDRESS:
  :ITOLDTHEM_PHONE:
  :ADDRESS_CHANGE_METHOD:
  :END:
 
  - first contact:

 ITOLDTHEM_* is used for automatically generating my email filter
 rules (spam-whitelist) and memorizing the level of information I
 gave out to companies.

 ADDRESS_CHANGE_METHOD is used to memorize email addresses, web
 pages, or contact information on how I am able to update my personal
 information such as address or phone number.

 In the next week or so I plan to implement a Python script that
 generates an iCal file out of my contacts.org so that my Android
 phone is able to import it (including photographs!). Stay tuned :-)

 HTH

 --
 mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
 get Memacs from https://github.com/novoid/Memacs 

 https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on
 github





[O] Bug when cycling

2013-11-26 Thread Bastien
Hi,

with latest master and the file below, hitting TAB at the beginning
of the headline will produce the attached backtrace.

* Test
  SCHEDULED: 2013-11-25 lun.
  :PROPERTIES:
  :CAPTURED: [2013-11-08 ven. 18:13]
  :END:

Debugger entered--Lisp error: (error Invalid search bound (wrong side of 
point))
  re-search-forward(^[ ]*:\\(\\(?:\\w\\|[-_]\\)+\\):[  ]*$ 2256 t)
  (while (re-search-forward org-drawer-regexp end t) (if (member-ignore-case 
(match-string 1) exceptions) nil (let ((drawer (org-element-at-point))) (if 
(memq (org-element-type drawer) (quote (drawer property-drawer))) (progn 
(org-flag-drawer t drawer) (goto-char (org-element-property :end drawer)))
  (let* ((globalp (memq state (quote (contents all (beg (if globalp 
(point-min) (point))) (end (if globalp (point-max) (if (eq state (quote 
children)) (save-excursion (outline-next-heading) (point)) (org-end-of-subtree 
t) (goto-char beg) (while (re-search-forward org-drawer-regexp end t) (if 
(member-ignore-case (match-string 1) exceptions) nil (let ((drawer 
(org-element-at-point))) (if (memq (org-element-type drawer) (quote (drawer 
property-drawer))) (progn (org-flag-drawer t drawer) (goto-char 
(org-element-property :end drawer
  (save-excursion (let* ((globalp (memq state (quote (contents all (beg (if 
globalp (point-min) (point))) (end (if globalp (point-max) (if (eq state (quote 
children)) (save-excursion (outline-next-heading) (point)) (org-end-of-subtree 
t) (goto-char beg) (while (re-search-forward org-drawer-regexp end t) (if 
(member-ignore-case (match-string 1) exceptions) nil (let ((drawer 
(org-element-at-point))) (if (memq (org-element-type drawer) (quote ...)) 
(progn (org-flag-drawer t drawer) (goto-char ...
  (progn (save-excursion (let* ((globalp (memq state (quote (contents all 
(beg (if globalp (point-min) (point))) (end (if globalp (point-max) (if (eq 
state ...) (save-excursion ... ...) (org-end-of-subtree t) (goto-char beg) 
(while (re-search-forward org-drawer-regexp end t) (if (member-ignore-case 
(match-string 1) exceptions) nil (let ((drawer ...)) (if (memq ... ...) (progn 
... ...
  (if (and (derived-mode-p (quote org-mode)) (not (memq state (quote (overview 
folded contents) (progn (save-excursion (let* ((globalp (memq state (quote 
...))) (beg (if globalp (point-min) (point))) (end (if globalp (point-max) (if 
... ... ... (goto-char beg) (while (re-search-forward org-drawer-regexp end 
t) (if (member-ignore-case (match-string 1) exceptions) nil (let (...) (if ... 
...
  org-cycle-hide-drawers(subtree)
  run-hook-with-args(org-cycle-hide-drawers subtree)
  (if (org-before-first-heading-p) nil (run-hook-with-args (quote 
org-cycle-hook) (quote subtree)))
  (cond ((= eos eoh) (if (org-before-first-heading-p) nil (run-hook-with-args 
(quote org-pre-cycle-hook) (quote empty))) (org-unlogged-message EMPTY ENTRY) 
(setq org-cycle-subtree-status nil) (save-excursion (goto-char eos) 
(outline-next-heading) (if (outline-invisible-p) (org-flag-heading nil 
((and (or (= eol eos) (not (string-match \\S- (buffer-substring eol eos 
(or has-children (not (setq children-skipped 
org-cycle-skip-children-state-if-no-children (if 
(org-before-first-heading-p) nil (run-hook-with-args (quote org-pre-cycle-hook) 
(quote children))) (if (org-at-item-p) (org-list-set-item-visibility 
(point-at-bol) struct (quote children)) (org-show-entry) (let* 
((org-called-with-limited-levels t) (org-outline-regexp 
(org-get-limited-outline-regexp)) (outline-regexp org-outline-regexp) 
(org-outline-regexp-bol (concat ^ org-outline-regexp))) (show-children)) (if 
(eq org-cycle-include-plain-lists (quote integrate)) (progn (save-excursion 
(org-back-to-heading) (while (org-list-search-forward ... eos t) 
(beginning-of-line 1) (let* ... ... ...)) (org-unlogged-message CHILDREN) 
(save-excursion (goto-char eos) (outline-next-heading) (if 
(outline-invisible-p) (org-flag-heading nil))) (setq org-cycle-subtree-status 
(quote children)) (if (org-before-first-heading-p) nil (run-hook-with-args 
(quote org-cycle-hook) (quote children ((or children-skipped (and (eq 
last-command this-command) (eq org-cycle-subtree-status (quote children (if 
(org-before-first-heading-p) nil (run-hook-with-args (quote org-pre-cycle-hook) 
(quote subtree))) (outline-flag-region eoh eos nil) (org-unlogged-message (if 
children-skipped SUBTREE (NO CHILDREN) SUBTREE)) (setq 
org-cycle-subtree-status (quote subtree)) (if (org-before-first-heading-p) nil 
(run-hook-with-args (quote org-cycle-hook) (quote subtree (t 
(run-hook-with-args (quote org-pre-cycle-hook) (quote folded)) 
(outline-flag-region eoh eos t) (org-unlogged-message FOLDED) (setq 
org-cycle-subtree-status (quote folded)) (if (org-before-first-heading-p) nil 
(run-hook-with-args (quote org-cycle-hook) (quote folded)
  (let ((goal-column 0) eoh eol eos has-children children-skipped struct) 
(save-excursion 

Re: [O] commit 5ea0228 has problem opening big org-mode file

2013-11-26 Thread York Zhao
 York Zhao writes:
 (add-to-list 'load-path path/to/org-mode)

 This line is not needed.

My org-mode is installed in separate directory outside of Emacs system and
therefor this line is needed in my setup, otherwise the org-mode shipped with
Emacs would be used.

 (add-to-list 'load-path path/to/org-mode/lisp)  ; this line is the
 key

 Key for what?  Did you create autoload files for this installation?

Key for reproducing the problem. I wouldn't get the problem without this line.

 Third, file yhj-mode.el has to be byte-compiled.

 You'll have to byte-compile it while the load-path is already set to
 include your Org installation, otherwise it will pick up the Org shipped
 with Emacs.

yhj-mode.el is the file used to reproduce the problem, in my system I have to
byte-compile this file, otherwise I wouldn't get the problem. But apparently
Nicolas doesn't need to byte-compile this file and still reproduced the issue.
Have no idea why.

York



Re: [O] commit 5ea0228 has problem opening big org-mode file

2013-11-26 Thread York Zhao
 Can both interested parties (York Zhao and Tom Dye) please test it and let me
 know of any problems?

Thank you for the fix, your patch worked for me.

York



Re: [O] [bug] [babel] repeated exports w/ inline src blocks yield different results

2013-11-26 Thread Yasushi SHOJI
At Sun, 24 Nov 2013 04:18:38 + (UTC),
Charles Berry wrote:
[...]
 and you see the extra '#+END_SRC' line.
 
 And if you keep repeating those keystrokes, the second result again appears.
 
 However, sometimes a minor change and then an erasure (perhaps 'a a C-x u')
 followed by the export keystrokes yields the correct result.

It seems like a cache issue.  `org-element-cache-reset' before exporting
corrects the result on my system.

still learning how the cache works...
-- 
yashi



Re: [O] org-capture with function type target

2013-11-26 Thread York Zhao
Hi Carsten,

Thank you.

York



Re: [O] commit 5ea0228 has problem opening big org-mode file

2013-11-26 Thread Thomas S. Dye
Nick Dokos ndo...@gmail.com writes:

 Nick Dokos ndo...@gmail.com writes:

 The best solution I can think of so far: revert commit 5ea0228,
 and change org-mode-restart to call normal-mode, instead of org-mode.
 normal-mode splits the setting of the mode from the setting of local
 variables, so it would avoid the recursion.

 I think (but I have not verified yet) that this would fix both the
 problem that gave rise to commit 5ea0228 in the first place and this
 bottomless recursion, without causing any other problems. I'll try it
 out tomorrow if I find the time and submit a patch.

 Patch attached. It passed the two tests, but I have not done anything
 more. Can both interested parties (York Zhao and Tom Dye) please test it
 and let me know of any problems?

Hi Nick,

The patch appears to work for me.

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



[O] org-publish parameters mismatch → cannot publish to HTML

2013-11-26 Thread Daniel Clemente

  Hi, in ox-publish.el I see in line 555:

(defun org-publish-org-to (backend filename extension plist optional pub-dir)
…

  org-publish-org-to-html seems to have its parameters in the same order 
(filename, extension, plist). Correct me if I'm wrong.

  But then in same file, line 654:
(when (org-publish-needed-p
   filename pub-dir f tmp-pub-dir base-dir)
  (funcall f project-plist filename tmp-pub-dir)
…

  With the default setting f == org-publish-org-to-html, the funcall passes 
parameters in the wrong order: plist filename. It should be: filename extension 
plist

  Later I see org trying to open the „filename“ variable which is not a file 
name but a plist:
(wrong-type-argument stringp (:base-directory ~/repoweb/ofinial… …) …)
file-truename((:base-directory ~/repoweb/ofinial/hacer/ :publishing-directory 
…) …)


  Maybe my setup is wrong (I'm confused with the org-publish / ox-publish mix) 
but the org-publish-project-alist seems safe; the stranges thing is:   
:publishing-function org-publish-org-to-html


  Does org-publish work for someone else? Why do I see new problems each time I 
try to publish…?

  Thanks



Re: [O] Controlling image width and placement in Beamer export

2013-11-26 Thread Jarmo Hurri

Greetings John.

John Hendy jw.he...@gmail.com writes:

 This comes up all the time. 

Perhaps we could lower the frequency by making a small change to the
manual?

 The key is to put it 1) before results (as you've done) and 2) to use
 a named source block (with #+name: foo above your babel code) so that
 Org knows what the results block actually is. Otherwise, as you
 currently have it, if you re-run the babel block, you'll keep the
 results section you already have and it will spit out another one
 below it since it no longer recognizes that the babel block and
 current, modified results block go together.

Done. For some reason not doing 2) also worked correctly, but I agree
that it is still a good idea to name the blocks.

 Oh, and not that it matters, but I typically do:

 #+begin_center
 #+ATTR_LATEX: :width 5cm
 #+RESULTS:
 [[file:triangle.pdf]]
 #+end_center

Good point, thanks.

Jarmo




[O] Split source block at point

2013-11-26 Thread Alexander Baier
Hello together,

is therer a command or a function that lets me split a source block at a
given position?  I think what I mean is best demonstrated by looking at
an example:

Given this buffer:

begin_src emacs-lisp
  (defun foo ()
(bar))

  (baz (foo))
end_src


With point somewhere at the free line I want to invoke the split
function and get this:

begin_src emacs-lisp
  (defun foo ()
(bar))
end_src

begin_src emacs-lisp
  (baz (foo))
end_src

This is similar to what M-RET does in message-mode.

Do we already have something like this in org? And if not, do you think
this is useful? Personally I find myself quite frequently splitting up
soure blocks manually.

Best regards,
--
 Alexander Baier



Re: [O] commit 5ea0228 has problem opening big org-mode file

2013-11-26 Thread Achim Gratz
York Zhao writes:
 York Zhao writes:
 (add-to-list 'load-path path/to/org-mode)

 This line is not needed.

 My org-mode is installed in separate directory outside of Emacs system and
 therefor this line is needed in my setup, otherwise the org-mode shipped with
 Emacs would be used.

The only path that needs to be in load-path is the lisp directory for
org-mode, which is the second line (that you say is key).  Unless you
have created your completely original way of installing Org, then only
the second line is needed.  If you do have created your own completely
original way of installing Org, then please don't expect anybody else
to be able to help.

 (add-to-list 'load-path path/to/org-mode/lisp)  ; this line is the
 key

 Key for what?  Did you create autoload files for this installation?

 Key for reproducing the problem. I wouldn't get the problem without this line.

Yes, because you wouldn't load any of the new code.  Except the
installation doesn't really look like we can only assume it does.

 yhj-mode.el is the file used to reproduce the problem, in my system I have 
 to
 byte-compile this file, otherwise I wouldn't get the problem. But apparently
 Nicolas doesn't need to byte-compile this file and still reproduced the issue.
 Have no idea why.

Maybe because your installation is borked, but we can't know because
you never provided enough information to tell.  There's a reason for
org-submit-bug-report to exist; among other things it includes
information about the Emacs and Org version and clueas as to how the
installation is set up.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] Split source block at point

2013-11-26 Thread Christian Moe

Alexander Baier writes:

 Hello together,

 is therer a command or a function that lets me split a source block at a
 given position?  I think what I mean is best demonstrated by looking at
 an example:

C-c C-v d (org-babel-demarcate-block)

Yours,
Christian 





Re: [O] Split source block at point

2013-11-26 Thread Alexander Baier
On 13-11-27 08:17 Jambunathan K wrote:
 C-h K C-c C-v C-d


 Alexander Baier lexi.ba...@gmail.com writes:

 Hello together,

 is therer a command or a function that lets me split a source block at a
 given position?  I think what I mean is best demonstrated by looking at
 an example:

 Given this buffer:
 
 begin_src emacs-lisp
   (defun foo ()
 (bar))

   (baz (foo))
 end_src
 

 With point somewhere at the free line I want to invoke the split
 function and get this:
 
 begin_src emacs-lisp
   (defun foo ()
 (bar))
 end_src

 begin_src emacs-lisp
   (baz (foo))
 end_src
 
 This is similar to what M-RET does in message-mode.

 Do we already have something like this in org? And if not, do you think
 this is useful? Personally I find myself quite frequently splitting up
 soure blocks manually.

 Best regards,
 --
  Alexander Baier

This works like a charm, thank you!

Best regards,
--
 Alexander Baier



[O] [Bug] commit 39070b7fc7 breaks babel test

2013-11-26 Thread Achim Gratz
Hi Eric,

this change seems to introduce additional line breaks in the following
test:

--8---cut here---start-8---
Test test-ob/catches-all-references condition:
(ert-test-failed
 ((should
   (string=
(org-babel-execute-src-block)
A literal example\non two lines for me.))
  :form
  (string= A literal example\non two lines\n for me. A literal 
example\non two lines for me.)
  :value nil))
   FAILED  1/1  test-ob/catches-all-references
--8---cut here---end---8---

This seems to happen because the final \n from the babel result is not
stripped anymore, pointing to the change in ob-core.  IIRC we
flip-flopped a few times already with including or not including this
final newline, so I don't know whether the code or the test should
change.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds