[O] Possible bug? Links using 'file+Emacs:' don't work. (Was: Re: Unable to get file link search to work)

2014-02-23 Thread Alexis

Christian Moe m...@christianmoe.com writes:

 Just to say, I reproduce it, so I think it's a bug. Note, the below
 only happens for me when using file+emacs: to force opening in
 emacs. The links work with regular file: links, or just starting the
 link with ./ Since my .org files open with emacs anyway, I normally
 wouldn't add +emacs. But the manual suggests I could.

Hi Christian,

Thanks for taking the time to look into this!

i was using 'file+emacs:' because when i just used 'file:', the .org
file would be opened using 'less', not Emacs. As a result of your email,
i checked out the documentation for org-open-at-point; it said that
providing a prefix argument would force opening in Emacs. So i removed
the '+emacs' from my example link, and then tried opening it via
C-u C-c C-o - and it worked!

i checked the value of org-file-apps, to see why org-open-at-point was
using 'less', rather than Emacs, to open .org files. It turns out there
was a typo in how i was setting the value of org-file-apps, causing it
to have a nonsense value - and i guess this caused org-mode to fall back
to using 'less' as a default. Setting the value of org-file-apps to a
correct value - including (org . emacs) as part of it - resulted in
'file:' links being opened in Emacs, rather than with 'less'.

However, 'file+emacs:' links still exhibit the incorrect behaviour i
described in my original email, and which you experienced also. So it
looks like there is indeed a bug here - or, the 'file+emacs:' example
should be removed from section 4.3 of the Org manual.

Thanks again!


Alexis.



Re: [O] [patch] Support CUSTOM_ID property in latex export

2014-02-23 Thread Nicolas Goaziou
Hello,

Richard Lawrence richard.lawre...@berkeley.edu writes:

 OK, I think I've got a patch now that addresses everything you asked
 for.  It is attached.  This has been quite a learning experience!  Let
 me know if other changes are necessary.

It looks good. I applied it.

Thank you for your work.


Regards,

-- 
Nicolas Goaziou



Re: [O] [patch] Support CUSTOM_ID property in latex export

2014-02-23 Thread Achim Gratz
Richard Lawrence writes:
 OK, I think I've got a patch now that addresses everything you asked
 for.  It is attached.  This has been quite a learning experience!  Let
 me know if other changes are necessary.

http://orgmode.org/worg/org-contribute.html#sec-5

Please use complete sentences in the changelog and do not add empty
lines when you continue the entry (or start them off again with a star
and the file part).  Read some of the existing commit messages to see
how this is done.


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

Waldorf MIDI Implementation  additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs




[O] org-entities: why \lang instead of \langle?

2014-02-23 Thread Anders Johansson

Hi,
I noticed that in org-entities these symbols are defined:

   (lang \\langle t lang;   ⟨)
   (rang \\rangle t rang;   ⟩)


But nothing for langle and rangle. I guess it seems pretty confusing 
when you try to use the latex-macros you are used to.


Maybe these aliases could also be added, like what is done for e.g. clubs:

   (langle \\langle t lang;   ⟨)
   (rangle \\rangle t rang;   ⟩)


Cheers,
Anders Johansson




Re: [O] css classes to tables in html export

2014-02-23 Thread Vikas Rawal
 
 So, use the class attribute.
 
 #+ATTR_HTML: :class table table-striped table-bordered table-condensed
 | a | b | c |
 |---+---+---|
 | 1 | 2 | 3 |

Thanks. That's what I need.

Vikas



[O] Bug: horizontal line incorrectly drawn when numbers are prefixed with plus sign [8.2.5h (8.2.5h-6-g8e1386-elpa @ /Users/jason/.emacs.d/elpa/org-20140203/)]

2014-02-23 Thread Jason Lewis
Hi,

If you enter a table like this in org, the +4 will get a strike-through
line through it
incorrectly.

I expect it should not happen and only the hline below should appear as
a solid line.

| 1 | +4 |
|---+|
|   ||


you can see a screenshot of what happens here:

http://monosnap.com/image/Sudbx4RL5T9KaLBYZHYo4e1GtssQbT



Emacs  : GNU Emacs 24.3.50.1 (x86_64-apple-darwin13.0.0, NS
apple-appkit-1265.00)
 of 2014-01-24 on tolkien.lan
Package: Org-mode version 8.2.5h (8.2.5h-6-g8e1386-elpa @
/Users/jason/.emacs.d/elpa/org-20140203/)

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)
 outline-minor-mode-hook '(mediawiki-outline-magic-keys)
 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-html-format-drawer-function '(lambda (name contents) contents)
 org-latex-format-inlinetask-function 'ignore
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-latex-format-headline-function
'org-latex-format-headline-default-function
 org-default-notes-file ~/Dropbox/org/todo.org
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-from-is-user-regexp \\Jason Lewis\\
 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 '((lambda nil (flyspell-mode -1))
 #[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-refile-targets '((nil :maxlevel . 9) (org-agenda-files :maxlevel . 9))
 org-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-directory ~/Dropbox/org
 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-M-RET-may-split-line '((default))
 org-blank-before-new-entry nil
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-html-format-headline-function 'ignore
 org-html-format-inlinetask-function 'ignore
 org-agenda-files '(~/Dropbox/org/todo.org ~/Dropbox/org
~/Dropbox/org/todo.org)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )

-- 
Jason Lewis
http://emacstragic.net




signature.asc
Description: OpenPGP digital signature


[O] Bug: Problems with sub/super-script when using: org-cdlatex + org-pretty-entities + org-catch-invisible-edits

2014-02-23 Thread Anders Johansson

Hi,
I used the configuration:

org-catch-invisible-edits 'show
org-pretty-entities t

together with org-cdlatex. This breaks the insertion of subscripts and 
superscripts through org-cdlatex because _{} is fontified and the {} are 
hidden so typing for example: a _ bc results in a_{b}c (or sometimes 
a_bc, but should be a_{bc}) and gives the message Unfolding 
invisible region around point before editing.


Setting org-catch-invisible-edits to nil let's cdlatex do it's work so I 
guess an easy solution would be to let that in 
org-cdlatex-underscore-caret.



Cheers,
Anders Johansson



Re: [O] Bug: Problems with sub/super-script when using: org-cdlatex + org-pretty-entities + org-catch-invisible-edits

2014-02-23 Thread Anders Johansson

Hi,
I used the configuration:

org-catch-invisible-edits 'show
org-pretty-entities t

together with org-cdlatex. This breaks the insertion of subscripts and 
superscripts through org-cdlatex because _{} is fontified and the {} 
are hidden so typing for example: a _ bc results in a_{b}c (or 
sometimes a_bc, but should be a_{bc}) and gives the message 
Unfolding invisible region around point before editing.


Setting org-catch-invisible-edits to nil let's cdlatex do it's work so 
I guess an easy solution would be to let that in 
org-cdlatex-underscore-caret.



Cheers,
Anders Johansson

Hi,
I realized that my solution won't work since 
org-check-before-invisible-edit does it's work after 
org-cdlatex-underscore-caret has called cdlatex-sub-superscript and 
inserted _{}.


Maybe then org-catch-invisible-edits should be nil all the time in 
org-cdlatex-mode? But this would be unexpected. Maybe this can be 
treated as a special case in org-check-before-invisible-edit in some way?



Cheers,
Andes Johansson



Re: [O] Configuring html footnote (or adding to end of body)

2014-02-23 Thread Rasmus
Blanchette, Marco m...@stowers.org writes:

 Sorry if this has been answered before, can’t seem to find a way to search 
 for it…

 Is there a way to configure the default content of the footer produced
 during html formatted export? There is a javaScript that I would like
 to be the last bit of my html every time an org file is
 exported. Can’t seem to figure that one out.

In Org footnotes and different from the postamble.  I think you're
talking about the postamble, but I'm not certain.

From the manual there's org-html-postamble-format, which is quite
flexible.  You can use specify your own function.  You can also
specify html-postamble as an option, but IMO this is mostly feasible
in org-publish-project-alist.  Of course a filter is also always an
option.  Perhaps org-export-filter-final-output-functions is what
you'd want here.

Hope it helps,
Rasmus



-- 
C is for Cookie




Re: [O] Tables with line wrapping?

2014-02-23 Thread Peter Davis
On Sun, Feb 23, 2014 at 10:30:57AM +0530, Jambunathan K wrote:
 Peter Davis p...@pfdstudio.com writes:
 
  I'm using org-mode to prepare a document that will ultimately be
  exported to PDF. Unfortunately, I need to include a table whose contents
  will wrap as needed.
 
 You can export to PDF via ODT.  Use list tables.  See the links at the
 end of the following post.
 

Hi, Jambunathan,

This looks really interesting also. Is this feature going to fund its way to 
the trunk at some point?

Thanks!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] Bad sexp at line when using org-contacts-anniversaries

2014-02-23 Thread Chaitanya Krishna
Hello there,

This is more of a bug report.

I get a 'Bad sexp at line n' when using org-contacts-anniversaries in my
org files like so.
* Calendar
:calendar:
%%(org-contacts-anniversaries)

I figured out that this occurs when you have a contact in your
contacts.orgfile with a BIRTHDAY property but no associated value. For
example, this
entry throws up an error.
** Nick
:PROPERTIES:
:EMAIL:
:FIRST_NAME: First
:LAST_NAME: Last
:BIRTHDAY:
:ADDRESS:
:PHONE:
:NOTE:
:END:

But this does not.
** Nick
:PROPERTIES:
:EMAIL:
:FIRST_NAME: First
:LAST_NAME: Last
:BIRTHDAY: 1971-01-01
:ADDRESS:
:PHONE:
:NOTE:
:END:

Would be nice if it is fixed or a solution proposed.

Regards,
Chai

-- 
42


Re: [O] Possible bug? Links using 'file+Emacs:' don't work.

2014-02-23 Thread Nicolas Goaziou
Hello,

Alexis flexibe...@gmail.com writes:

 However, 'file+emacs:' links still exhibit the incorrect behaviour i
 described in my original email, and which you experienced also. So it
 looks like there is indeed a bug here - or, the 'file+emacs:' example
 should be removed from section 4.3 of the Org manual.

This should be fixed in master branch.

Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou



Re: [O] List of figures

2014-02-23 Thread Nicolas Goaziou
Hello,

t...@tsdye.com (Thomas S. Dye) writes:

 I'm trying to generate a list of figures for LaTeX export.  I thought to
 use #+TOC: figures, but this didn't work.

 The Org Export Reference Documentation has this:

   “TOC” keyword. It accepts three common values: “headlines”, “tables” and
   “listings”. Also, “headlines” value can have an optional numeric
   argument to specify depth of the contents.

   See org-export-collect-headlines, org-export-collect-tables,
   org-export-collect-figures and org-export-collect-listings.

 Two questions:

 1) Is there a reason that the TOC keyword doesn't accept the value
 figures? The reference to org-export-collect-figures suggests that it
 should accept this value.

I had planned to allow figures for TOC, but I realized it was
difficult to define what a figure is outside of LaTeX.

There is the infrastructure, but it isn't used yet in back-ends.

 2) Is there some other way to generate a list of figures for LaTeX
 export?

See Rasmus' answer.


Regards,

-- 
Nicolas Goaziou



Re: [O] Namespace problem org-mode / Clojure

2014-02-23 Thread Soapy Smith
Hi Tom-

I'm not yet good at elisp, but looking at the ob-clojure.el file, the
header option :package is only associated with slime, not cider?

Regards,
Greg



On Fri, 2014-02-21 at 12:36 -1000, Thomas S. Dye wrote:
 Aloha Volker,
 
 I don't use Clojure, but ob-clojure.el defines a header argument
 :package. You should be able to do something like:
 
 #+header: :package org-works.core
 
 to execute code in that name space.
 
 hth,
 Tom





Re: [O] Bug: Problems with sub/super-script when using: org-cdlatex + org-pretty-entities + org-catch-invisible-edits

2014-02-23 Thread Anders Johansson



Hi,
I used the configuration:

org-catch-invisible-edits 'show
org-pretty-entities t

together with org-cdlatex. This breaks the insertion of subscripts 
and superscripts through org-cdlatex because _{} is fontified and the 
{} are hidden so typing for example: a _ bc results in a_{b}c (or 
sometimes a_bc, but should be a_{bc}) and gives the message 
Unfolding invisible region around point before editing.


Setting org-catch-invisible-edits to nil let's cdlatex do it's work 
so I guess an easy solution would be to let that in 
org-cdlatex-underscore-caret.



Hi,
I realized that my solution won't work since 
org-check-before-invisible-edit does it's work after 
org-cdlatex-underscore-caret has called cdlatex-sub-superscript 
and inserted _{}.


Maybe then org-catch-invisible-edits should be nil all the time in 
org-cdlatex-mode? But this would be unexpected. Maybe this can be 
treated as a special case in org-check-before-invisible-edit in some 
way?


Digging into it some more it's actually the pretty entities folding 
which is the problem, regardless of org-check-before-invisible-edit. The 
cursor jumps out of the {}-brackets after the first character, when the 
hiding/folding is done. I have no idea what should be done about this.


Cheers,
Anders Johansson







Re: [O] Namespace problem org-mode / Clojure

2014-02-23 Thread Soapy Smith
Hi Volker-

I tried the your example code blocks on my system, and I concur with
most of the behavior you described.

org-babel-execute-buffer does not work, as it comes back with error
repl not connected.  It did not cause a crash.
However, if I add explicit namespace declaration to the 2nd block, it
works!  This is true even thought the 3rd block does not(???).

I was thinking back to why I never encountered this problem, and it is
because I have almost always used an explicit namespace declaration at
the top of the block.  Fortunately, after the first block, you don't
have to use the optional parameters, includes etc.  In your example

(ns environment.my-test)

added to subsequent code blocks you wish to execute in the same
namespace should be sufficient.  I think this should be considered the
work-around until someone can explain what is going on, or, even
better, can fix this.

I'm the person who updated the worg documentation for Clojure code
blocks.  I'm thinking about adding a list of TODOs at the bottom, as
there have been some other requests recently to the function behavior.
This issue definitely will go on the list.  Hopefully Bastien is
monitoring and can comment if this is appropriate to add to the Clojure
specific worg page (or should it go somewhere else).

Regards,
Greg






Re: [O] List of figures

2014-02-23 Thread Thomas S. Dye
Aloha Rasmus,

Rasmus ras...@gmx.us writes:

 t...@tsdye.com (Thomas S. Dye) writes:

 1) Is there a reason that the TOC keyword doesn't accept the value
 figures? The reference to org-export-collect-figures suggests that it
 should accept this value.

 AFAIK it is not supported.  It has puzzled me as well.  It's trivial
 to make a patch for ox-latex; the hard part is adding it to other
 backends.

 2) Is there some other way to generate a list of figures for LaTeX
 export?

 There's the obvious one:

 #+LATEX: \listoffigures

 But that's probably not what you're looking for.

 As you'll see from org-latex-keyword you can also cheat Org by
 setting org-latex-listings to nil and use #+TOC: listings.

Very helpful. Thanks!
-- 
Thomas S. Dye
http://www.tsdye.com



[O] [babel] disable :session for a code block?

2014-02-23 Thread Rainer M Krug
Hi

I would like to save all in org defined variables into an R data
file. In general this works fine with the following code block:


#+begin_src R :session null :results output
dir.create(./data/, showWarnings=FALSE)
save.image(./data/orgData.rda)
#+end_src

but, as I have defined a file wide session for R via 

#+PROPERTY: session *R_MOBILIS*

I have to create a new session for this, which is not that nice: when I
remove a variable in org, it is still in the R environment and will
therefore be saved. Therefore my question:

what can I provide to the :session header, so that no session is used?
In other words: how can I run a single code block out-of-session when
all other are running in a session?

Thanks,

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


pgpyKSaIDfeNt.pgp
Description: PGP signature


Re: [O] List of figures

2014-02-23 Thread Thomas S. Dye
Aloha Nicolas,

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

 Hello,

 t...@tsdye.com (Thomas S. Dye) writes:

 I'm trying to generate a list of figures for LaTeX export.  I thought to
 use #+TOC: figures, but this didn't work.

 The Org Export Reference Documentation has this:

   “TOC” keyword. It accepts three common values: “headlines”, “tables” and
   “listings”. Also, “headlines” value can have an optional numeric
   argument to specify depth of the contents.

   See org-export-collect-headlines, org-export-collect-tables,
   org-export-collect-figures and org-export-collect-listings.

 Two questions:

 1) Is there a reason that the TOC keyword doesn't accept the value
 figures? The reference to org-export-collect-figures suggests that it
 should accept this value.

 I had planned to allow figures for TOC, but I realized it was
 difficult to define what a figure is outside of LaTeX.

 There is the infrastructure, but it isn't used yet in back-ends.

I can imagine that a list of figures is a difficult problem in some
other back-ends.  However, its absence in LaTeX export seems unusual.

Would it make sense to have this work as expected for LaTeX export (and
perhaps other back-ends where it does make sense) and have other
back-ends insert a comment?

Not a big thing, obviously, but I was surprised when it didn't work.

All the best,
Tom

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



Re: [O] Namespace problem org-mode / Clojure

2014-02-23 Thread Thomas S. Dye
Soapy Smith soapy-sm...@comcast.net writes:

 Hi Tom-

 I'm not yet good at elisp, but looking at the ob-clojure.el file, the
 header option :package is only associated with slime, not cider?

 Regards,
 Greg

I think so. It looks like cider and nrepl use a different variable, ns,
which isn't exposed as a header argument.

Tom

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



Re: [O] Non-interactive export

2014-02-23 Thread Simon Thum

A small update:

org-export-babel-evaluate does what I need. I'm still a bit confused why 
it asks in this instance and not others, but it works.


If that is unexpected behaviour you want to clarify, do not hestitate to 
ask.


Cheers,

Simon

On 02/21/2014 10:12 PM, Simon Thum wrote:

Sorry, I was being imprecise.


I do have maxima and shell and other source bocks since the dawn of org,
approximately. I did not have any gnuplot blocks until before two weeks.
The gnuplot blocks break my setup, currently.

So, what is weird is that maxima and shell do well but gnuplot wants its
interactive things.

I noticed the same behaviour when exporting interactively - babel  asks
me for the gnuplot stuff. Could it be that the export defaults vary per
backend?

My org-confirm-babel-evaluate is t. However on export, only gnuplot
triggers this question. I now notice that maxima is executed on export
without asking first; I guess shell is the same.

Things are getting stranger...

Cheers,

Simon

On 02/21/2014 12:38 AM, John Hendy wrote:

On Thu, Feb 20, 2014 at 4:12 PM, Simon Thum simon.t...@gmx.de wrote:

Hi all,

I have a server over which I sync my Org files and provide drops for
other
clients, chiefly iCal and vCard. Therefore I need non-interactive
export.

Things recently stopped working however, and although I acknowledge
it is
likely not Org's fault maybe here I can find somewone more into lisp
to help
me out a bit.

In my logs I find, since it stopped working:


Evaluate this gnuplot code block on your system? (yes or no)



Which stops the show, waiting for input. Emacs is started with -batch
and is
given an export script. This so far avoided such questions (from
org-babel?)
successfully. I have maxima blocks since ages and do not remember having
seen this behaviour.

Does naybody have an idea what could be going on?

The machine does not even have gnuplot.


I don't think the machine matters so much as the source of Org/babel
thinking gnuplot *code* exists in one of your files.

Can you try something like this from the directory containing the
exported files?

grep -r #+begin_src gnuplot *

I would have suggested just tweaking the variable
=org-confirm-babel-evaluate=, but I think it's more important to track
the source of this down, as turning the inquiries off implies that we
all know exactly what's going to be evaluated, and this sounds like an
instance of something not only unknown, but a change on what you
believe to be a rather unchanged system, which is definitely
concerning.

Good luck,
John



Thanks in advance,

Simon











[O] Writing your book with orgmode and publishing it on Leanpub

2014-02-23 Thread Juan Reyero
Greetings,

I've solved a couple of bugs in the Leanpub[1] markdown exporter[2]
(cross-links within the book using ids were not working, and footnotes
containing a colon neither).  As far as I can tell using Orgmode and
Leanpub to publish books is now quite feasible, and produces rather
nice results.

I have also published the sources for my book, The Hacker Ways[3], at

https://github.com/juanre/hacker-ways

It is rather annoying that github understands the org syntax but not
quite, so the sources appear almost but not quite right.  Clone and
open in Emacs to see what's going on.

Best regards,

jm
-- 
http://greaterskies.com
http://juanreyero.com

[1] Leanpub.com is a very nice self-publishing platform.  I am not
associated with them, and they are not responsible for my code.

[2] http://juanreyero.com/open/ox-leanpub/

[3] https://leanpub.com/hackerways/



Re: [O] Non-interactive export

2014-02-23 Thread John Hendy
On Sun, Feb 23, 2014 at 12:23 PM, Simon Thum simon.t...@gmx.de wrote:
 A small update:

 org-export-babel-evaluate does what I need. I'm still a bit confused why it
 asks in this instance and not others, but it works.

That is interesting. I just checked my own config and I just have:

(setq org-confirm-babel-evaluate nil)

That's it, and I don't think I ever get asked, either with C-c C-c in
the buffer, or upon export. It would be nice to figure it out in case
it's a bug or loophole. You might try with a minimal config on your
file manually. Something like:

;; load path(s)
(add-to-list 'load-path ~/.elisp/org.git/lisp/)

;; various babel options here
(setq org-confirm-babel-evaluate nil)

Then start emacs with `emacs -Q` from a terminal, and then do `M-x
load-file`, pointing Emacs to the minimal config you create. Try
interactive eval and export form that instance?


John


 If that is unexpected behaviour you want to clarify, do not hestitate to
 ask.

 Cheers,

 Simon


 On 02/21/2014 10:12 PM, Simon Thum wrote:

 Sorry, I was being imprecise.


 I do have maxima and shell and other source bocks since the dawn of org,
 approximately. I did not have any gnuplot blocks until before two weeks.
 The gnuplot blocks break my setup, currently.

 So, what is weird is that maxima and shell do well but gnuplot wants its
 interactive things.

 I noticed the same behaviour when exporting interactively - babel  asks
 me for the gnuplot stuff. Could it be that the export defaults vary per
 backend?

 My org-confirm-babel-evaluate is t. However on export, only gnuplot
 triggers this question. I now notice that maxima is executed on export
 without asking first; I guess shell is the same.

 Things are getting stranger...

 Cheers,

 Simon

 On 02/21/2014 12:38 AM, John Hendy wrote:

 On Thu, Feb 20, 2014 at 4:12 PM, Simon Thum simon.t...@gmx.de wrote:

 Hi all,

 I have a server over which I sync my Org files and provide drops for
 other
 clients, chiefly iCal and vCard. Therefore I need non-interactive
 export.

 Things recently stopped working however, and although I acknowledge
 it is
 likely not Org's fault maybe here I can find somewone more into lisp
 to help
 me out a bit.

 In my logs I find, since it stopped working:

 Evaluate this gnuplot code block on your system? (yes or no)



 Which stops the show, waiting for input. Emacs is started with -batch
 and is
 given an export script. This so far avoided such questions (from
 org-babel?)
 successfully. I have maxima blocks since ages and do not remember having
 seen this behaviour.

 Does naybody have an idea what could be going on?

 The machine does not even have gnuplot.


 I don't think the machine matters so much as the source of Org/babel
 thinking gnuplot *code* exists in one of your files.

 Can you try something like this from the directory containing the
 exported files?

 grep -r #+begin_src gnuplot *

 I would have suggested just tweaking the variable
 =org-confirm-babel-evaluate=, but I think it's more important to track
 the source of this down, as turning the inquiries off implies that we
 all know exactly what's going to be evaluated, and this sounds like an
 instance of something not only unknown, but a change on what you
 believe to be a rather unchanged system, which is definitely
 concerning.

 Good luck,
 John


 Thanks in advance,

 Simon









Re: [O] [babel] disable :session for a code block?

2014-02-23 Thread Andreas Leha
Rainer M Krug rai...@krugs.de writes:

 Hi

 I would like to save all in org defined variables into an R data
 file. In general this works fine with the following code block:


 #+begin_src R :session null :results output
 dir.create(./data/, showWarnings=FALSE)
 save.image(./data/orgData.rda)
 #+end_src

 but, as I have defined a file wide session for R via 

 #+PROPERTY: session *R_MOBILIS*

 I have to create a new session for this, which is not that nice: when I
 remove a variable in org, it is still in the R environment and will
 therefore be saved. Therefore my question:

 what can I provide to the :session header, so that no session is used?
 In other words: how can I run a single code block out-of-session when
 all other are running in a session?

 Thanks,

 Rainer


This should be
 :session none

Regards,
Andreas





[O] feature request: export page of pdf in latex

2014-02-23 Thread Andreas Leha
Hi all,

there is the nice functionality in docview links, where
[[docview:papers/last.pdf::2]] will open the second page of the given
pdf.

Would it be hard to make [[file:papers/last.pdf::2]] export the second
page of the pdf to latex?  I.e. to export to something like
\includegraphics[page=2]{papers/last.pdf}?


Regards,
Andreas




Re: [O] feature request: export page of pdf in latex

2014-02-23 Thread John Kitchin
you can do this with a filter, and conditional handling. I did something
like this at
http://kitchingroup.cheme.cmu.edu/blog/2013/09/28/Changing-links-to-files-so-they-work-in-a-blog/where
file links were handled differently depending on whether the file
link had content or not. you could do something similar.

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



On Sun, Feb 23, 2014 at 3:55 PM, Andreas Leha 
andreas.l...@med.uni-goettingen.de wrote:

 Hi all,

 there is the nice functionality in docview links, where
 [[docview:papers/last.pdf::2]] will open the second page of the given
 pdf.

 Would it be hard to make [[file:papers/last.pdf::2]] export the second
 page of the pdf to latex?  I.e. to export to something like
 \includegraphics[page=2]{papers/last.pdf}?


 Regards,
 Andreas





Re: [O] [Babel] Bug reading example blocks?

2014-02-23 Thread Thomas S. Dye
Hi Samuel,

I think not.  I get these results now:

#+call: repeated-text(x=foo,eg=example) :results raw

#+results:
1. this is the first line
2. this is the second line with foo as the value
3. this is the third line

All the best,
Tom

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

 hi thomas,

 is this still a bug?

 samuel


 On 11/22/13, Thomas S. Dye t...@tsdye.com wrote:
 Aloha all,

 Responding to a query by Gary Oberbrunner, I tried to point out the use
 of example blocks to name arbitrary pieces of text. What I found is that
 the example block isn't passed whole to a babel source block--whitespace
 is removed from the first line.

 * Whitespace on first line of example block removed

 #+name: example
 #+begin_example
  1. this is the first line
  2. this is the second line with %VARIANT% as the value
  3. this is the third line
v #+end_example

 #+name: repeated-text
 #+header: :var x=
 #+header: :var eg=
 #+begin_src emacs-lisp
   (let ((result))
 (setf result (replace-regexp-in-string %VARIANT% x eg t))
 result)
 #+end_src

 #+call: repeated-text(x=foo,eg=example) :results raw

 #+results:
 1. this is the first line
  2. this is the second line with foo as the value
  3. this is the third line

 This happens, AFAICT, regardless of the value of
 org-src-preserve-indentation.

 Is there a reason for this? Or, is it a bug? Or, am I going about this
 task in the wrong way?

 All the best,
 Tom
 --
 Thomas S. Dye
 http://www.tsdye.com



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



Re: [O] Possible bug? Links using 'file+Emacs:' don't work.

2014-02-23 Thread Alexis

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

 Alexis flexibe...@gmail.com writes:

 However, 'file+emacs:' links still exhibit the incorrect behaviour i
 described in my original email, and which you experienced also. So it
 looks like there is indeed a bug here - or, the 'file+emacs:' example
 should be removed from section 4.3 of the Org manual.

 This should be fixed in master branch.

 Thank you for reporting it.

Hi Nicolas,

Have just tested your fix - works for me. :-) Thanks for fixing this so
quickly!


Alexis.



Re: [O] [Babel] Bug reading example blocks?

2014-02-23 Thread Samuel Wales
Hi Thomas,

I guess the fix hasn't made it to maint yet.

#+call: repeated-text(eg=example) :results raw

#+RESULTS:
1. this is the first line
  2. this is the second line with %VARIANT% as the value
  3. this is the third line

#+name: repeated-text
#+begin_src sh :results verbatim output :var eg=1
  {
  catEOF
  $eg
  EOF
  } 21
  :
#+end_src

#+name: example
#+begin_example
  1. this is the first line
  2. this is the second line with %VARIANT% as the value
  3. this is the third line
#+end_example

Samuel

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

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it as far as we know.

Denmark: free Karina Hansen NOW.



[O] Bug (or at least a trap) in exporting #+begin_src blocks

2014-02-23 Thread Giovanni Moretti
I've just solved a puzzle finding out why Python src blocks that exported 
happily last year don't now. I'm using them for class tutorials and a of about 
fifteen Python fragments, a couple of the blocks would expand in-situ (C-c C-c) 
but when exported were treated as normal text.


I narrowed it down using the following file
==
#+options: num:nil toc:nil
** Try 1

#+BEGIN_SRC python :results output :exports both
print hi
#+END_SRC

#+RESULTS:
: hi

** Try 2

#+BEGIN_SRC python :results output :exports both
print Fred
#+END_SRC python

#+RESULTS:
: Fred


Both of the src blocks can be isolated and edited in its own buffer using 
org-babel-expand-src-block - C-c C-v C-v) and both get run correctly if you C-c 
C-c inside them, as shown by the #+RESULTS blocks, however on export, the second 
one is treated as normal text .


Puzzlingly, a hex-dump showed the #+BEGIN_SRC lines were identical - then I 
noticed that the #+END line was wrong. I'd written #+END_SRC python instead of 
just #+END_SRC.


It seems like the parser for the src blocks is now stricter that it was last 
year.

Could I ask that an error message be generated for this? While not strictly a 
bug, it's an insidious trap given that the in-buffer expansion (C-c C-c) runs 
and inserts the results  as expected.


I've also had similar problems with

#+BEGIN_SRC python :output results :exports both
print hi
#+END_SRC

which looks ok, and the :output results makes sense when you read it, but 
should be :results output. From memory, this also worked in-buffer but would 
silently fail on export.


Orgmode + Babel is excellent for writing Python tutorial worksheets - so thank 
you - your work is much appreciated.


Cheers
Giovanni
--

==
Dr Giovanni Moretti | School of Engineering and Advanced Technology
Senior Lecturer | Massey University, Palmerston North, New Zealand
Computer Science| Ph +64-6-3505799x84134 Fax +64-6-3502259 - ZL2GX
==
http://seat.massey.ac.nz/morettig.more...@massey.ac.nz




[O] custom link export and ox-md

2014-02-23 Thread John Peloquin

Greetings,

I'm trying to define a custom link in org mode with custom export 
formatting, but I get unexpected results when exporting to markdown.



Minimal example:

`minimal-init.el`

(add-to-list 'load-path ~/.emacs.d/elpa/org-20140217)
(require 'org)
(add-to-list 'org-export-backends md)

(org-add-link-type
 cite nil
 (lambda (path desc format)
   (format [@%s] path)))


`minimal.org`

Some text [[cite:citekey]].


When I export `minimal.org` to markdown using C-c C-e m M, I get:

Some text citekey.


Whereas I expected:

Some text [@citekey].


I tried this with a clean emacs configuration (`emacs -Q -l 
minimal-init.el`).  `org-version` returns 8.2.5h, which as far as I know 
is the latest version.  `emacs-version` is 24.3.1.


I do get the expected export result if I export to latex or html, so the 
link export definition in init.el does work.  Am I doing something 
wrong?  Is this a bug in ox-md?



Best regards,

John Peloquin



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

2014-02-23 Thread Samuel Wales
By which I mean, the bug should be reproducible if you do so.

On 2/11/14, Samuel Wales samolog...@gmail.com wrote:
 Try with:

   (setq org-babel-use-quick-and-dirty-noweb-expansion t)

 This setting is much, much faster, by the way.

 On 2/5/14, Eric Schulte schulte.e...@gmail.com wrote:
 Samuel Wales samolog...@gmail.com writes:

 hi eric,

 #+BEGIN_SRC org :results verbatim output :noweb yes :noweb-ref whatever
   a
 #+END_SRC
 # #+BEGIN_SRC org :results verbatim output :noweb yes :noweb-ref
 whatever
 #   b
 # #+END_SRC
 #+BEGIN_SRC sh :results output :noweb yes
   echo whatever
 #+END_SRC

 it is a bug that babel tries to use b.

 babel tries to use COMMENT comments also.

 samuel

 When executing the last code block I get the expected output, namely
 a.

 #+BEGIN_SRC org :results verbatim output :noweb yes :noweb-ref whatever
   a
 #+END_SRC

 # #+BEGIN_SRC org :results verbatim output :noweb yes :noweb-ref whatever
 #   b
 # #+END_SRC

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

 #+RESULTS:
 : a

 Best,

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



 --
 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.



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

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

Denmark: free Karina Hansen NOW.



Re: [O] custom link export and ox-md

2014-02-23 Thread Nick Dokos
John Peloquin john.peloq...@gmail.com writes:

 Greetings,

 I'm trying to define a custom link in org mode with custom export
 formatting, but I get unexpected results when exporting to markdown.


 Minimal example:

 `minimal-init.el`

 (add-to-list 'load-path ~/.emacs.d/elpa/org-20140217)
 (require 'org)
 (add-to-list 'org-export-backends md)

 (org-add-link-type
  cite nil
  (lambda (path desc format)
(format [@%s] path)))


 `minimal.org`

 Some text [[cite:citekey]].


 When I export `minimal.org` to markdown using C-c C-e m M, I get:

 Some text citekey.


 Whereas I expected:

 Some text [@citekey].


 I tried this with a clean emacs configuration (`emacs -Q -l 
 minimal-init.el`).  `org-version` returns 8.2.5h, which as far as I
 know is the latest version.  `emacs-version` is 24.3.1.

 I do get the expected export result if I export to latex or html, so
 the link export definition in init.el does work.  Am I doing something
 wrong? 

No.

 Is this a bug in ox-md?

Yes. There is no provision for handling user-defined link types. Try the
following patch:

--8---cut here---start-8---
diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index b8316dd..fa64f2d 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -340,6 +340,10 @@ a communication channel.
   (when number
 (if (atom number) (number-to-string number)
   (mapconcat 'number-to-string number .
+ ;; Link type is handled by a special function.
+ ((functionp (setq protocol (nth 2 (assoc type org-link-protocols
+  (funcall protocol (org-element-property :path link) contents 'md))
+
  (t (let* ((raw-path (org-element-property :path link))
(path
 (cond
--8---cut here---end---8---


Lightly tested with your reproducer - thanks for providing one!

-- 
Nick




Re: [O] Writing your book with orgmode and publishing it on Leanpub

2014-02-23 Thread Waldemar Quevedo
Hi,

 It is rather annoying that github understands the org syntax but not
quite, so the sources appear almost but not quite right.
I maintain the parser that is being by Github =
https://github.com/wallyqs/org-ruby
If you let me now the issues I can try to fix them, (or PRs are also
welcome)

I also noticed that you are using Jekyll with Org mode,
so in case you are not a fan a adding YAML to your Org mode files I have
this example
where you can use `#+layout:` instead of YAML.
https://github.com/wallyqs/yet-another-jekyll-org-template
https://github.com/eggcaker/jekyll-org/blob/master/convert.rb#L30

Regards,

- Waldemar



On Mon, Feb 24, 2014 at 4:24 AM, Juan Reyero joa...@gmail.com wrote:

 Greetings,

 I've solved a couple of bugs in the Leanpub[1] markdown exporter[2]
 (cross-links within the book using ids were not working, and footnotes
 containing a colon neither).  As far as I can tell using Orgmode and
 Leanpub to publish books is now quite feasible, and produces rather
 nice results.

 I have also published the sources for my book, The Hacker Ways[3], at

 https://github.com/juanre/hacker-ways

 It is rather annoying that github understands the org syntax but not
 quite, so the sources appear almost but not quite right.  Clone and
 open in Emacs to see what's going on.

 Best regards,

 jm
 --
 http://greaterskies.com
 http://juanreyero.com

 [1] Leanpub.com is a very nice self-publishing platform.  I am not
 associated with them, and they are not responsible for my code.

 [2] http://juanreyero.com/open/ox-leanpub/

 [3] https://leanpub.com/hackerways/