Re: [O] [babel] cannot comment out noweb references

2014-02-06 Thread Samuel Wales
[i changed whatever to whatever2]

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.

Denmark: free Karina Hansen NOW.



[O] [babel] buffer corruption if results block at end of entry

2014-02-06 Thread Samuel Wales
===
* asdf
#+BEGIN_SRC org :results verbatim output :noweb yes :noweb-ref whatever2
  a
#+END_SRC

#+BEGIN_SRC sh :results output :noweb yes
  echo whatever2
#+END_SRC

#+RESULTS:
#+begin_example
a
#+end_example
* next headline
===

results in this:

===
* asdf
#+BEGIN_SRC org :results verbatim output :noweb yes :noweb-ref whatever2
  a
#+END_SRC

#+BEGIN_SRC sh :results output :noweb yes
  echo whatever2
#+END_SRC

#+RESULTS:
=a
=* next headline
===

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] semantic-mode is conflict with org-mode

2014-02-06 Thread Sebastien Vauban
Xue Fuqiao wrote:
 semantic-mode uses `C-c ,' as a prefix for several commands.  org-mode uses
 `C-c ,' for org-priority.  I don't use semantic-mode within org-mode.  Is
 there a way to disable semantic-mode just in org-mode buffers in Emacs?
 If so, can someone include in in [[info:org#Conflicts]]?

 (I'm using Org 8.2.5c on Emacs 24.3.50.)

See http://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg00866.html.

It shows this is not the only key binding stolen by Org mode.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [babel] shell does not unquote

2014-02-06 Thread Samuel Wales
hi eric,

say you want to list 2 files: 1 space and nospace.

#+call: list(how=\1 space\ nospace)

#+name: list
#+BEGIN_SRC sh :noweb yes :results verbatim output
  {
  # this fails
  # ls $how
  # this would work, if there were a call option to support it
  # ls how
  } 21
  :
#+END_SRC

is there?



Re: [O] Feature request: filling of long captions

2014-02-06 Thread Bastien
Hi Andreas,

Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Would it be possible to have filling of captions?

I guess so.

 Ideally that would mean at least two things: auto-fill and M-q
 working on long captions.

Yes.

Could you list other options that are good candidates for such
auto-filling fonctionality?  We'd better implement them all at
once.

Thanks,

-- 
 Bastien



Re: [O] Auto-refreshing rendered images from org-babel

2014-02-06 Thread Bastien
E Sabof esa...@gmail.com writes:

 Thanks. I've changed it to the version below, which covers my needs.

Thanks.  Why is it more useful than

(add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images)

?

-- 
 Bastien



Re: [O] Bug: shift-enter in org tables leaves cursor in wrong position [8.2.5h (8.2.5h-6-g8e1386-elpa @ /cygdrive/c/Users/jason/.emacs.d/elpa/org-20140203/)]

2014-02-06 Thread Bastien
Hi Jason,

Jason Lewis ja...@dickson.st writes:

 when using the Shift-enter feature in a table to copy values down, it
 fails to place the cursor where you expect it to if the previous column
 has a fixed width and the contents of the cell is truncated.

Fixed in maint, thanks for reporting this!

-- 
 Bastien



Re: [O] Auto-refreshing rendered images from org-babel

2014-02-06 Thread E Sabof
Bastien b...@gnu.org writes:

 Thanks.  Why is it more useful than

 (add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images)

 ?

It's more targeted -- I don't use dot that often, and I'd rather not have an 
additional side effect when executing any org-babel snippet.

Evgeni



Re: [O] Auto-refreshing rendered images from org-babel

2014-02-06 Thread Bastien
E Sabof esa...@gmail.com writes:

 It's more targeted -- I don't use dot that often, and I'd rather not
 have an additional side effect when executing any org-babel snippet.

Ok, thanks.  I'd rather have ob-dot.el and friends have their own
hooks (e.g. org-babel-execute:dot-hook).  But I'm not yet convince,
as `org-redisplay-inline-images' is already bound to `C-c C-x C-M-v'.

-- 
 Bastien



[O] Latex Export Difficulties

2014-02-06 Thread Samuel Schaumburg

Hello,

I am facing difficulties during org-Latex Export

When I write outlines to scientific Texts I often have headlines, that
are followed by a footnote, providing easy reference to the Text I am
currently studying.

Example:


* Some Headline[fn:2]


When I want to export my notes for printing, the Texbuffer has something
like this:

\section{Some Headline\footnote{S. 45}}

Here comes the trouble: Auctex (with Texlive installed) normally does
not compile this and throws a bunch of errors at me.

What I learned from my research is that the line has to look like this,
so that I can compile:

\section{Some Headline \protect\footnote{S. 45}}

This case is quite typicall for me and leads to often manually reworking
the tex buffer for quite a while, which is not very convenient.

Is there any way I can set up the org latex export to do this
automatically. Would greatly help my workflow. I am quite a newbie to
emacs-lisp, so I cannot think of how to do this. Maybe someone can help
me here

Thanks in advance
Samuel



Re: [O] Auto-refreshing rendered images from org-babel

2014-02-06 Thread E Sabof

Bastien b...@altern.org writes:

 Ok, thanks.  I'd rather have ob-dot.el and friends have their own
 hooks (e.g. org-babel-execute:dot-hook).  But I'm not yet convince,
 as `org-redisplay-inline-images' is already bound to `C-c C-x C-M-v'.

I'm not a heavy babel user, but maybe something like this could be run from 
each time babel evaluates a block. A person wanting to run code for one 
language, but not another seems reasonable.

(let* ((language (the-language-being-executed)))
  (run-hooks (intern (format org-babel-execute:%s-hook language

Alternatively a variable similar to org-babel-last-executed-language could be 
set before the existing hook runs, and customizations could be made from there.

Evgeni



Re: [O] Auto-refreshing rendered images from org-babel

2014-02-06 Thread Rainer M Krug


On 02/06/14, 10:39 , E Sabof wrote:
 
 Bastien b...@altern.org writes:
 
 Ok, thanks.  I'd rather have ob-dot.el and friends have their own 
 hooks (e.g. org-babel-execute:dot-hook).  But I'm not yet
 convince, as `org-redisplay-inline-images' is already bound to `C-c
 C-x C-M-v'.
 
 I'm not a heavy babel user, but maybe something like this could be
 run from each time babel evaluates a block. A person wanting to run
 code for one language, but not another seems reasonable.
 
 (let* ((language (the-language-being-executed))) (run-hooks (intern
 (format org-babel-execute:%s-hook language
 
 Alternatively a variable similar to org-babel-last-executed-language
 could be set before the existing hook runs, and customizations could
 be made from there.

I would go one step further - the possibility to define
org-babel-after-execute-hook as a header argument. This would make it
possible to refresh the inline images only after certain blocks are
executed and not after others.

Cheers,

Rainer

 
 Evgeni
 

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug



signature.asc
Description: OpenPGP digital signature


Re: [O] Auto-refreshing rendered images from org-babel

2014-02-06 Thread Bastien
Rainer M Krug rai...@krugs.de writes:

 I would go one step further - the possibility to define
 org-babel-after-execute-hook as a header argument. This would make it
 possible to refresh the inline images only after certain blocks are
 executed and not after others.

Well, I'm a bit reluctant to go in this directions... this is more
code, while I guess the real problem was that nobody knew C-c C-x C-M-v.

-- 
 Bastien



Re: [O] Auto-refreshing rendered images from org-babel

2014-02-06 Thread Rainer M Krug


On 02/06/14, 10:52 , Bastien wrote:
 Rainer M Krug rai...@krugs.de writes:
 
 I would go one step further - the possibility to define
 org-babel-after-execute-hook as a header argument. This would make it
 possible to refresh the inline images only after certain blocks are
 executed and not after others.
 
 Well, I'm a bit reluctant to go in this directions... this is more
 code, while I guess the real problem was that nobody knew C-c C-x C-M-v.

True - but the per code block hooks would open many possibilities, e.g.
automated conversions, automatic uploads, post-process created files via
a script, etc.


Rainer

 

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug



signature.asc
Description: OpenPGP digital signature


[O] Display and sort by property in agenda?

2014-02-06 Thread Fredrik
Is there any way to display a custom property in the agenda? And is it 
possible to sort by that custom property?
So that if I have items looking like this I can show the property SORT 
in an agenda and sort by it?


* test 1
  :PROPERTIES:
  :SORT: 2
  :END:

* test 2
  :PROPERTIES:
  :SORT: 1
  :END:


Regards,

Fredrik



[O] Bug: #+STARTUP: content shows text as well as headlines [8.2.5h (8.2.5h-elpa @ ~/.emacs.d/elpa/org/)

2014-02-06 Thread Paul Stansell
Hi,

Opening an org file containing the line

  #+STARTUP: content

shows the text and headlines.

This STARTUP line used to cause an org file to open showing just the
section headlines (like a contents page). According to the
documentation at
http://orgmode.org/manual/In_002dbuffer-settings.html, it still
should.

I've attached a simple org file as an example.

Thanks,

Paul


Your bug report will be posted to the Org-mode mailing list.


Emacs  : GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.9)
 of 2012-09-21 on CRMDA020L
Package: Org-mode version 8.2.5h (8.2.5h-elpa @ /Home/ps/.emacs.d/elpa/org/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook org-show-block-all
append local]
   5]
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
  org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )

* First header

  Some text

** First subheader

   Some more text

* Second header

  Some text

** Second subheader

   Some more text

#+STARTUP: content ; all headlines
;#+STARTUP: showall ; no folding of any entries


Re: [O] Display and sort by property in agenda?

2014-02-06 Thread Bastien
Fredrik fred...@jumans.net writes:

 Is there any way to display a custom property in the agenda?

Yes, through the column view.

 And is it
 possible to sort by that custom property?

See

C-h v org-agenda-sorting-strategy RET
C-h v org-agenda-cmp-user-defined RET

 So that if I have items looking like this I can show the property SORT
 in an agenda and sort by it?

 * test 1
   :PROPERTIES:
   :SORT: 2
   :END:

 * test 2
   :PROPERTIES:
   :SORT: 1
   :END:

(From experience, this kind of hardcoding of the sort level will not
work for long, it is not really scalable.)

-- 
 Bastien



Re: [O] Feature request: filling of long captions

2014-02-06 Thread Andreas Leha
Hi Bastien,

Bastien b...@gnu.org writes:

 Hi Andreas,

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Would it be possible to have filling of captions?

 I guess so.


Thanks for the good news!  Now I am waiting for christmas ;-)

 Ideally that would mean at least two things: auto-fill and M-q
 working on long captions.

 Yes.

 Could you list other options that are good candidates for such
 auto-filling fonctionality?  We'd better implement them all at
 once.


Do you mean (1) other places in org files (other than #+caption) or
(2) other functionality that should be supported at #+caption filling?

If (2) than the only other functionality that comes to my mind is M-^
(delete-indentation), which could remove the #+caption on joining with
the previous line.

If (1) than I can't think of anything too obvious.  Other candidates
such as '#+header[s]:' or '#+latex_header[_extra]:' might benefit from
some level of additional support, but autofill is not suitable here.

Regards,
Andreas




Re: [O] Auto-refreshing rendered images from org-babel

2014-02-06 Thread Bastien
Rainer M Krug rai...@krugs.de writes:

 True - but the per code block hooks would open many possibilities, e.g.
 automated conversions, automatic uploads, post-process created files via
 a script, etc.

So, being as conservative as core maintainers tend to become, I'll
wait for a real use-case for a real need to be expressed here :)

-- 
 Bastien



Re: [O] Auto-refreshing rendered images from org-babel

2014-02-06 Thread Rainer M Krug


On 02/06/14, 11:22 , Bastien wrote:
 Rainer M Krug rai...@krugs.de writes:
 
 True - but the per code block hooks would open many possibilities, e.g.
 automated conversions, automatic uploads, post-process created files via
 a script, etc.
 
 So, being as conservative as core maintainers tend to become, I'll
 wait for a real use-case for a real need to be expressed here :)

Good approach.

Cheers,

Rainer

 

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug



signature.asc
Description: OpenPGP digital signature


Re: [O] semantic-mode is conflict with org-mode

2014-02-06 Thread Vladimir Lomov
Hello,
** Sebastien Vauban [2014-02-06 09:21:43 +0100]:

 Xue Fuqiao wrote:
 semantic-mode uses `C-c ,' as a prefix for several commands.  org-mode uses
 `C-c ,' for org-priority.  I don't use semantic-mode within org-mode.  Is
 there a way to disable semantic-mode just in org-mode buffers in Emacs?
 If so, can someone include in in [[info:org#Conflicts]]?

 (I'm using Org 8.2.5c on Emacs 24.3.50.)

 See http://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg00866.html.

 It shows this is not the only key binding stolen by Org mode.

On contrary, semantic-mode is minor mode so it hides `C-c ,' binded by
Org mode (that it shouldn't do, that thread is about that).

 Best regards,
   Seb

---
WBR, Vladimir Lomov

-- 
The first version always gets thrown away.



Re: [O] semantic-mode is conflict with org-mode

2014-02-06 Thread Bastien
Vladimir Lomov lomov...@gmail.com writes:

 On contrary, semantic-mode is minor mode so it hides `C-c ,' binded by
 Org mode (that it shouldn't do, that thread is about that).

Yes.  This calls for a solution in maint.  I'll look into this.

-- 
 Bastien



Re: [O] Feature request: filling of long captions

2014-02-06 Thread Bastien
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Do you mean (1) other places in org files (other than #+caption) or
 (2) other functionality that should be supported at #+caption
 filling?

Normally lines matching the regexp ^#\+\S-+ (like #+CAPTION) should
not be filled.  We would introduce an exception where successive
#+CAPTION lines are correctly parsed by Org -- so the question is
how many of such options should fill like #+CAPTION will do (maybe
before Christmas.)

-- 
 Bastien



Re: [O] Bug: #+STARTUP: content shows text as well as headlines [8.2.5h (8.2.5h-elpa @ ~/.emacs.d/elpa/org/)

2014-02-06 Thread Bastien
Paul Stansell paulstans...@gmail.com writes:

 Opening an org file containing the line

   #+STARTUP: content

 shows the text and headlines.

Er, true.

Can anyone else reproduce and try to bisect?

I'll be off from now until monday, so asking this in hope
we will know enough by then.

Thanks!

-- 
 Bastien



Re: [O] Feature request: filling of long captions

2014-02-06 Thread Andreas Leha
Hi Bastien,

Bastien b...@gnu.org writes:

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Do you mean (1) other places in org files (other than #+caption) or
 (2) other functionality that should be supported at #+caption
 filling?

 Normally lines matching the regexp ^#\+\S-+ (like #+CAPTION) should
 not be filled.  We would introduce an exception where successive
 #+CAPTION lines are correctly parsed by Org -- so the question is
 how many of such options should fill like #+CAPTION will do (maybe
 before Christmas.)

Well, I am not sure that I understand this.  #+CAPTION lines are IMO
parsed correctly by Org -- just the filling is missing.

I do not (at the moment) see other 'options' like #+CAPTION that are
missing auto-fill capabilities.

Regards,
Andreas




Re: [O] Quotes for LaTeX export

2014-02-06 Thread Michael Strey
Hi Laurens,

_...@lvh.io writes:

[...]

 The preferred way to do that these days is, in the preamble:

 \usepackage{csquotes}

 ... and then later:

 \enquote{something}

 I think it would make sense to support this for org, and perhaps eventually
 make it default behavior. FWIW: I had no idea about this until it bit me
 when my LaTeX document suddenly had bogus quotes in it.

IMHO, it would be nice to have a customizable
org-export-user-smart-quote-alist as already mentioned by Rasmus.  This
would give the maximal flexibility to comply with this wish and similar wishes.

BUT in this concrete case, the problem can be tackled from the LaTeX
side as well.  Section 10.8 of the documentation of the csquote package
shows a way for documents with only one language:

\documentclass{...}
\usepackage[german]{babel}
\usepackage[babel=once]{csquotes}
\defineshorthand{`}{\openautoquote}
\defineshorthand{'}{\closeautoquote}

Best regards
-- 
Michael Strey
http://www.strey.biz




Re: [O] Bug: #+STARTUP: content shows text as well as headlines [8.2.5h (8.2.5h-elpa @ ~/.emacs.d/elpa/org/)

2014-02-06 Thread Bastien
Bastien b...@gnu.org writes:

 Can anyone else reproduce and try to bisect?

Well, it should be fixed.  Please test and report.

Thanks!

-- 
 Bastien



Re: [O] Feature request: filling of long captions

2014-02-06 Thread Thomas Holst
Hi,

· Andreas Leha andreas.l...@med.uni-goettingen.de wrote:

 Hi Bastien,

 Bastien b...@gnu.org writes:

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Do you mean (1) other places in org files (other than #+caption) or
 (2) other functionality that should be supported at #+caption
 filling?

 Normally lines matching the regexp ^#\+\S-+ (like #+CAPTION) should
 not be filled.  We would introduce an exception where successive
 #+CAPTION lines are correctly parsed by Org -- so the question is
 how many of such options should fill like #+CAPTION will do (maybe
 before Christmas.)

 Well, I am not sure that I understand this.  #+CAPTION lines are IMO
 parsed correctly by Org -- just the filling is missing.

 I do not (at the moment) see other 'options' like #+CAPTION that are
 missing auto-fill capabilities.

what about #+HEADER: for source code blocks. Filling might be difficult since
I don't know if something like:

#+HEADER: :var foo=
#+HEADER: bar

is handled correctly by babel parser.

The same holds true for #+ATTR_LATEX:
-- 
Mit freundlichen Grüßen / Best regards 

Thomas Holst 
DGS-EC/ESE4

Tel.   +49 (711) 811-40681
PC-Fax +49 (711) 811-5182208



[O] Bug: ob-clojure tangling does not handle comments correctly [8.2.5h (8.2.5h-6-g8e1386-elpa @ /usr/local/Cellar/emacs/HEAD/share/emacs/24.3.50/lisp/org/)]

2014-02-06 Thread Lee Hinman
When tangling a block like:

#+BEGIN_SRC clojure :tangle foo.clj
(println foo)
;; My comment
#+END_SRC

The tangled code looks like:

(let [org-mode-print-catcher (java.io.StringWriter.)]
(clojure.pprint/with-pprint-dispatch clojure.pprint/code-dispatch
(clojure.pprint/pprint (do (println foo)
;; My comment) org-mode-print-catcher) (str org-mode-print-catcher)))

Which is invalid because of the commented line (commenting out more than
intended). There needs to be an extra newline after the tangled
content/comment.


Emacs  : GNU Emacs 24.3.50.1 (x86_64-apple-darwin13.0.0, NS
apple-appkit-1265.00)
 of 2013-12-26 on Xanadu.local
Package: Org-mode version 8.2.5h (8.2.5h-6-g8e1386-elpa @
/usr/local/Cellar/emacs/HEAD/share/emacs/24.3.50/lisp/org/)

current state:
==
(setq
 org-export-backends '(ascii html icalendar latex md)
 org-export-babel-evaluate nil
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-agenda-diary-file ~/diary
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-imenu-depth 3
 org-agenda-start-on-weekday nil
 org-confirm-shell-link-function 'yes-or-no-p
 org-agenda-sticky t
 org-agenda-custom-commands '((N Notes tags NOTE
   ((org-agenda-overriding-header Notes)
(org-tags-match-list-sublevels t))
   )
  (h Habits tags-todo STYLE=\habit\
   ((org-agenda-overriding-header Habits)
(org-agenda-sorting-strategy
 (quote (todo-state-down effort-up
category-keep)))
)
   )
  (  Agenda
   ((agenda  nil)
(tags REFILE
 ((org-agenda-overriding-header Tasks
to Refile)
  (org-tags-match-list-sublevels nil))
 )
(tags-todo -CANCELLED/!
 ((org-agenda-overriding-header Stuck
Projects)
  (org-agenda-skip-function (quote
bh/skip-non-stuck-projects))
  (org-agenda-sorting-strategy
   (quote (priority-down category-keep)))
  )
 )
(tags-todo -HOLD-CANCELLED/!
 ((org-agenda-overriding-header Projects)
  (org-agenda-skip-function (quote
bh/skip-non-projects))
  (org-agenda-sorting-strategy
   (quote (priority-down category-keep)))
  )
 )
(tags-todo -CANCELLED/!NEXT
 ((org-agenda-overriding-header Project
Next Tasks)
  (org-agenda-skip-function
   (quote
bh/skip-projects-and-habits-and-single-tasks))
  (org-tags-match-list-sublevels t)
  (org-agenda-todo-ignore-scheduled
   bh/hide-scheduled-and-waiting-next-tasks)
  (org-agenda-todo-ignore-deadlines
   bh/hide-scheduled-and-waiting-next-tasks)
  (org-agenda-todo-ignore-with-date
   bh/hide-scheduled-and-waiting-next-tasks)
  (org-agenda-sorting-strategy
   (quote (priority-down todo-state-down
effort-up category-keep)))
  )
 )
(tags-todo -REFILE-CANCELLED-WAITING/!
 ((org-agenda-overriding-header
   (if (marker-buffer
org-agenda-restrict-begin)
Project Subtasks Standalone Tasks)
   )
  (org-agenda-skip-function (quote
bh/skip-project-tasks-maybe))
  (org-agenda-todo-ignore-scheduled
   bh/hide-scheduled-and-waiting-next-tasks)
  (org-agenda-todo-ignore-deadlines
   bh/hide-scheduled-and-waiting-next-tasks)
  (org-agenda-todo-ignore-with-date
   

Re: [O] Auto-refreshing rendered images from org-babel

2014-02-06 Thread Eric S Fraga
Rainer M Krug rai...@krugs.de writes:
 I would go one step further - the possibility to define
 org-babel-after-execute-hook as a header argument. This would make it
 possible to refresh the inline images only after certain blocks are
 executed and not after others.

Doesn't the :post header argument give you this functionality, sort of?
You could link to an emacs lisp src block which does what you want...

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.2.5h-585-g5f0ca0




Re: [O] Latex Export Difficulties

2014-02-06 Thread Eric S Fraga
Samuel Schaumburg eagleeye...@hotmail.de writes:

[...]

 What I learned from my research is that the line has to look like this,
 so that I can compile:

 \section{Some Headline \protect\footnote{S. 45}}

 This case is quite typicall for me and leads to often manually reworking
 the tex buffer for quite a while, which is not very convenient.

 Is there any way I can set up the org latex export to do this
 automatically. Would greatly help my workflow. I am quite a newbie to
 emacs-lisp, so I cannot think of how to do this. Maybe someone can help
 me here

Not an org solution per se but you could redefine \footnote to do what
you want.  The example below/attached seems to work.  I have no idea if
it breaks the usage of footnote in other places, mind you.

* Testing redefinition of footnote
#+latex: \let\origfootnote\footnote
#+latex: \renewcommand{\footnote}{\protect\origfootnote}
** Subheading [fn:1: Which has a very interesting footnote]
This is some really boring text because all the interesting stuff is in the footnote.

HTH,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.2.5h-585-g5f0ca0


Re: [O] Latex Export Difficulties

2014-02-06 Thread Rasmus
Eric S Fraga e.fr...@ucl.ac.uk writes:

 Samuel Schaumburg eagleeye...@hotmail.de writes:

 [...]

 What I learned from my research is that the line has to look like this,
 so that I can compile:

 \section{Some Headline \protect\footnote{S. 45}}

 This case is quite typicall for me and leads to often manually reworking
 the tex buffer for quite a while, which is not very convenient.

 Is there any way I can set up the org latex export to do this
 automatically. Would greatly help my workflow. I am quite a newbie to
 emacs-lisp, so I cannot think of how to do this. Maybe someone can help
 me here

 Not an org solution per se but you could redefine \footnote to do what
 you want.  The example below/attached seems to work.  I have no idea if
 it breaks the usage of footnote in other places, mind you.

 * Testing redefinition of footnote
 #+latex: \let\origfootnote\footnote
 #+latex: \renewcommand{\footnote}{\protect\origfootnote}
 ** Subheading [fn:1: Which has a very interesting footnote]
 This is some really boring text because all the interesting stuff is in the 
 footnote.

Try to add a TOC to this document.  It's probably not what you want. 

Another LaTeX hack would be to do something like:

   \def\myhead{My heading}
   \section[\myhead]{\myhead\footnote{My foot}}

This is such an awkward construct that it should probably just
relegated to a filter.

–Rasmus

-- 
May contains speling mistake



[O] intra links and worg

2014-02-06 Thread Alan Schmitt
Hello,

I'm proof reading the ox-koma-letter tutorial on worg
(http://orgmode.org/worg/exporters/koma-letter-export.html) and I notice
that links inside the file are not exported as links, but as italics.
For instance,

--8---cut here---start-8---
1. using Org option lines, as show in the 
[[*A%20simple%20letter%20example][simple letter example]] above,
--8---cut here---end---8---

is exported as

--8---cut here---start-8---
liusing Org option lines, as show in the isimple letter example/i above,
/li
--8---cut here---end---8---

Do we need to do something differently for such intra links?

Thanks,

Alan



Re: [O] mis-alignment in org-tables with Tibetan characters

2014-02-06 Thread Michael Brand
Hi Steffan

On Wed, Feb 5, 2014 at 6:35 AM, Michael Brand
michael.ch.br...@gmail.com wrote:
 Is there any font that is monospaced even in the Tibetan range at all?

On one of my trips of learning more about unicode I just discovered
the monospaced bitmap font GNU Unifont [1] [2] which implements most
of (!) the range U+ to U+ and should be ok for a whole lot of
tests. See PNG image of e. g. version 6.3.20131006 [3]. The unicode
script Tibetan you need starts at 0F00.

Michael

[1] http://en.wikipedia.org/wiki/GNU_Unifont
[2] http://unifoundry.com/unifont.html
[3] http://upload.wikimedia.org/wikipedia/commons/e/e3/Unifont-6.3.20131006.png



Re: [O] Auto-refreshing rendered images from org-babel

2014-02-06 Thread Rainer M Krug


On 02/06/14, 13:22 , Eric S Fraga wrote:
 Rainer M Krug rai...@krugs.de writes:
 I would go one step further - the possibility to define
 org-babel-after-execute-hook as a header argument. This would make it
 possible to refresh the inline images only after certain blocks are
 executed and not after others.
 
 Doesn't the :post header argument give you this functionality, sort of?
 You could link to an emacs lisp src block which does what you want...

Didn't know about this one - thanks for pointing it out. As I see it, it
would not only work sort of but exactly.

Rainer

 

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug



signature.asc
Description: OpenPGP digital signature


Re: [O] Latex Export Difficulties

2014-02-06 Thread Eric S Fraga
Rasmus ras...@gmx.us writes:

[...]

 Try to add a TOC to this document.  It's probably not what you want. 

Indeed.  But some would argue that footnotes in headings is not what you
want in the first place... ;-)

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.2.5h-585-g5f0ca0




Re: [O] Latex Export Difficulties

2014-02-06 Thread Florian Beck

On 06.02.2014 10:20, Samuel Schaumburg wrote:

\section{Some Headline\footnote{S. 45}}


This is what the footmisc package is for. So use

#+LaTeX_HEADER: \usepackage[stable]{footmisc}

or add it to your default packages.


\section{Some Headline \protect\footnote{S. 45}}


If you really want this, have a look at
`org-export-filter-footnote-reference-functions'.

--
Florian Beck



Re: [O] intra links and worg

2014-02-06 Thread Bastien
Hi Alan,

if you can, please test this quick patch.

All tests pass fine but it's not the definitive patch as there
are other issues in this areas we need to check first.  But
tests will help, as always.

Thanks!

diff --git a/lisp/org.el b/lisp/org.el
index 27aeccb..50fa5ce 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9834,17 +9834,18 @@ If optional argument MERGE is set, merge TABLE into
 	  (setq table (cons defchr table org-link-escape-chars))
((null table)
 (setq table org-link-escape-chars)))
-  (mapconcat
-   (lambda (char)
- (if (or (member char table)
-	 (and (or ( char 32) (= char ?\%) ( char 126))
-		  org-url-hexify-p))
-	 (mapconcat (lambda (sequence-element)
-		  (format %%%.2X sequence-element))
-		(or (encode-coding-char char 'utf-8)
-			(error Unable to percent escape character: %s
-			   (char-to-string char))) )
-   (char-to-string char))) text ))
+  (if (string-match ^\*[[:alnum:]]+ text) text
+(mapconcat
+ (lambda (char)
+   (if (or (member char table)
+	   (and (or ( char 32) (= char ?\%) ( char 126))
+		org-url-hexify-p))
+	   (mapconcat (lambda (sequence-element)
+			(format %%%.2X sequence-element))
+		  (or (encode-coding-char char 'utf-8)
+			  (error Unable to percent escape character: %s
+ (char-to-string char))) )
+	 (char-to-string char))) text )))
 
 (defun org-link-escape-browser (text)
   (if (org-string-match-p

-- 
 Bastien


Re: [O] Bug: ob-clojure tangling does not handle comments correctly [8.2.5h (8.2.5h-6-g8e1386-elpa @ /usr/local/Cellar/emacs/HEAD/share/emacs/24.3.50/lisp/org/)]

2014-02-06 Thread Bastien
Hi Lee,

Lee Hinman l...@writequit.org writes:

 When tangling a block like:

 #+BEGIN_SRC clojure :tangle foo.clj
 (println foo)
 ;; My comment
 #+END_SRC

 The tangled code looks like:

 (let [org-mode-print-catcher (java.io.StringWriter.)]
 (clojure.pprint/with-pprint-dispatch clojure.pprint/code-dispatch
 (clojure.pprint/pprint (do (println foo)
 ;; My comment) org-mode-print-catcher) (str org-mode-print-catcher)))

 Which is invalid because of the commented line (commenting out more than
 intended). There needs to be an extra newline after the tangled
 content/comment.

Can you try with latest ob-clojure.el from the master branch?
We fixed a few things recently, and the example works fine for
me.

Thanks!

-- 
 Bastien



Re: [O] Bug: ob-clojure tangling does not handle comments correctly [8.2.5h (8.2.5h-6-g8e1386-elpa @ /usr/local/Cellar/emacs/HEAD/share/emacs/24.3.50/lisp/org/)]

2014-02-06 Thread Lee Hinman
On 2/6/14, 9:32 AM, Bastien wrote:
 Can you try with latest ob-clojure.el from the master branch?
 We fixed a few things recently, and the example works fine for
 me.

I tried it running from git (org-version returns Org-mode version
8.2.3a (release_8.2.3a @ /Users/hinmanm/src/elisp/org-mode/lisp/))

I'm still getting it tangled as

(let [org-mode-print-catcher (java.io.StringWriter.)]
(clojure.pprint/with-pprint-dispatch clojure.pprint/code-dispatch
(clojure.pprint/pprint (do (println foo)
;; My comment) org-mode-print-catcher) (str org-mode-print-catcher)))

I did some bisecting on my dotfiles and determined it was caused by this
line:

(setq org-babel-default-header-args
  (cons '(:results . code)
(assq-delete-all :results org-babel-default-header-args)))


Which seems very strange to me, once I comment out that line the text is
tangled as just

(println foo)
;; My comment




Re: [O] Feature request: filling of long captions

2014-02-06 Thread Scott Randby
On Thu, Feb 6, 2014 at 3:43 AM, Bastien b...@gnu.org wrote:
 Hi Andreas,

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Would it be possible to have filling of captions?

 I guess so.

 Ideally that would mean at least two things: auto-fill and M-q
 working on long captions.

 Yes.

 Could you list other options that are good candidates for such
 auto-filling fonctionality?  We'd better implement them all at
 once.

Filling of table formulas would be nice.

Scott Randby


 Thanks,

 --
  Bastien




Re: [O] [RFC] Make QUOTE an export keyword instead of an element type

2014-02-06 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

 I don't think we should prevent users to convert a headline into a
 fixed-width line.

True. I also allowed to turn one-line elements (keywords, clock,
planning) into fixed-width areas.

 Also, better to use the IGNORE-INVISIBLE arg of
 org-move-to-column IMO.

Done.

 Otherwise works fine, thanks!

Applied in master, with tests.


Regards,

-- 
Nicolas Goaziou



Re: [O] intra links and worg

2014-02-06 Thread Alan Schmitt
Hi Bastien,

Bastien b...@gnu.org writes:

 Hi Alan,

 if you can, please test this quick patch.

 All tests pass fine but it's not the definitive patch as there
 are other issues in this areas we need to check first.  But
 tests will help, as always.

I tried it and it does not change anything on worg. It works on a simple
test file, but I'm wondering if some file specific options for worg may
change this. Here is the header with which I'm trying this:

--8---cut here---start-8---
#+OPTIONS:H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t 
LaTeX:t skip:nil d:(HIDE) tags:not-in-toc todo:nil
#+STARTUP:align fold nodlcheck hidestars oddeven lognotestate
#+SEQ_TODO:   TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
#+TAGS:   Write(w) Update(u) Fix(f) Check(c)
#+TITLE:  Creating letters with KOMA-Script =scrlttr2= and Org-mode
#+AUTHOR: Viktor Rosenfeld and Rasmus Pank Roulund
#+EMAIL:  v.rosenf...@gmx.de
#+LANGUAGE:   en
#+PRIORITIES: A C B
#+CATEGORY:   worg
--8---cut here---end---8---

Thanks,

Alan



Re: [O] [babel] shell does not unquote

2014-02-06 Thread Eric Schulte
Samuel Wales samolog...@gmail.com writes:

 hi eric,

 say you want to list 2 files: 1 space and nospace.

 #+call: list(how=\1 space\ nospace)

 #+name: list
 #+BEGIN_SRC sh :noweb yes :results verbatim output
   {
   # this fails
   # ls $how
   # this would work, if there were a call option to support it
   # ls how
   } 21
   :
 #+END_SRC

 is there?

You can't mix noweb and variable calling.  You could pass the files in
using either of the following techniques.

#+name: files-tab
| with space |
| nospace|

#+name: files-ex
: with space
: nospace

#+name: list
#+begin_src sh :var files= :results verbatim
IFS=

for file in $files;do
  echo -|$file|-
done
#+end_src

#+call: list(files-tab)

#+RESULTS:
: -|with space|-
: -|nospace|-

#+call: list(files-ex)

#+RESULTS:
: -|with space|-
: -|nospace|-

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



Re: [O] [babel] buffer corruption if results block at end of entry

2014-02-06 Thread Eric Schulte
I just pushed up a fix.  Thanks for reporting.

Samuel Wales samolog...@gmail.com writes:

 ===
 * asdf
 #+BEGIN_SRC org :results verbatim output :noweb yes :noweb-ref whatever2
   a
 #+END_SRC
 #+BEGIN_SRC sh :results output :noweb yes
   echo whatever2
 #+END_SRC

 #+RESULTS:
 #+begin_example
 a
 #+end_example
 * next headline
 ===

 results in this:

 ===
 * asdf
 #+BEGIN_SRC org :results verbatim output :noweb yes :noweb-ref whatever2
   a
 #+END_SRC
 #+BEGIN_SRC sh :results output :noweb yes
   echo whatever2
 #+END_SRC

 #+RESULTS:
 =a
 =* next headline
 ===

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



[O] adding rudimentary support for Coq code blocks

2014-02-06 Thread Eric Schulte
See the attached example file.  This is very rudimentary, only
supporting session evaluation and without support for smart translation
between Org-mode and Coq data structures.

See the attached example file.

Coq http://coq.inria.fr/

1. Require supporting libraries.
   #+begin_src coq
 Require Import Bool.
 Require Import Arith.
 Require Import List.
   #+end_src

   #+RESULTS:
   : 

2. Simple function.
   #+begin_src coq
   (* Check if a list is sorted *)
   Fixpoint sortp (l : list nat) := match l with
   a :: b :: rst = if leb a b then sortp rst else false
 | a :: nil = true
 | nil = true
   end
   #+end_src

   #+RESULTS:
   : sortp is recursively defined (decreasing on 1st argument)
   : 

3. Run the above function.
   #+begin_src coq
 Eval compute in sortp (1::2::3::nil)
   #+end_src

   #+RESULTS:
   :  = true
   :  : bool
   : 

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


Re: [O] intra links and worg

2014-02-06 Thread Bastien
Hi Alan,

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

 I tried it and it does not change anything on worg.

The purpose of the patch is so that C-c C-l on a headline
will then insert a link without escaping whitespaces:

* Headline with whitespaces

[[*Headline with whitespaces][Headline with whitespaces]]

Whereas now it does this:

* Headline with whitespaces

[[*Headline%20with%20whitespaces][Headline with whitespaces]]

So if Worg pages contain escaped sequences, they will be exported
with italics.

-- 
 Bastien



[O] org in the wild update

2014-02-06 Thread John Kitchin
Hi everyone,

Our fourth scientific paper that was prepared with org-mode has been
accepted!  Each of these files has freely available supporting information
files created from org-mode with the org-source embedded in them. At the
end of these files are the directions for how we exported the pdf file out
of them. It has been pretty fun writing these papers, and we are at a point
now where all new papers are written this way in my group. Below are some
of the (org-relevant) features in each paper. Anyway, I want to thank
everyone who contributes to org-mode development. It has fundamentally
changed how we write our papers. Best wishes,

1. This paper has an embedded json file that contains all the data in the
paper and the details of the calculations we did.

Mehta, Prateek; Salvador, Paul; Kitchin, John, *Identifying Potential BO2
Oxide Polymorphs for Epitaxial Growth Candidates*, ACS Applied Materials
and Interfaces, accepted 1/27/2014.
http://pubs.acs.org/doi/full/10.1021/am4059149.



2. In this SI, there are tables in the embedded org-file that were used for
analysis, but not printed in the SI file because they were too long.


Spencer D. Miller, Vladimir V. Pushkarev, Andrew J. Gellman and John R.
Kitchin, *Simulating Temperature Programmed Desorption of Oxygen on Pt(111)
Using DFT Derived Coverage Dependent Desorption Barriers*, Topics In
Catalysis, 57(1), 106-117 (2013).
http://link.springer.com/article/10.1007%2Fs11244-013-0166-3


3. this paper contains the code developed for running these calculations.


Zhongnan Xu and John R Kitchin, *Relating the Electronic Structure and
Reactivity of the 3d Transition Metal Monoxide Surfaces*, Catalysis
Communications, Accepted Oct 2013.
http://dx.doi.org/10.1016/j.catcom.2013.10.028



4. This paper has embedded Excel sheets in the SI, which contain data used
in the paper.


Alex Hallenbeck and John R. Kitchin, *Effects of O2 and SO2 on the Capture
Capacity of a Primary-Amine Based Polymeric CO2 Sorbent*, IECR, 52 (31),
10788-10794 (2013). http://dx.doi.org/10.1021/ie400582a.



John

---
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu


Re: [O] Bug: ob-clojure tangling does not handle comments correctly [8.2.5h (8.2.5h-6-g8e1386-elpa @ /usr/local/Cellar/emacs/HEAD/share/emacs/24.3.50/lisp/org/)]

2014-02-06 Thread Bastien
Lee Hinman l...@writequit.org writes:

 I tried it running from git (org-version returns Org-mode version
 8.2.3a (release_8.2.3a @ /Users/hinmanm/src/elisp/org-mode/lisp/))

Latest release is 8.2.5h, later than the one reported.

 (setq org-babel-default-header-args
   (cons '(:results . code)
 (assq-delete-all :results org-babel-default-header-args)))


 Which seems very strange to me, once I comment out that line the text is
 tangled as just

 (println foo)
 ;; My comment

Okay, so this is in your config.  Maybe try latest Org to see if you
can keep your config?

-- 
 Bastien



Re: [O] [RFC] Make QUOTE an export keyword instead of an element type

2014-02-06 Thread Bastien
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 True. I also allowed to turn one-line elements (keywords, clock,
 planning) into fixed-width areas.

I see that turning a commented line is prevented, while turning
several commented lines is allowed.  This feels weird.  I don't
think we should prevent this.

What do you think?

 Applied in master, with tests.

Thanks for applying the patch.

-- 
 Bastien



Re: [O] Feature request: filling of long captions

2014-02-06 Thread Andrea Rossetti

Hello Bastien and everyone reading,

Bastien b...@gnu.org writes:
 Could you list other options that are good candidates for such
 auto-filling fonctionality?  We'd better implement them all at
 once.

  I'd suggest to split the wish-list in two buckets, i.e. 

1) some #+... commands would benefit of a line-continuation
mechanism (like the backslash at EOL in a multilined C/C++
#define macro)

2) some line-continuation-aware #+... commands (thanks to
implementations for step 1) would benefit of auto-filling

  To me #+TBLFM seems to fit into bucket 1, #+CAPTION into
bucket 2. My Christmas wish is #+MACRO into bucket 1.

  Kindest regards,

  Andrea



[O] Make Org-Babel keyword lowercase

2014-02-06 Thread Thorsten Jolitz

Hi List, 

I have this in my init-file:

,---
| ;; Make babel results blocks lowercase
| (setq org-babel-results-keyword results)
`---

and would like to insert _all_ babel block-keywords in lowercase
(#+begin_src instead of #+BEGIN_SRC etc.), and I even remember that I
had this configuration in the past, but I can't find the related
customizations anymore.

Any hints?

-- 
cheers,
Thorsten





Re: [O] Make Org-Babel keyword lowercase

2014-02-06 Thread Andreas Leha
Hi Thorsten,

Thorsten Jolitz tjol...@gmail.com writes:

 Hi List, 

 I have this in my init-file:

 ,---
 | ;; Make babel results blocks lowercase
 | (setq org-babel-results-keyword results)
 `---

 and would like to insert _all_ babel block-keywords in lowercase
 (#+begin_src instead of #+BEGIN_SRC etc.), and I even remember that I
 had this configuration in the past, but I can't find the related
 customizations anymore.

 Any hints?


I guess you are looking for org-structure-template-alist

Regards,
Andreas




Re: [O] Make Org-Babel keyword lowercase

2014-02-06 Thread Thomas S. Dye
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi Thorsten,

 Thorsten Jolitz tjol...@gmail.com writes:

 Hi List, 

 I have this in my init-file:

 ,---
 | ;; Make babel results blocks lowercase
 | (setq org-babel-results-keyword results)
 `---

 and would like to insert _all_ babel block-keywords in lowercase
 (#+begin_src instead of #+BEGIN_SRC etc.), and I even remember that I
 had this configuration in the past, but I can't find the related
 customizations anymore.

 Any hints?


 I guess you are looking for org-structure-template-alist

 Regards,
 Andreas

This is from Bernt Hansen:

#+BEGIN_SRC emacs-lisp :tangle yes
(setq org-babel-results-keyword results)

(setq org-structure-template-alist
  (quote ((s #+begin_src ?\n\n#+end_src src lang=\?\\n\n/src)
  (e #+begin_example\n?\n#+end_example 
example\n?\n/example)
  (q #+begin_quote\n?\n#+end_quote quote\n?\n/quote)
  (v #+begin_verse\n?\n#+end_verse verse\n?\n/verse)
  (c #+begin_center\n?\n#+end_center center\n?\n/center)
  (l #+begin_latex\n?\n#+end_latex literal 
style=\latex\\n?\n/literal)
  (L #+latex:  literal style=\latex\?/literal)
  (h #+begin_html\n?\n#+end_html literal 
style=\html\\n?\n/literal)
  (H #+html:  literal style=\html\?/literal)
  (a #+begin_ascii\n?\n#+end_ascii)
  (A #+ascii: )
  (i #+index: ? #+index: ?)
  (I #+include %file ? include file=%file markup=\?\
#+END_SRC

hth,
Tom

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



Re: [O] Make Org-Babel keyword lowercase

2014-02-06 Thread Nick Dokos
Thorsten Jolitz tjol...@gmail.com writes:

 Hi List, 

 I have this in my init-file:

 ,---
 | ;; Make babel results blocks lowercase
 | (setq org-babel-results-keyword results)
 `---

 and would like to insert _all_ babel block-keywords in lowercase
 (#+begin_src instead of #+BEGIN_SRC etc.), and I even remember that I
 had this configuration in the past, but I can't find the related
 customizations anymore.

 Any hints?

I don't think that anybody is stopping you from entering these things
in lower case: just type them in in lower case. Perhaps you mean that the
easy template mechanism (s TAB etc) inserts them in upper case?
AFAIK, you'll just have to redefine the value of
org-structure-template-alist changing everything to lower case.

Nick




Re: [O] Make Org-Babel keyword lowercase

2014-02-06 Thread Thorsten Jolitz
t...@tsdye.com (Thomas S. Dye) writes:

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

Hi all, 

 I guess you are looking for org-structure-template-alist

 This is from Bernt Hansen:

thanks, thats what I was looking for (and probably borrowed from Bernt
Hansen in my last setup)

-- 
cheers,
Thorsten




Re: [O] Proposal/request for input: slidify export for html slides

2014-02-06 Thread John Hendy
An interesting update on this. Aside from some image and code block
stuff, the following works surprisingly well!
- Export Org - markdown (md)
- Start an R session and `setwd(/path/to/file.md)`
- Run `library(slidify)` and `author(deck)
- Copy the deck/assets folder into the parent directory
- Copy the header code from the resultant deck/index.Rmd file into
exported .md file
- Add three hyphens before each heading (headings are # Slide title)
- Save the file as file.Rmd (vs. file.md)
- From the R session, do `setwd(../)` (running `author(deck)`
changes the working directory to deck/
- Run `slidify(file.Rmd)`

I was coming from Beamer, so all of my generated plots are .pdfs. I
plan to create a new directory and use imagemagic to convert them all
to png or jpg, and then modify my original .org file tailored for
Beamer to use the images vs. pdfs, as well as adding #+attr_html
headings instead of the existent #+attr_latex ones in my current file.

I'll post a test file and the process if anyone is interested in replicating!

It seems that src blocks aren't *always* detected properly in the .md
file, so I need to figure out what's happening there.

I think I should be able to do a pretty easy replace-regexp to replace
[^#] (beginning of line followed by #, indicating a header) with [---
[RET] [RET] #] to automatically populate the slide divisions.

If any rough spots could be identified and tweaked, the current .md
exporter might work brilliantly to create a .Rmd file compatible with
slidify if it's of interest to folks. The boilerplate slidify text at
the beginning is simple enough to populate, and some variables could
set the framework, (io2012, deckjs, etc.), title, author, etc.


Best regards,
John


On Wed, Jan 29, 2014 at 10:26 PM, John Hendy jw.he...@gmail.com wrote:

 On Jan 29, 2014 7:46 PM, Rick Frankel r...@rickster.com wrote:

 On Thu, Jan 30, 2014 at 12:57:46AM +, Ahmadou Dicko wrote:
 I love slidify too and I think that having similar functionnality in
  org
 could be great.
 I think that you have everything to do that using the html backend,
  you
 just need to interface the right Javascript/HTML5 library.
 In slidify you can use io2012, deck.js, shower and landslide and I
  know
 that you can use deck.js through ox-deck and it will not be difficult
  to
 create and interface for other library too.
 For example if you need a nice non Beamer library you can also check
 ox-reveal which interface reveal.js.

 Just to follow-up and expand. It looks like slidy is an interface for
 Rstudio to a number of html slide (javascript) libraries, and uses
 markdown as it markup language, while providing the ability to execute
 R code interspersed with the markup (literate programming/reproducable
 results)

 Org is it's own markup language and allow interspersing executable
 code (and its output) in a literate, reproducable way
 (babel). Including, but not limited to, R.

 In addion org has export interfaces to multiple output types. For
 slideshow there are (at least):

   - ox-s5
   - ox-deck
   - ox-reveal
   - beamer

 As well as pdf, html and others.

 So it doesn't seem to make sense to use org as a frontend to Rstudio,
 but i may be wrong...


 Agree on most points, and will be checking out the HTML org options as I
 mentioned.

 I did want to correct that slidify is not tied to rstudio, even though it
 integrates nicely with it. I was playing with it when straight from an R
 session within Emacs when I wrote the post.

 It also has some nice web publishing features to send the presentation right
 to git, dropbox, or rpubs from R, (though I didn't try that outside of
 rstudio, so there could be caveats).

 John

 rick




Re: [O] [babel] shell does not unquote

2014-02-06 Thread Eric Schulte
Samuel Wales samolog...@gmail.com writes:

 thanks for the examples, but they don't meet my needs as tables for
 each set of arguments would be too unwieldy.


How about this.

#+name: list
#+begin_src sh :var files= :results verbatim
IFS=

for file in $files;do
  echo -|$file|-
done
#+end_src

#+call: list(1 space\nnospace)

#+RESULTS:
: -|1 space|-
: -|nospace|-


 what would be ideal is to allow setting noweb expansions in the call
 line (instead of requiring named blocks to provide the expansion).
 i.e. it is similar to setting a var, but is a noweb setting instead.

 then i would just do the call with the files i want, quoted the way i want.

 may i make this a feature request?


I'm not sure that the additional utility justifies the added complexity.

Best,



 On 2/6/14, Eric Schulte schulte.e...@gmail.com wrote:
 #+name: files-tab
 | with space |
 | nospace|

 #+name: files-ex
 : with space
 : nospace

 #+name: list
 #+begin_src sh :var files= :results verbatim
 IFS=
 
 for file in $files;do
   echo -|$file|-
 done
 #+end_src

 #+call: list(files-tab)

 #+RESULTS:
 : -|with space|-
 : -|nospace|-

 #+call: list(files-ex)

 #+RESULTS:
 : -|with space|-
 : -|nospace|-

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



Re: [O] Feature request: filling of long captions

2014-02-06 Thread Eric Schulte
Andrea Rossetti andrea.rosse...@gmail.com writes:

 Hello Bastien and everyone reading,

 Bastien b...@gnu.org writes:
 Could you list other options that are good candidates for such
 auto-filling fonctionality?  We'd better implement them all at
 once.

   I'd suggest to split the wish-list in two buckets, i.e. 

 1) some #+... commands would benefit of a line-continuation
 mechanism (like the backslash at EOL in a multilined C/C++
 #define macro)

 2) some line-continuation-aware #+... commands (thanks to
 implementations for step 1) would benefit of auto-filling

   To me #+TBLFM seems to fit into bucket 1, #+CAPTION into
 bucket 2. My Christmas wish is #+MACRO into bucket 1.

   Kindest regards,

   Andrea


For a while now I've been wishing that keywords (namely #+Caption:)
could be equivalently specified as blocks (e.g., #+begin/end_Caption:).

Would that be another possible solution here?

Best,

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



[O] Omitting try/catch blocks from tangled R code?

2014-02-06 Thread John Hendy
Greetings,


I don't usually tangle, but am creating a code file to go along with a
presentation I'm giving this weekend so that attendees can try things
out afterward by cloning my github repo where all the data and
necessary files are stored.

In my presentation (Beamer), I create plots via the R pdf() device,
and noticed that all of the tangled code where plots are generated
contains the following:

pdf(file=file.pdf); tryCatch({

  code block contents here

},error=function(e){plot(x=-1:1, y=-1:1, type='n', xlab='', ylab='',
axes=FALSE); text(x=0, y=0, labels=e$message, col='red');
paste('ERROR', e$message, sep=' : ')}); dev.off()

Is there a way to omit this?

I'm guessing this is here to create a blank plot with the error as the
output when something goes awry?

I checked around variable completions of org-babel-tangle-* and
searched google for terms like org babel tangle try catch but am not
finding anything that looks like what I need.


Thanks,
John



Re: [O] Feature request: filling of long captions

2014-02-06 Thread Andreas Leha
Eric Schulte schulte.e...@gmail.com writes:

 Andrea Rossetti andrea.rosse...@gmail.com writes:

 Hello Bastien and everyone reading,

 Bastien b...@gnu.org writes:
 Could you list other options that are good candidates for such
 auto-filling fonctionality?  We'd better implement them all at
 once.

   I'd suggest to split the wish-list in two buckets, i.e. 

 1) some #+... commands would benefit of a line-continuation
 mechanism (like the backslash at EOL in a multilined C/C++
 #define macro)

 2) some line-continuation-aware #+... commands (thanks to
 implementations for step 1) would benefit of auto-filling

   To me #+TBLFM seems to fit into bucket 1, #+CAPTION into
 bucket 2. My Christmas wish is #+MACRO into bucket 1.

   Kindest regards,

   Andrea


 For a while now I've been wishing that keywords (namely #+Caption:)
 could be equivalently specified as blocks (e.g., #+begin/end_Caption:).

 Would that be another possible solution here?

I can not think of any downside, so I guess it would work at least
as well for me.

It might be harder to implement, since multiple caption lines are
already parsed correctly by Org.

The begin/end_caption blocks would have their advantages in terms of
syntax highlighting / readability of the Org buffer.

Regards,
Andreas




Re: [O] Proposal/request for input: slidify export for html slides

2014-02-06 Thread Andreas Leha
Hi John,

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

 An interesting update on this. Aside from some image and code block
 stuff, the following works surprisingly well!
 - Export Org - markdown (md)
 - Start an R session and `setwd(/path/to/file.md)`
 - Run `library(slidify)` and `author(deck)
 - Copy the deck/assets folder into the parent directory
 - Copy the header code from the resultant deck/index.Rmd file into
 exported .md file
 - Add three hyphens before each heading (headings are # Slide title)
 - Save the file as file.Rmd (vs. file.md)
 - From the R session, do `setwd(../)` (running `author(deck)`
 changes the working directory to deck/
 - Run `slidify(file.Rmd)`

 I was coming from Beamer, so all of my generated plots are .pdfs. I
 plan to create a new directory and use imagemagic to convert them all
 to png or jpg, and then modify my original .org file tailored for
 Beamer to use the images vs. pdfs, as well as adding #+attr_html
 headings instead of the existent #+attr_latex ones in my current file.

Are your pdf plots generated (by R) through babel?  In that case (and
given that you do not rely on absolute positioning) you can make Org /do
the right thing/ for you without the need to call imagemagick manually
in the end.

Making images export correctly across multiple backends is a lot of work
(#+attr_latex and #+attr_html should live happily together), so I'll
stick to a simple example ;-)


--8---cut here---start-8---
* R plot for multiple backends
You might even consider tikz for the LaTeX route instead of pdf.

#+name: demoplot
#+header: :exports results
#+header: :results graphics
#+header: :file (by-backend (latex demoplot.pdf) (html demoplot.svg) (t 
demoplot.png))
#+begin_src R
  ## taken from ?plot
  plot(table(rpois(100, 5)), type = h, col = red, lwd = 10,
   main = rpois(100, lambda = 5))
#+end_src

#+results: demoplot
[[file:demoplot.png]]
--8---cut here---end---8---


This relies on the by-backend macro from Eric Schulte:

--8---cut here---start-8---
#+begin_src emacs-lisp
  (defmacro by-backend (rest body)
`(case (if (boundp 'backend) (org-export-backend-name backend) nil) ,@body))
#+end_src
--8---cut here---end---8---





 I'll post a test file and the process if anyone is interested in replicating!

Please do so.  I guess that somehow such a process should be
automatable in the end.

[ ... ]

Regards,
Andreas