Re: [O] [patch] (was: [feature request] org-indirect-buffer-follow [7.7 (release_7.7.350.g9a179e)])

2011-10-08 Thread Carsten Dominik
Accepted.  THanks.

- Carsten

On 24.9.2011, at 21:29, Dave Abrahams wrote:

> From 81ab272ab709c45e898831e5e019e02cfc6617fe Mon Sep 17 00:00:00 2001
> From: Dave Abrahams 
> Date: Sat, 24 Sep 2011 15:21:53 -0400
> Subject: [PATCH] Add indirect agenda follow mode
> 
> By setting `org-agenda-follow-indirect' to a non-nil value,
> `org-agenda-follow-mode' will use an indirect buffer to display only
> the current item, rather than the whole agenda file in which it lives
> ---
> lisp/org-agenda.el |   13 ++---
> 1 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index b1fa5f5..1b67153 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -872,6 +872,12 @@ Needs to be set before org.el is loaded."
>   :group 'org-agenda-startup
>   :type 'boolean)
> 
> +(defcustom org-agenda-follow-indirect nil
> +  "Non-nil means `org-agenda-follow-mode' displays only the
> +current item's tree, in an indirect buffer."
> +  :group 'org-agenda
> +  :type 'boolean)
> +
> (defcustom org-agenda-show-outline-path t
>   "Non-nil means show outline path in echo area after line motion."
>   :group 'org-agenda-startup
> @@ -6608,8 +6614,7 @@ so that the date SD will be in that range."
>   (interactive)
>   (setq org-agenda-follow-mode (not org-agenda-follow-mode))
>   (org-agenda-set-mode-name)
> -  (if (and org-agenda-follow-mode (org-get-at-bol 'org-marker))
> -  (org-agenda-show))
> +  (org-agenda-do-context-action)
>   (message "Follow mode is %s"
>  (if org-agenda-follow-mode "on" "off")))
> 
> @@ -6771,7 +6776,9 @@ When called with a prefix argument, include all archive 
> files as well."
>   "Show outline path and, maybe, follow mode window."
>   (let ((m (org-get-at-bol 'org-marker)))
> (if (and org-agenda-follow-mode m)
> - (org-agenda-show))
> + (if org-agenda-follow-indirect
> + (org-agenda-tree-to-indirect-buffer)
> +   (org-agenda-show)))
> (if (and m org-agenda-show-outline-path)
>   (org-with-point-at m
> (org-display-outline-path t)
> -- 
> 1.7.3.4
> 
> 
> 
> -- 
> Dave Abrahams
> BoostPro Computing
> http://www.boostpro.com




Re: [O] org-export-blocks, HTML, problem.

2011-10-08 Thread Jacek Generowicz


On 2011 Oct 8, at 01:58, Samuel Wales wrote:

Although you are talking about special blocks, it's worth pointing  
out that

the following exports with incorrect nesting.  To make it
nest properly you have to add newlines.

[...]

===

#+html: 
this is a paragraph.

and another.
#+html: 

third.



Yes, I can reproduce that. And a newline before the second #+html  
fixes it. Adding an extra newline to my org-export-blocks-format-blah  
seems to fix my problem.


Thank you.


I did not follow the previous thread, so this might be irrelevant.



I'm not sure which other thread you mean? This one:

   http://article.gmane.org/gmane.emacs.orgmode/41407

?





Re: [O] feature suggestion: apply datetime prompt magic to selected region

2011-10-08 Thread suvayu ali
On Fri, Oct 7, 2011 at 4:36 PM, Brian van den Broek
 wrote:
> What I was suggesting was it would be cool and a small time-saver if I
> could select the text "Tuesday at 3pm" and hit C-u C-c . and have the
> region replaced with the stamp <2011-10-11 Tue 15:00>, entirely
> bypassing the kill and yank steps. (Achim correctly suggested that
> what I want to do could be done with a keyboard macro. I still think
> it would be neat.)

Ah I see it now, you want the org-timestamp command to work on a
region. Maybe you can write your own function with lisp if you are
doing this too often. Should be quite simple to try.

GL

-- 
Suvayu

Open source is the future. It sets us free.



[O] Bug Report: latex export interaction with inlinetasks

2011-10-08 Thread Colin Fraizer
I have a file like this:

 

* Item 1

  - list1a

  - list1b

* Item 2

  - list2a

*** TODO Test

*** END

  - list2b

* Item 3

 

(1)If I export the whole file to LaTeX, everything works fine.

(2)If I export the subtree "* Item 2" to HTML, everything works fine.
(I see my list and the inlinetask in that list.)

(3)If I export the subtree "* Item 2" to LaTeX, the inlinetask is
removed. (All inlinetasks are removed from list2.)

 

NOTE: I'm exporting the subtrees with C-c C-e 1 d (or C-c C-e 1 L).

 

This is apparently caused by the fact that:

1.   org-export-latex-first-lines matches all of list2 (because there
are no headlines under "* Item 2"); AND

2.   org-export-preprocess-string is called with limited parameters on
those first lines. Those parameters do not include my value for ":tasks".

 

Is there a reason why we could not (or should not) change the defun
org-export-latex-first-lines like the following.  I only add the line

":tasks (plist-get opt-plist :tasks)"

 

I'm not familiar enough with the guts of org to know if that will have
terrible consequences elsewhere.

 

(defun org-export-latex-first-lines (opt-plist &optional beg end)

   :

   :

  (prog1

 (org-export-latex-content

  (org-export-preprocess-string

   (buffer-substring pt end)

   :for-backend 'latex

   :emph-multiline t

   :add-text nil

   :comments nil

   :skip-before-1st-heading nil

   :LaTeX-fragments nil

   :tasks (plist-get opt-plist :tasks)  ;; *** I PROPOSE ADDING THIS
LINE

   :timestamps (plist-get opt-plist :timestamps)

   :footnotes (plist-get opt-plist :footnotes)))

   :

   :

   ) ; end of defun

 



Re: [O] Patch for numbering continuation in source blocks.

2011-10-08 Thread Niels Giesen
Carsten Dominik  writes:

> Hi Niels,
>
> is the purpose of this patch to be able to insert an unnumbered code block
> between two numbered ones and to continue the numbering from the first in the 
> third?

Yes, that is the precise purpose. How concise you can put it!

-- 
http://pft.github.com/



Re: [O] [babel] create tikz pictures in an floating LaTeX environment

2011-10-08 Thread Torsten Wagner
Hi Nicholas,

>> a line similar like
>> [[file:fig/mypicture.pdf ]]
>>
>
>
> ``:results output silent'' should suppress that I think.
>

Yep, thanks that did the job.
Nevertheless, I have to add the generated output as a static link to
add resp. export it in an org-mode way..
#+CAPTION:   My great picture
#+LABEL:  fig:my_picture
#+ATTR_LaTeX:
[[fig/mpicture.pdf]]

Replacing the manual link by the function call
#+call: mypicture()
only results again in the line
fig/mypicture.pdf (this time without square brackets)

Thanks a lot for the help

Torsten



Re: [O] [babel] create tikz pictures in an floating LaTeX environment

2011-10-08 Thread Torsten Wagner
Hi Eric

>>
>> ``:results output silent'' should suppress that I think.
>>
>
> Nick's solution should work well.  Also, (if you're exporting to LaTeX)
> couldn't you just combine the tikz picture and the wrapping figure
> environment into a single begin_latex block?
>

Yep Nick solution is working fine. I just wonder what is the order of
execution during export. E.g. if I generate the link to a file as
output and place it directly under the lines to add a picture in
org-mode, I thought the code block would be execute first and the
result would replace the function call. The exporter will find a link
to a picture and export it as usual. This was the reason I thought the
following code should work.

#+CAPTION:my great picture
#+LABEL:  fig:my_picture
#+ATTR_LaTeX:
#+srcname: mypicture
#+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz"))
:border 1em :fit
 \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2]
 \draw[fill=red!50] (0,0) rectangle  ++(5,1);
 \draw[fill=yellow!50] (1,1) rectangle  ++(1,0.25);
 \draw[fill=yellow!50] (3,1) rectangle  ++(1,0.25);
 \draw[fill=green!50] (0.75,1) rectangle  ++(1.5,-0.4);
 \draw[fill=green!50] (2.75,1) rectangle  ++(1.5,-0.4);
 \end{scope}
 \end{tikzpicture}
#+end_src

or alternatively
#+CAPTION:my great picture
#+LABEL:  fig:my_picture
#+ATTR_LaTeX:
#+call: mypicture()


As for putting all figure environment and tikz into one latex-code block.
First of all I thought that :file fig/mypicture.pdf will generate and
process an individual LaTeX file. Thus, I could not use any commands
for the main manuscript right? Sure I could skip the :file command
however, I would prefer to generate each picture as an individual pdf
file. This gives me much more flexibility. I can easily convert them
into any other format and share them individually with co-workers.
Furthermore, many journals are very strict (and minimal) with there
supported LaTeX environment. The tikz package is often not installed
on there machines and the upload process would fail. In addition some
journals require to upload each figure individually. Thus, I am used
already to generate individual pdf-files for each figure and include
them into the manuscript by a simple \includegraphic line.

Thanks for the help

Torsten

CC. I notice something else regarding to babel. Please see my next post



[O] [babel] Should babel be more error intolerant?

2011-10-08 Thread Torsten Wagner
Hi,

just playing around with a new aspect of org-mode and babel, I
noticed, that many of my typos and wrong syntax using are silently
accepted resp. ignored.
Even the message buffer keeps quite.
I just wonder if babel should be more error intolerant to tell users
that they are actually doing something wrong.
E.g., I don't see any error messages for (marked the typo by *):


#+begin_src latex :file*s* fig/mypicture.pdf :packages '(("" "tikz"))
:border 1em :fit  :results output silent
or
#+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz"))
:border 1em :fit  :*result* output silent
or
#+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz"))
:border 1em :fit  :results output *quite*

obviously the above errors might happen quickly just as typos or
because one tries to use commands from memory.

Trying something new, this might drive someone quickly crazy. One is
going to tackle the problem in many different ways and finally after
several minutes (or even hours) one notice its simply "silent" and not
"quite" ;)

I would prefer a bold
Error ":results output quite" is unknown to babel
in the minibuffer, maybe including jumping to the line in question.
Others might like to keep it quite (or silent), I guess it could be
easily set by an optional flag
like #+BABEL:debug:t

As a side note of this, I wonder if babel could use the same/similar
way like the TODO field in org-mode to switch between all possible
parameters for a certain code block?
I learned, different code blocks can have quite different possible
parameters. A bit difficult to remember esp., if you don't use them on
a daily basis.
If one could place the pointer to e.g., the :results keyword and hit
C-c C-t to switch between all possibilities for the :exports keyword
for this particular source code block, it would greatly simply the
usage and reduce errors. Parameters which require additional user
input like file names could indicate this (like in the manual) by
indicating it within brackets e.g., .

Thanks for all the help and support

Torsten



Re: [O] short timestamp in org-log-note-headings

2011-10-08 Thread Carsten Dominik
Accepted, thanks.

- Carsten
On 7.10.2011, at 18:15, John J Foerch wrote:

> Carsten Dominik  writes:
>> Sure, please make a patch!
>> 
>> - Carsten
>> 
>> On 7.10.2011, at 17:22, John J Foerch wrote:
>> 
>>> Hello,
>>> 
>>> I wonder if a format code could be added for org-log-note-headings that
>>> allows the insertion of a short timestamp (without clock time).  The use
>>> case for this is that I log state changes of to-do items, but the
>>> precise time of the state change is usually more information than I want
>>> to record.
>>> 
>>> Thank you
>>> 
>>> -- 
>>> John Foerch
>>> 
>>> 
> 
> Okay, here it is.  This patch adds %d and %D, the capitalized form for
> an active timestamp, corresponding to %t and %T.  The reason I thought
> of 'd' as the code is the mnemonic "date".
> 
> -- 
> John Foerch
> 
> 
> From 746ab08868ab88dc3d942bada9a21b21cc3e6de2 Mon Sep 17 00:00:00 2001
> From: John Foerch 
> Date: Fri, 7 Oct 2011 12:09:22 -0400
> Subject: [PATCH] org-log-note-headings: format codes %d and %D
> 
> Two new format codes support insertion of a short-format time stamp.
> %d for an inactive time stamp, and %D for an active one.
> ---
> lisp/org.el |8 
> 1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/lisp/org.el b/lisp/org.el
> index 4a11fc0..00cc7e0 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -2375,6 +2375,8 @@ context, and the cdr is the heading to be used.  The 
> heading may also be the
> empty string.
> %t in the heading will be replaced by a time stamp.
> %T will be an active time stamp instead the default inactive one
> +%d will be replaced by a short-format time stamp.
> +%D will be replaced by an active short-format time stamp.
> %s will be replaced by the new TODO state, in double quotes.
> %S will be replaced by the old TODO state, in double quotes.
> %u will be replaced by the user name.
> @@ -12174,6 +12176,12 @@ EXTRA is additional text that will be inserted into 
> the notes buffer."
>  (cons "%T" (format-time-string
>  (org-time-stamp-format 'long nil)
>  org-log-note-effective-time))
> +(cons "%d" (format-time-string
> +(org-time-stamp-format nil 'inactive)
> +org-log-note-effective-time))
> +(cons "%D" (format-time-string
> +(org-time-stamp-format nil nil)
> +org-log-note-effective-time))
>  (cons "%s" (if org-log-note-state
> (concat "\"" org-log-note-state "\"")
>   ""))
> -- 
> 1.7.6.3
> 




Re: [O] Entities Parsing Code

2011-10-08 Thread Carsten Dominik

On 19.9.2011, at 23:39, Pavel Panchekha wrote:

> I've been noticing that the org-pretty-entities code incorrectly lexes 
> numbers as part of TeX command names; for example, if I type $\sim2n^2$, the 
> \sim will not be replaced with a ~ because the 2 is lexed as part of the 
> command name.  This is incorrect; in TeX, numbers are not legal parts of a 
> command name.

Hi Pavel, this is on purpose, in order to support names like \frac12.  Most, 
but not all entity names are strict TeX.  You can work around this by inserting 
spaces - \sim2n^2 looks
quite unreadable to me anyway - I would, also in a TeX file, always write it 
like 
\sim 2 n^2

- Carsten

> 
> Here's a patch that fixes the issue:
> 
> diff --git a/lisp/org.el b/lisp/org.el
> index 73b1073..0db5a0b 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -5735,7 +5735,7 @@ needs to be inserted at a specific position in the font-
>  (when org-pretty-entities
>(catch 'match
> (while (re-search-forward
> -   "\\([a-zA-Z][a-zA-Z0-9]*\\)\\($\\|[^[:alnum:]\n]\\)"
> +   "\\([a-zA-Z]+\\)\\($\\|[^[:alpha:]\n]\\)"
> limit t)
>   (if (and (not (org-in-indented-comment-line))
>(setq ee (org-entity-get (match-string 1)))
> 
> -- 
> - Pavel Panchekha
> 




Re: [O] [PATCH] org-crypt: when running org-decrypt-entry, only run auto-save-mode check if on an encrypted entry

2011-10-08 Thread Carsten Dominik
Accepted, thanks.

- Carsten

On 28.8.2011, at 15:46, Pieter Praet wrote:

> * lisp/org-crypt.el (org-crypt-check-auto-save): New function, see next 
> change.
> * lisp/org-crypt.el (org-decrypt-entry): Break the auto-save-mode check out
>  into a separate function, and call it at a later point, to assure it only
>  runs when visiting an encrypted entry.
> 
> Currently `org-decrypt-entry' is doing the auto-save-mode check whenever
> it's run, regardless of context, while this only makes sense when run on
> an entry which is actually encrypted (or looks like it, at least).
> 
> Signed-off-by: Pieter Praet 
> ---
> 
> lisp/org-crypt.el |   54 +---
> 1 files changed, 30 insertions(+), 24 deletions(-)
> 
> diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el
> index 5991192..f764404 100644
> --- a/lisp/org-crypt.el
> +++ b/lisp/org-crypt.el
> @@ -116,6 +116,35 @@ nil  : Leave auto-save-mode enabled.
>  (const :tag "Ask" ask)
>  (const :tag "Encrypt" encrypt)))
> 
> +(defun org-crypt-check-auto-save ()
> +  "Check whether auto-save-mode is enabled for the current buffer.
> +
> +`auto-save-mode' may cause leakage when decrypting entries, so
> +check whether it's enabled, and decide what to do about it.
> +
> +See `org-crypt-disable-auto-save'."
> +  (when buffer-auto-save-file-name
> +(cond
> + ((or
> +   (eq org-crypt-disable-auto-save t)
> +   (and
> + (eq org-crypt-disable-auto-save 'ask)
> + (y-or-n-p "org-decrypt: auto-save-mode may cause leakage. Disable it 
> for current buffer? ")))
> +  (message (concat "org-decrypt: Disabling auto-save-mode for " (or 
> (buffer-file-name) (current-buffer
> +  ; The argument to auto-save-mode has to be "-1", since
> +  ; giving a "nil" argument toggles instead of disabling.
> +  (auto-save-mode -1))
> + ((eq org-crypt-disable-auto-save nil)
> +  (message "org-decrypt: Decrypting entry with auto-save-mode enabled. 
> This may cause leakage."))
> + ((eq org-crypt-disable-auto-save 'encrypt)
> +  (message "org-decrypt: Enabling re-encryption on auto-save.")
> +  (add-hook 'auto-save-hook
> + (lambda ()
> +   (message "org-crypt: Re-encrypting all decrypted entries due 
> to auto-save.")
> +   (org-encrypt-entries))
> + nil t))
> + (t nil
> +
> (defun org-crypt-key-for-heading ()
>   "Return the encryption key for the current heading."
>   (save-excursion
> @@ -164,30 +193,6 @@ nil  : Leave auto-save-mode enabled.
> (defun org-decrypt-entry ()
>   "Decrypt the content of the current headline."
>   (interactive)
> -
> -  ; auto-save-mode may cause leakage, so check whether it's enabled.
> -  (when buffer-auto-save-file-name
> -(cond
> - ((or
> -   (eq org-crypt-disable-auto-save t)
> -   (and
> -(eq org-crypt-disable-auto-save 'ask)
> -(y-or-n-p "org-decrypt: auto-save-mode may cause leakage. Disable it 
> for current buffer? ")))
> -  (message (concat "org-decrypt: Disabling auto-save-mode for " (or 
> (buffer-file-name) (current-buffer
> -  ; The argument to auto-save-mode has to be "-1", since
> -  ; giving a "nil" argument toggles instead of disabling.
> -  (auto-save-mode -1))
> - ((eq org-crypt-disable-auto-save nil)
> -  (message "org-decrypt: Decrypting entry with auto-save-mode enabled. 
> This may cause leakage."))
> - ((eq org-crypt-disable-auto-save 'encrypt)
> -  (message "org-decrypt: Enabling re-encryption on auto-save.")
> -  (add-hook 'auto-save-hook
> -(lambda ()
> -  (message "org-crypt: Re-encrypting all decrypted entries 
> due to auto-save.")
> -  (org-encrypt-entries))
> -nil t))
> - (t nil)))
> -
>   (require 'epg)
>   (unless (org-before-first-heading-p)
> (save-excursion
> @@ -199,6 +204,7 @@ nil  : Leave auto-save-mode enabled.
>  (outline-invisible-p
>   (forward-line)
>   (when (looking-at "-BEGIN PGP MESSAGE-")
> +   (org-crypt-check-auto-save)
> (let* ((end (save-excursion
>   (search-forward "-END PGP MESSAGE-")
>   (forward-line)
> -- 
> 1.7.5.4
> 
> 




Re: [O] [PATCH] org.texi: yasnippet nested snippet

2011-10-08 Thread Carsten Dominik
Accepted, thanks.

- Carsten
On 26.8.2011, at 14:49, Sylvain Rousseau wrote:

> Hi,
> 
> The proposed workaround doesn't support nested snippet!
> 
> (setq yas/triggers-in-field t) to enable it.
> 
> Here is a patch to fix this:
> 
> diff --git a/doc/org.texi b/doc/org.texi
> index 002ada1..2295fd0 100644
> --- a/doc/org.texi
> +++ b/doc/org.texi
> @@ -14097,7 +14097,7 @@ Then, tell Org mode what to do with the new function:
>(make-variable-buffer-local 'yas/trigger-key)
>(setq yas/trigger-key [tab])
>(add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
> -  (define-key yas/keymap [tab] 'yas/next-field)))
> +  (define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand)))
>  @end lisp
>  
>  @item @file{windmove.el} by Hovav Shacham
> 
> 
> Sylvain.




Re: [O] short timestamp in org-log-note-headings

2011-10-08 Thread John J Foerch
Thank you, too

John Foerch

Carsten Dominik  writes:
> Accepted, thanks.
>
> - Carsten
> On 7.10.2011, at 18:15, John J Foerch wrote:
>
>> Carsten Dominik  writes:
>>> Sure, please make a patch!
>>> 
>>> - Carsten
>>> 
>>> On 7.10.2011, at 17:22, John J Foerch wrote:
>>> 
 Hello,
 
 I wonder if a format code could be added for org-log-note-headings that
 allows the insertion of a short timestamp (without clock time).  The use
 case for this is that I log state changes of to-do items, but the
 precise time of the state change is usually more information than I want
 to record.
 
 Thank you
 
 -- 
 John Foerch
 
 
>> 
>> Okay, here it is.  This patch adds %d and %D, the capitalized form for
>> an active timestamp, corresponding to %t and %T.  The reason I thought
>> of 'd' as the code is the mnemonic "date".
>> 
>> -- 
>> John Foerch
>> 
>> 
>> From 746ab08868ab88dc3d942bada9a21b21cc3e6de2 Mon Sep 17 00:00:00 2001
>> From: John Foerch 
>> Date: Fri, 7 Oct 2011 12:09:22 -0400
>> Subject: [PATCH] org-log-note-headings: format codes %d and %D
>> 
>> Two new format codes support insertion of a short-format time stamp.
>> %d for an inactive time stamp, and %D for an active one.
>> ---
>> lisp/org.el |8 
>> 1 files changed, 8 insertions(+), 0 deletions(-)
>> 
>> diff --git a/lisp/org.el b/lisp/org.el
>> index 4a11fc0..00cc7e0 100644
>> --- a/lisp/org.el
>> +++ b/lisp/org.el
>> @@ -2375,6 +2375,8 @@ context, and the cdr is the heading to be used.  The 
>> heading may also be the
>> empty string.
>> %t in the heading will be replaced by a time stamp.
>> %T will be an active time stamp instead the default inactive one
>> +%d will be replaced by a short-format time stamp.
>> +%D will be replaced by an active short-format time stamp.
>> %s will be replaced by the new TODO state, in double quotes.
>> %S will be replaced by the old TODO state, in double quotes.
>> %u will be replaced by the user name.
>> @@ -12174,6 +12176,12 @@ EXTRA is additional text that will be inserted into 
>> the notes buffer."
>> (cons "%T" (format-time-string
>> (org-time-stamp-format 'long nil)
>> org-log-note-effective-time))
>> +   (cons "%d" (format-time-string
>> +   (org-time-stamp-format nil 'inactive)
>> +   org-log-note-effective-time))
>> +   (cons "%D" (format-time-string
>> +   (org-time-stamp-format nil nil)
>> +   org-log-note-effective-time))
>> (cons "%s" (if org-log-note-state
>>(concat "\"" org-log-note-state "\"")
>>  ""))
>> -- 
>> 1.7.6.3
>> 




Re: [O] [babel] Should babel be more error intolerant?

2011-10-08 Thread Eric Schulte
Torsten Wagner  writes:

> Hi,
>
> just playing around with a new aspect of org-mode and babel, I
> noticed, that many of my typos and wrong syntax using are silently
> accepted resp. ignored.
> Even the message buffer keeps quite.
> I just wonder if babel should be more error intolerant to tell users
> that they are actually doing something wrong.
> E.g., I don't see any error messages for (marked the typo by *):
>
>
> #+begin_src latex :file*s* fig/mypicture.pdf :packages '(("" "tikz"))
> :border 1em :fit  :results output silent
> or
> #+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz"))
> :border 1em :fit  :*result* output silent
> or
> #+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz"))
> :border 1em :fit  :results output *quite*
>
> obviously the above errors might happen quickly just as typos or
> because one tries to use commands from memory.
>
> Trying something new, this might drive someone quickly crazy. One is
> going to tackle the problem in many different ways and finally after
> several minutes (or even hours) one notice its simply "silent" and not
> "quite" ;)
>

There are no disallowed header arguments, and language is free to add
its own arbitrary new header arguments so it is not possible to raise
warnings on unknown header arguments.  There is however a helper
function which will inspect header arguments bound to C-c v c.  This may
prove useful if you get into the habit of using it as your first step in
debugging code blocks.

>
> I would prefer a bold
> Error ":results output quite" is unknown to babel
> in the minibuffer, maybe including jumping to the line in question.
> Others might like to keep it quite (or silent), I guess it could be
> easily set by an optional flag
> like #+BABEL:debug:t
>
> As a side note of this, I wonder if babel could use the same/similar
> way like the TODO field in org-mode to switch between all possible
> parameters for a certain code block?
> I learned, different code blocks can have quite different possible
> parameters. A bit difficult to remember esp., if you don't use them on
> a daily basis.
> If one could place the pointer to e.g., the :results keyword and hit
> C-c C-t to switch between all possibilities for the :exports keyword
> for this particular source code block, it would greatly simply the
> usage and reduce errors. Parameters which require additional user
> input like file names could indicate this (like in the manual) by
> indicating it within brackets e.g., .
>

This is a very good idea and shouldn't be too difficult to implement for
all of those header arguments which are common across all languages.
I'll place this on my todo list...

Best -- Eric

>
> Thanks for all the help and support
>
> Torsten
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] [PATCH 0/5] loop over headlines in active region

2011-10-08 Thread David Maus
Hi Carsten,

At Thu, 6 Oct 2011 10:35:18 +0200,
Carsten Dominik wrote:
>
> Hi David,
>
> I see that this patch is still on the patchwork server.
> What is the status, I remember that you dot a number of
> comments

Started to make a list of Org's behavior with headlines when region is
active but didn't make much progress. Besides that I'm waiting for
some feedback by Bastien.

Personally I think we can turn the state to "Deferred" -- I don't
consider it of high importance. I gave up on using the functionallity
in favour of Agenda's bulk operations and rescheduling/deadlining
multiple items in the same buffer does not happen that often.

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgpuj8tHgyAds.pgp
Description: PGP signature


Re: [O] [babel] create tikz pictures in an floating LaTeX environment

2011-10-08 Thread Eric Schulte
Torsten Wagner  writes:

> Hi Eric
>
>>>
>>> ``:results output silent'' should suppress that I think.
>>>
>>
>> Nick's solution should work well.  Also, (if you're exporting to LaTeX)
>> couldn't you just combine the tikz picture and the wrapping figure
>> environment into a single begin_latex block?
>>
>
> Yep Nick solution is working fine. I just wonder what is the order of
> execution during export. E.g. if I generate the link to a file as
> output and place it directly under the lines to add a picture in
> org-mode, I thought the code block would be execute first and the
> result would replace the function call. The exporter will find a link
> to a picture and export it as usual. This was the reason I thought the
> following code should work.
>

Your code example can be reworked as follows and it should export as
expected.  With a named code block the result may be positioned anywhere
in an Org-mode file regardless of the position of the code block.



The caption, label and attr_latex lines will be applied to the named result.

#+CAPTION:my great picture
#+LABEL:  fig:my_picture
#+ATTR_LaTeX:
#+results: mypicture
[[file:fig/mypicture.pdf]]


This code block may be anywhere in the Org-mode file the result will
always be placed at the named results line above.

#+srcname: mypicture
#+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz")) :border 1em :fit :results raw
 \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2]
 \draw[fill=red!50] (0,0) rectangle  ++(5,1);
 \draw[fill=yellow!50] (1,1) rectangle  ++(1,0.25);
 \draw[fill=yellow!50] (3,1) rectangle  ++(1,0.25);
 \draw[fill=green!50] (0.75,1) rectangle  ++(1.5,-0.4);
 \draw[fill=green!50] (2.75,1) rectangle  ++(1.5,-0.4);
 \end{scope}
 \end{tikzpicture}
#+end_src

Best -- Eric

>
> As for putting all figure environment and tikz into one latex-code block.
> First of all I thought that :file fig/mypicture.pdf will generate and
> process an individual LaTeX file. Thus, I could not use any commands
> for the main manuscript right? Sure I could skip the :file command
> however, I would prefer to generate each picture as an individual pdf
> file. This gives me much more flexibility. I can easily convert them
> into any other format and share them individually with co-workers.
> Furthermore, many journals are very strict (and minimal) with there
> supported LaTeX environment. The tikz package is often not installed
> on there machines and the upload process would fail. In addition some
> journals require to upload each figure individually. Thus, I am used
> already to generate individual pdf-files for each figure and include
> them into the manuscript by a simple \includegraphic line.
>
> Thanks for the help
>
> Torsten
>
> CC. I notice something else regarding to babel. Please see my next post

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/


Re: [O] [PATCH 0/5] loop over headlines in active region

2011-10-08 Thread Carsten Dominik
Hi David,

On 8.10.2011, at 20:59, David Maus wrote:

> Hi Carsten,
> 
> At Thu, 6 Oct 2011 10:35:18 +0200,
> Carsten Dominik wrote:
>> 
>> Hi David,
>> 
>> I see that this patch is still on the patchwork server.
>> What is the status, I remember that you dot a number of
>> comments
> 
> Started to make a list of Org's behavior with headlines when region is
> active but didn't make much progress. Besides that I'm waiting for
> some feedback by Bastien.
> 
> Personally I think we can turn the state to "Deferred" -- I don't
> consider it of high importance. I gave up on using the functionallity
> in favour of Agenda's bulk operations and rescheduling/deadlining
> multiple items in the same buffer does not happen that often.

OK, lets do that, I agree.  I guess this applies to the whole batch,
910, 911, 925, 926?  I have lost the overview a bit.
Will you change the status?

Cheers

- Carsten

> 
> Best,
>  -- David
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber dmj...@jabber.org
> Email. dm...@ictsoc.de




Re: [O] [PATCH 0/5] loop over headlines in active region

2011-10-08 Thread David Maus
At Sat, 8 Oct 2011 22:11:37 +0200,
Carsten Dominik wrote:
>
> Hi David,
>
> On 8.10.2011, at 20:59, David Maus wrote:
>
> > Hi Carsten,
> >
> > At Thu, 6 Oct 2011 10:35:18 +0200,
> > Carsten Dominik wrote:
> >>
> >> Hi David,
> >>
> >> I see that this patch is still on the patchwork server.
> >> What is the status, I remember that you dot a number of
> >> comments
> >
> > Started to make a list of Org's behavior with headlines when region is
> > active but didn't make much progress. Besides that I'm waiting for
> > some feedback by Bastien.
> >
> > Personally I think we can turn the state to "Deferred" -- I don't
> > consider it of high importance. I gave up on using the functionallity
> > in favour of Agenda's bulk operations and rescheduling/deadlining
> > multiple items in the same buffer does not happen that often.
>
> OK, lets do that, I agree.  I guess this applies to the whole batch,
> 910, 911, 925, 926?  I have lost the overview a bit.
> Will you change the status?

Done.

Any information about Bastien's absence? I remember he announce to be
on vacation till Sep 5, but as far as I could see hasn't appeared to
be be active on the list.

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgpgQwlr1JUFm.pgp
Description: PGP signature


Re: [O] [babel] Should babel be more error intolerant?

2011-10-08 Thread Eric Schulte
>>
>> As a side note of this, I wonder if babel could use the same/similar
>>way like the TODO field in org-mode to switch between all possible
>>parameters for a certain code block?  I learned, different code blocks
>>can have quite different possible parameters. A bit difficult to
>>remember esp., if you don't use them on a daily basis.  If one could
>>place the pointer to e.g., the :results keyword and hit C-c C-t to
>>switch between all possibilities for the :exports keyword for this
>>particular source code block, it would greatly simply the usage and
>>reduce errors. Parameters which require additional user input like
>>file names could indicate this (like in the manual) by indicating it
>>within brackets e.g., .
>>
>
> This is a very good idea and shouldn't be too difficult to implement for
> all of those header arguments which are common across all languages.
> I'll place this on my todo list...
>

I've just pushed up a simple implementation of the above.  The new
function `org-babel-insert-header-arg' bound to C-c C-v j will insert a
header argument and its value using completing read in the minibuffer.

I'm sure the current functionality has room for improvement but it seems
to work well in my initial tests.

Let me know what you think.

Best -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



[O] [agenda] Case-insensitive tag search

2011-10-08 Thread Marcelo de Moraes Serpa
Hey guys,

When I started using org, I used to tag everything with upper-case tags. It
just feels noisy now and I started tagging them in lower-case. The agenda
tag search (C-a m) makes that distinction, and I'd like to just search for
the tag string regardless of case. Is that possible to configure?

Thanks in advance,

- Marcelo.


[O] Asciidoc

2011-10-08 Thread Stephen Nelson-Smith
Hi there,

I have a large piece of writing to do, which my publisher wants in
asciidoc.  I'd prefer to write in orgmode and export as asciidoc.  Is
this feasible?  Anyone doing this or done this before?

S.



[O] [OT] Deft - another note taking approach that seems promising

2011-10-08 Thread Marcelo de Moraes Serpa
Hey guys,

It's nice to see new (quality) stuff popping up for emacs and org, such as
Deft:
http://emacs-fu.blogspot.com/2011/09/quick-note-taking-with-deft-and-org.html
.

I'm installing it now, but I thought I'd share ;)

Cheers,

- M