Re: [O] Problems with org-bibtex

2013-11-21 Thread Sean O'Halpin
Hi,

I was just trying the same thing (prompted by the recent discussion).
It turned out I had to

#+begin_src emacs-lisp
  (bibtex-set-dialect)
#+end_src

first.

Regards,
Sean


On Thu, Nov 21, 2013 at 3:55 AM, Marvin Doyley marvin...@gmail.com wrote:
 Hi there,

 I have decided to give org-bibtex a try. I have loaded it in my .emacs file,
 but whenever I copy a bibtex entry and try to use org-bibtex-yank I get the
 following error

 Symbol's function definition is void: bibtex-beginning-of-entry

 Could someone tell me what this mean and how to fix it.

 Thanks
 M



Re: [O] Problems with org-bibtex

2013-11-21 Thread Christopher Witte
I have found that opening a (any) bibtex file fixes this for the session. I
have no idea why though.

Chris.


On 21 November 2013 09:25, Sean O'Halpin sean.ohal...@gmail.com wrote:

 Hi,

 I was just trying the same thing (prompted by the recent discussion).
 It turned out I had to

 #+begin_src emacs-lisp
   (bibtex-set-dialect)
 #+end_src

 first.

 Regards,
 Sean


 On Thu, Nov 21, 2013 at 3:55 AM, Marvin Doyley marvin...@gmail.com
 wrote:
  Hi there,
 
  I have decided to give org-bibtex a try. I have loaded it in my .emacs
 file,
  but whenever I copy a bibtex entry and try to use org-bibtex-yank I get
 the
  following error
 
  Symbol's function definition is void: bibtex-beginning-of-entry
 
  Could someone tell me what this mean and how to fix it.
 
  Thanks
  M




[O] [Babel] [Bug] Cache

2013-11-21 Thread Sebastien Vauban
Hello Eric,

IIRC, some time ago, a bug involving the computation of the hash (when option
cache is enabled) and NoWeb code blocks. I remember that it had been fixed.

However, the following example shows it's not (true anymore):

--8---cut here---start-8---
#+PROPERTY: cache yes

#+name: common-code
#+begin_src R :eval no
s - Hello
#+end_src

#+begin_src R :noweb yes
common-code

print(s)
#+end_src

#+results[f472c44e64e310a6d06544dbdfba558a709873a7]:
: Hello
--8---cut here---end---8---

Change the common code block: edit Hello, for example, and you'll see that
the evaluation of the other code block is not redone (like if the NoWeb code
was not expanded for computing the hash). It stays printing Hello.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] \newpage in HTML export

2013-11-21 Thread Suvayu Ali
On Thu, Nov 21, 2013 at 08:11:50AM +0700, Eric Abrahamsen wrote:
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 
  On Wed, Nov 20, 2013 at 03:20:02PM -0600, Russell Adams wrote:
  On Wed, Nov 20, 2013 at 09:15:43PM +, Luke Crook wrote:
  
   That works.  But that means I need both #+HTML: and #+Latex: for the same
   thing. \newpage should convert as appropriate depending on the export.
  
   So, \newpage should translate to the HTML equivalent on HTML export, and 
   the
   Latex equivalent on Latex export.
  
   It only works correctly on Latex export
  
  \newpage is a Latex command, and so you need the #+Latex: prefix if
  you're exporting to multiple formats. That will prevent it from
  happening.
 
  To add a historical comment, eventhough Org claims to be backend
  neutral, it treats LaTeX preferencially in practice.  e.g. many common
  LaTeX commands/macros are understood by Org.
 
  Just follow what Russel said, put them both where you need a pagebreak.
  Try this:
 
  #+MACRO: pagebreak @@latex:\newpage@@ @@html:div style=page-break-before: 
  alwaysnbsp;/div@@
 
  {{{pagebreak}}}
 
  Hope this helps,
 
 Emacs already has the concept of the page-delimiter (defaults to ^L),
 for page-related commands. I once floated the idea of making a
 page-break a full org element, that could be handled differently by
 different backends. I think I made it sound too complicated, though.
 Anyway, that's still a possibility.

This sounds like good idea.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] new export question: how to add a new option to an existing backend

2013-11-21 Thread Yujie Wen
Hi, Eric,

  You can derive a new back-end from existing ones. Please consult org
export reference
documentationhttp://orgmode.org/worg/dev/org-export-reference.html
.

Yujie


2013/11/22 Eric Schulte schulte.e...@gmail.com

 Hi,

 I'd like to add a new option to the LaTeX backend from a contrib/
 package so that it can be set with a #+ keyword.  Is this possible?  If
 so how would one go about making this change.  If not what's the best
 way to add a new optional value to an existing backend (to be used by a
 new link exporting function and/or the org-export-before-parsing-hook).

 Thanks,

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




Re: [O] Is it possible to specify the starting number of headings at exporting

2013-11-21 Thread Yujie Wen
Hi, Jambunathan and Nick

  Yes, I prefer the separated org files be exported to several HTMLs, but
with continuous heading numbering. Not that re-including them and export
into one HTML. :) Thanks for your suggestions.

Yujie


2013/11/21 Nick Dokos ndo...@gmail.com

 Yujie Wen yjwen...@gmail.com writes:

I am wondering whether it is possible to define the starting number
  of headings when exporting org-mode files.
 
The problem is that, I had a long Org file that I want to separate
  it into several small ones, each will be exported to a HTML file. But
  if so, every exported HTML will have the headings numbered from 1,
  while I prefer the headings be numbered as if they are exported from
  one file, to show the continuation of contents.
 

 If you split the big org file into small ones, you can use #+INCLUDE to
 put things back together. It does not do quite what you want - it'll
 produce a single HTML file on export - but I for one don't really care
 what the HTML file looks like, as long as I can edit convenienttly.

 --
 Nick





Re: [O] [BUG][ODT] Subtree export fails when link references target on higher level

2013-11-21 Thread Nicolas Goaziou
Hello,

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

 The two examples below illustrate an odd ODT export failure that occurs in
 restricted circumstances: only when the target of the link is on a
 higher level of the tree than the link. 

 * This fails

 ** A subheader

 This paragraph is bookmarked. target1 

 When I try to export this subtree to ODT (`C-c C-e C-s o O' at point), I get
 : user-error: No such file: /Users/CM/org/OpenDocument export failed: FIXME?

 *** A sub-subheader

 Here's a ref to the bookmark at [[target1]].

In this case, target1 doesn't belong to any headline. What is the
expected output for [[target]]?


Regards,

-- 
Nicolas Goaziou



Re: [O] new export question: how to add a new option to an existing backend

2013-11-21 Thread Nicolas Goaziou
Hello,

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

 I'd like to add a new option to the LaTeX backend from a contrib/
 package so that it can be set with a #+ keyword.  Is this possible?  If
 so how would one go about making this change.  If not what's the best
 way to add a new optional value to an existing backend (to be used by a
 new link exporting function and/or the
 org-export-before-parsing-hook).

It really depends on what you need. I don't get your example. What would
that option do?

Anyway, you can use defadvice (see ox-bibtex.el) to alter the
behaviour of an existing back-end.


Regards,

-- 
Nicolas Goaziou



[O] imaxima babel

2013-11-21 Thread yggdrasil
Hi,

Is there a way to evaluate imaxima source code in org-mode to display
the latex output inline in the org-buffer? I have found in [1] how to
evaluate maxima code, but I don't understand if and how to adopt it to
get the nice latex/pdf output. Any pointers appreciated, or just whether
it is possible or not.


I am running emacs 24.3.1 with org mode 7.9.3f.

Thanks,

Johnny

Footnotes: 
[1]  http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-maxima.html




Re: [O] imaxima babel

2013-11-21 Thread Rüdiger Sonderfeld
TeX output is a feature of Maxima.  See
(info (maxima) Functions and Variables for TeX Output)

E.g.

#+name: solve-maxima
#+header: :exports results
#+begin_src maxima :results output
  tex(exp(-x)/x);
#+end_src

#+RESULTS: solve-maxima
: $${{e^ {- x }}\over{x}}$$


On Thursday 21 November 2013 23:58:35 yggdra...@gmx.co.uk wrote:
 Hi,
 
 Is there a way to evaluate imaxima source code in org-mode to display
 the latex output inline in the org-buffer? I have found in [1] how to
 evaluate maxima code, but I don't understand if and how to adopt it to
 get the nice latex/pdf output. Any pointers appreciated, or just whether
 it is possible or not.
 
 
 I am running emacs 24.3.1 with org mode 7.9.3f.
 
 Thanks,
 
 Johnny
 
 Footnotes:
 [1]  http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-maxima.html




Re: [O] tricky odt export needs

2013-11-21 Thread Christian Moe
Hi, Dan,

Is this the message you get?

 No such file: /[path]/OpenDocument export failed: FIXME?

Does the error always occur when you have my filter set, and never when
you don't?

Does it matter whether you're restricting export to subtrees?

After some more testing, I'm seeing the above error message myself in a
limited set of circumstances (only during subtree export, and only when
the target/bookmark/label is at a higher heading level than the
reference). But whether I use the filter or not does not seem to matter.

I enclose a working version of the filter again, on the off chance that
there was a typo in my previous message.

#+begin_src emacs-lisp
  (defun my-odt-filter-pagerefs (text backend info)
Make page-number references rather than textual references in
  ODT export.
(when (org-export-derived-backend-p backend 'odt)
  (replace-regexp-in-string text:reference-format=\text\ 
text:reference-format=\page\ text)))
  
  (add-to-list 'org-export-filter-link-functions
   'my-odt-filter-pagerefs)
#+end_src

Yours,
Christian

Dan Griswold writes:

 On Thu, Nov 21, 2013 at 11:38 AM, Suvayu Ali 
 fatkasuvayu+li...@gmail.comwrote:

 First I would check the Output buffer.  That should have more
 information on why the export failed.


 Thanks Suvayu. There was no Output buffer, only a few error messages in the
 *Messages* buffer (and these are of dubious relevance.)

 But it seems that the problem occurs only when I have
 org-odt-preferred-output-format set to odt rather than doc or nil.

 Dan




Re: [O] [PATCH] org-compat: Support for getting data from Windows clipboard

2013-11-21 Thread Alexander Vorobiev
Hi Bastien,

The patch doesn't work unfortunately. I stepped through
x-get-selection-value in w32-common-fns.el and the correct value from the
clipboard gets assigned to x-last-selected-text but then the function just
returns nil (line 120). I would say x-last-selected text needs to be used
somehow.

Thanks,
Alex


On Tue, Nov 19, 2013 at 3:40 AM, Bastien b...@gnu.org wrote:

 Hi Alexander,

 can you test the attached patch and let me know if it works for you?

 Thanks,



 --
  Bastien




Re: [O] Is it possible to repeat a block of org-mode text on export, maybe with replacement?

2013-11-21 Thread Gary Oberbrunner
Thanks everyone!  Much appreciated. I think I can get what I want by
fiddling with these.  Thomas, I'm not sure why but yours comes out with
weird indentation which makes the first line not part of the list.  Eric,
yours doesn't seem to create a proper numbered list at all, but is
otherwise just what I'm looking for.  Thorsten, yours comes out looking
great but having to Emacs-stringize the text is, well, you know...

Again thanks all for your helpful suggestions!


On Tue, Nov 19, 2013 at 12:19 PM, Thomas S. Dye t...@tsdye.com wrote:

 Hi Gary,

 I came up with this, which uses example blocks.

 #+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

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

 #+call: repeated-text(x=foo) :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

 #+call: repeated-text(x=bar) :results raw
 #+results:
 1. this is the first line
  2. this is the second line with bar as the value
  3. this is the third line

 #+call: repeated-text(x=baz) :results raw

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

 All the best,
 Tom

 Gary Oberbrunner ga...@oberbrunner.com writes:

  I don't know if this is beyond the capabilities of org-mode or not.  I'd
  like to have a block of text repeated multiple times with slight
  variations.  For the sake of the example, a numbered list:
 
  1. this is the first line
  1. this is the second line with %VARIANT% as the value
  1. this is the third line
 
  When exported, say as ASCII, I'd like this:
 
  1. this is the first line
  2. this is the second line with foo as the value
  3. this is the third line
 
  1. this is the first line
  2. this is the second line with bar as the value
  3. this is the third line
 
  1. this is the first line
  2. this is the second line with baz as the value
  3. this is the third line
 
  I'm not sure how to go about this; I assume I'd use org-babel with source
  blocks that contain org-mode text or elisp or something.
 
  Of course if the right answer is I should write a python script to
 generate
  my org-mode text, well, that's OK too. :-)
 
  --
  Gary
  I don't know if this is beyond the capabilities of org-mode or not. I'd
  like to have a block of text repeated multiple times with slight
  variations. For the sake of the example, a numbered list:
 
  1. this is the first line
  1. this is the second line with %VARIANT% as the value
  1. this is the third line
 
  When exported, say as ASCII, I'd like this:
 
  1. this is the first line
  2. this is the second line with foo as the value
  3. this is the third line
 
  1. this is the first line
  2. this is the second line with bar as the value
  3. this is the third line
 
  1. this is the first line
  2. this is the second line with baz as the value
  3. this is the third line
 
  I'm not sure how to go about this; I assume I'd use org-babel with
  source blocks that contain org-mode text or elisp or something.
 
  Of course if the right answer is I should write a python script to
  generate my org-mode text, well, that's OK too. :-)

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




-- 
Gary


Re: [O] habit-only agenda that doesn't remove tasks when done?

2013-11-21 Thread Christopher Allan Webber
noo...@noorul.com writes:

 Christopher Allan Webber cweb...@dustycloud.org writes:

 Hello,

 I'd like to have a habit-only agenda view, if possible, that looks a bit
 like:


 Morning habits
 --

 life:  TODO Shave   [   * *  ** !]  habit::morning:
 rsi:   TODO morning stretches   [  **   ****   *!]  habit::morning:

 Night habits
 

 life:  TODO Exercise[   * *  ** !]  habit::night:


 ... and maybe an other category for cathing the rest.

 I'd also like to have these habits not drop off the agenda view when I
 move them to DONE if possible.  However, I'm getting the sense that this
 isn't possible... it seems like the habit system works with
 agendas-only, and there's no way to say give me an agenda with only
 these certain things on it.

 Did you try the following custom command?

   (h Habits tags-todo STYLE=\habit\
((org-agenda-overriding-header Habits)
 (org-agenda-sorting-strategy
  '(todo-state-down effort-up category-keep

 Thanks and Regards
 Noorul

Never noticed this reply till now...

Yes, I tried it; unfortunately it does not show the habit graph, that
only displays in the agenda, and the above version uses tags-todo.

I'd like to be able to show habits, *with* the graph though.  The only
way to do that seems to be through the agenda, and the match
parameter of agenda custom commands doesn't seem to support the agenda.

I finally figured out a solution:

#+BEGIN_SRC emacs-lisp
  (defun cwebber/skip-unless-habit ()
Checks to see if the style at point is \habit\
(if (not (equal (org-entry-get (point) STYLE) habit))
; Skip till the next heading
(progn (outline-next-heading) (1- (point)
  
  (setq org-agenda-custom-commands
'((h Habits
   ((agenda
 
 ((org-habit-show-all-today t)
  (org-agenda-skip-function 'cwebber/skip-unless-habit)))
#+END_SRC

This solution works.  It allows me to pull up just the habits, including
those that have already been done today.

There's only one thing left to do that would make it awesome, and that
would be to make it so that the ones that are now already done said DONE
instead of TODO still.

Other than that, this seems to be kinda working-ish.



Re: [O] tricky odt export needs

2013-11-21 Thread Suvayu Ali
On Thu, Nov 21, 2013 at 11:34:55AM -0500, Dan Griswold wrote:
 On Wed, Nov 20, 2013 at 4:33 PM, Christian Moe m...@christianmoe.comwrote:
 
 
  Well, here's one way to get those page references, using filters:
 
  (defun my-odt-filter-pagerefs (text backend info)
 Make page references, not textual references in ODT export.
 (when (org-export-derived-backend-p backend 'odt)
   (replace-regexp-in-string text:reference-format=\text\
  text:reference-format=\page\ text)))
 
  (add-to-list 'org-export-filter-link-functions
'my-odt-filter-pagerefs)
 
  (Whee! I just wrote my first export filter.)
 
 
 That sounds pretty neat, Christian. But I get an export failed error, and
 it doesn't complete creating the odt file. Any suggestions?

First I would check the Output buffer.  That should have more
information on why the export failed.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] \newpage in HTML export

2013-11-21 Thread Eric Abrahamsen
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 On Thu, Nov 21, 2013 at 08:11:50AM +0700, Eric Abrahamsen wrote:
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 
  On Wed, Nov 20, 2013 at 03:20:02PM -0600, Russell Adams wrote:
  On Wed, Nov 20, 2013 at 09:15:43PM +, Luke Crook wrote:
  
   That works.  But that means I need both #+HTML: and #+Latex: for the 
   same
   thing. \newpage should convert as appropriate depending on the export.
  
   So, \newpage should translate to the HTML equivalent on HTML export, 
   and the
   Latex equivalent on Latex export.
  
   It only works correctly on Latex export
  
  \newpage is a Latex command, and so you need the #+Latex: prefix if
  you're exporting to multiple formats. That will prevent it from
  happening.
 
  To add a historical comment, eventhough Org claims to be backend
  neutral, it treats LaTeX preferencially in practice.  e.g. many common
  LaTeX commands/macros are understood by Org.
 
  Just follow what Russel said, put them both where you need a pagebreak.
  Try this:
 
  #+MACRO: pagebreak @@latex:\newpage@@ @@html:div 
  style=page-break-before: alwaysnbsp;/div@@
 
  {{{pagebreak}}}
 
  Hope this helps,
 
 Emacs already has the concept of the page-delimiter (defaults to ^L),
 for page-related commands. I once floated the idea of making a
 page-break a full org element, that could be handled differently by
 different backends. I think I made it sound too complicated, though.
 Anyway, that's still a possibility.

 This sounds like good idea.

Let me see if I can dig up my original patch. Plebiscite!




Re: [O] \newpage in HTML export

2013-11-21 Thread Jambunathan K
Eric Abrahamsen e...@ericabrahamsen.net writes:

 Emacs already has the concept of the page-delimiter (defaults to ^L),
 for page-related commands. I once floated the idea of making a
 page-break a full org element, that could be handled differently by
 different backends.

You are not alone.

The ODT model would be to create a Paragraph style with page-break
before or after.  It is not a standalone element but a special type of
paragraph.

http://lists.gnu.org/archive/html/emacs-orgmode/2013-08/msg00568.html

I have introduced #+PAGEBREAK and also #+ATTR_ODT: :style whatever for
specifically this purpose.

 I think I made it sound too complicated, though.

It is difficult to argue with Nicolas.

He has written down a list of things he want to accomplish somewhere.
Unless your suggestion is a bug or contributes to his list, he is
unlikely to consider it.

 Anyway, that's still a possibility.

Ok. Ok.



Re: [O] Refresh buffer properties and local variables

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

 Bastien b...@gnu.org writes:

 Looks good, please push!


 Pushed to master (I hope...) Let me know if there is a problem.

Thanks Nick. After a pull this morning, my file's local variables aren't
lost when I refresh buffer properties.

All the best,
Tom

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



Re: [O] Links to headings not generated in Tables

2013-11-21 Thread Nick Dokos
Luke Crook l...@balooga.com writes:

 Nicolas Goaziou n.goaziou at gmail.com writes:

 
 Hello,
 
 Luke Crook luke at balooga.com writes:
 
  Hi Nicolas, I'm definitely using 8.2.2, as reported by org-version.
 
 OK. Then could you provide an ECM? I'm unable to reproduce the problem.
 
 Regards,
 


 Hi Nicolas,

 The first two work correctly, the third does not generate a link for me.



 | [[id:6920d682-963f-412b-927b-af7dcfd57c79][Code 13]]  |
 | [[*Code 13]] |
 | [[*Code 13][Code 13]]  |


 *** Code 13
 :PROPERTIES:
 :ID:   6920d682-963f-412b-927b-af7dcfd57c79
 :END:

It does for me - here's the table in the HTML output:

--8---cut here---start-8---
table border=2 cellspacing=0 cellpadding=6 rules=groups frame=hsides


colgroup
col  class=left /
/colgroup
tbody
tr
td class=lefta href=#sec-1Code 13/a/td
/tr

tr
td class=lefta href=#sec-11/a/td
/tr

tr
td class=lefta href=#sec-1Code 13/a/td
/tr
/tbody
/table
--8---cut here---end---8---

Org-mode version 8.2.3c (release_8.2.3c-256-g5ea022.dirty @
/home/nick/elisp/org-mode/lisp/)

Nick




Re: [O] Refresh buffer properties and local variables

2013-11-21 Thread Nick Dokos
Bastien b...@gnu.org writes:

 Looks good, please push!


Pushed to master (I hope...) Let me know if there is a problem.

-- 
Nick




[O] Is it possible to specify the starting number of headings at exporting

2013-11-21 Thread Yujie Wen
Hi, there,

  I am wondering whether it is possible to define the starting number of
headings when exporting org-mode files.

  The problem is that, I had a long Org file that I want to separate it
into several small ones, each will be exported to a HTML file. But if so,
every exported HTML will have the headings numbered from 1, while I prefer
the headings be numbered as if they are exported from one file, to show the
continuation of contents.

 I searched the Org document but didn't find anything useful. I would
appreciate very much If you have come across some similar requirement and
give me any guidance. Thanks!

Regards,
Yujie


Re: [O] [ANN] Improved Flyspell check

2013-11-21 Thread Rasmus

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

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

 Updated patch.

I've been using this patch without issues for at least two week.  I
haven't experienced any slowdowns over wcheck other than that
associated with the design of Flyspell (e.g. flyspell-buffer moves the
cursor over all words).

Quick question: does ISpell/Flyspell feature options to:

  1. Move the ispell suggestion window to the bottom of the window
 (rather than the top)

  2. Select the first suggestion with 1 rather than 0?  The latter is
 harder to press on my keyboard.

Thanks,
Rasmus

-- 
Got mashed potatoes. Ain't got no T-Bone. No T-Bone



Re: [O] Problems with org-bibtex

2013-11-21 Thread Jambunathan K
Marvin Doyley marvin...@gmail.com writes:

 Symbol's function definition is void: bibtex-beginning-of-entry

Whenever you get an error, do

M-x toggle-debug-on-error

and post the *Backtrace* buffer.

I am still surprised why (even) regulars in this list fail to do it.



Re: [O] Problems with org-bibtex

2013-11-21 Thread Marvin Doyley
Hi there,

I found the bug.

It turned out that an old copy of bibtex.el was the culprit, deleting this
fixed  the problem.
Thanks again for all your help.
Cheers,
M


On Thu, Nov 21, 2013 at 10:12 AM, Marvin Doyley marvin...@gmail.com wrote:

 Hi Chris,
 That didn't work either.

 When I did
 #+begin_src emacs-lisp
   (bibtex-set-dialect)
 #+end_src

 I got the following error
 Debugger entered--Lisp error: (void-function bibtex-set-dialect)
   (bibtex-set-dialect)
   (progn (bibtex-set-dialect))
   eval((progn (bibtex-set-dialect)))
   org-babel-execute:emacs-lisp((bibtex-set-dialect) ((:comments . )
 (:shebang . ) (:cache . no) (:padline . ) (:noweb . no) (:tangle .
 no) (:exports . code) (:results . replace) (:session . none)
 (:hlines . no) (:result-type . value) (:result-params replace)
 (:rowname-names) (:colname-names)))
   org-babel-execute-src-block(nil)
   org-babel-execute-src-block-maybe()
   org-babel-execute-maybe()
   org-babel-execute-safely-maybe()
   run-hook-with-args-until-success(org-babel-execute-safely-maybe)
   org-ctrl-c-ctrl-c(nil)
   call-interactively(org-ctrl-c-ctrl-c nil nil)



 On Thu, Nov 21, 2013 at 5:43 AM, Christopher Witte ch...@witte.net.auwrote:

 I have found that opening a (any) bibtex file fixes this for the session.
 I have no idea why though.

 Chris.


 On 21 November 2013 09:25, Sean O'Halpin sean.ohal...@gmail.com wrote:

 Hi,

 I was just trying the same thing (prompted by the recent discussion).
 It turned out I had to

 #+begin_src emacs-lisp
   (bibtex-set-dialect)
 #+end_src

 first.

 Regards,
 Sean


 On Thu, Nov 21, 2013 at 3:55 AM, Marvin Doyley marvin...@gmail.com
 wrote:
  Hi there,
 
  I have decided to give org-bibtex a try. I have loaded it in my .emacs
 file,
  but whenever I copy a bibtex entry and try to use org-bibtex-yank I
 get the
  following error
 
  Symbol's function definition is void: bibtex-beginning-of-entry
 
  Could someone tell me what this mean and how to fix it.
 
  Thanks
  M






[O] rainbow parenthesis with org babel for reveal.js export

2013-11-21 Thread bernard
Dear list,

I am currently very happy to use orgmode and org-reveal [0] to create slide
for my lessons about programming.
I enjoy using src block to have automatic syntax highlighting for the code
fragments.
However, I now have the joy to teach a lisp variant (Clojure) for which I
have some syntactic coloring in HTML.
However, I miss rainbow parenthesis (and my students even more so !).
org-reveal page says : Org-reveal use Org-Babel to highlight source codes.
hence my message here.

Any advice would be greatly appreciated !

Best Regards

Bernard

[0] https://github.com/yjwen/org-reveal




Re: [O] Is it possible to specify the starting number of headings at exporting

2013-11-21 Thread Jambunathan K

(info (org) Include files)



Yujie Wen yjwen...@gmail.com writes:

 Hi, there,

 I am wondering whether it is possible to define the starting number of
 headings when exporting org-mode files.

 The problem is that, I had a long Org file that I want to separate it
 into several small ones, each will be exported to a HTML file. But if
 so, every exported HTML will have the headings numbered from 1, while
 I prefer the headings be numbered as if they are exported from one
 file, to show the continuation of contents.

 I searched the Org document but didn't find anything useful. I would
 appreciate very much If you have come across some similar requirement
 and give me any guidance. Thanks!

 Regards,
 Yujie



Re: [O] managing articles in my personal library, and their citational material, using org mode instead of bibtex

2013-11-21 Thread Alan L Tyree

On 20/11/13 17:27, Jambunathan K wrote:

Alan L Tyree alanty...@gmail.com writes:


What I mean is to enter something like \cite{mann82} in the text and
have it spit out (Mann 1982) in each and every export as well as
constructing an entry for the bibliography.

(For benefit of others)

ox-jabref.el and JabRef can spit things out in different formats.  I

I have added support for the odt backend.  But I have fleshed out the
basic details so that it could be re-targeted for HTML or Plain Ascii
export.



Often the problem is that the author is stuck with a given DB and tool
and is unwilling to let go of investments that he has made in that
specific tool.  (This is perfectly understandable.)

Hi Jambu,
This is a bit cryptic. It seems to me that it is relatively easy to 
change DB and tools. I currently keep all my references in a bibtex DB, 
but there are plenty of conversion tools. The real problem is finding 
something that works.


I still find Org mode a bit frustrating in this context. In the above 
quote I say something like \cite, but I don't really care what the 
entry looks like as long as it can retrieve information from a DB and 
construct the correct text reference and the correct bibliography entry 
across all exports.


Is there such a DB and tool?

Cheers,
Alan









--
Alan L Tyreehttp://www2.austlii.edu.au/~alan
Tel:  04 2748 6206  sip:typh...@iptel.org




Re: [O] rainbow parenthesis with org babel for reveal.js export

2013-11-21 Thread Eric Schulte
Hi Bernard,

Org-mode uses htmlize.el [1] to fontify source code blocks.  Htmlize
directly converts an Emacs buffer to HTML, so if you are exporting from
a buffer in which parenthesis are colorized, then the exported HTML
should be colorized as well.  If not then this is a question for htmlize
and/or rainbox-paren developers.

Best,

bernard gmane.emacs.orgm...@bernard-hugueney.org writes:

 Dear list,

 I am currently very happy to use orgmode and org-reveal [0] to create slide
 for my lessons about programming.
 I enjoy using src block to have automatic syntax highlighting for the code
 fragments.
 However, I now have the joy to teach a lisp variant (Clojure) for which I
 have some syntactic coloring in HTML.
 However, I miss rainbow parenthesis (and my students even more so !).
 org-reveal page says : Org-reveal use Org-Babel to highlight source codes.
 hence my message here.

 Any advice would be greatly appreciated !

 Best Regards

 Bernard

 [0] https://github.com/yjwen/org-reveal




Footnotes: 
[1]  http://www.emacswiki.org/emacs/Htmlize

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



[O] [BUG][ODT] Subtree export fails when link references target on higher level

2013-11-21 Thread Christian Moe

The two examples below illustrate an odd ODT export failure that occurs in
restricted circumstances: only when the target of the link is on a
higher level of the tree than the link. 

* This fails

** A subheader

This paragraph is bookmarked. target1 

When I try to export this subtree to ODT (`C-c C-e C-s o O' at point), I get
: user-error: No such file: /Users/CM/org/OpenDocument export failed: FIXME?

*** A sub-subheader

Here's a ref to the bookmark at [[target1]].

* This works

Here, I reverse the positions of reference and target from the first example.

** A subheader

Here's a ref to the bookmark at [[target2]].

I can do subtree export from here with no problem.

*** A sub-subheader

This paragraph is bookmarked. target2




Re: [O] Problems with org-bibtex

2013-11-21 Thread Marvin Doyley
Hi Chris,
That didn't work either.

When I did
#+begin_src emacs-lisp
  (bibtex-set-dialect)
#+end_src

I got the following error
Debugger entered--Lisp error: (void-function bibtex-set-dialect)
  (bibtex-set-dialect)
  (progn (bibtex-set-dialect))
  eval((progn (bibtex-set-dialect)))
  org-babel-execute:emacs-lisp((bibtex-set-dialect) ((:comments . )
(:shebang . ) (:cache . no) (:padline . ) (:noweb . no) (:tangle .
no) (:exports . code) (:results . replace) (:session . none)
(:hlines . no) (:result-type . value) (:result-params replace)
(:rowname-names) (:colname-names)))
  org-babel-execute-src-block(nil)
  org-babel-execute-src-block-maybe()
  org-babel-execute-maybe()
  org-babel-execute-safely-maybe()
  run-hook-with-args-until-success(org-babel-execute-safely-maybe)
  org-ctrl-c-ctrl-c(nil)
  call-interactively(org-ctrl-c-ctrl-c nil nil)



On Thu, Nov 21, 2013 at 5:43 AM, Christopher Witte ch...@witte.net.auwrote:

 I have found that opening a (any) bibtex file fixes this for the session.
 I have no idea why though.

 Chris.


 On 21 November 2013 09:25, Sean O'Halpin sean.ohal...@gmail.com wrote:

 Hi,

 I was just trying the same thing (prompted by the recent discussion).
 It turned out I had to

 #+begin_src emacs-lisp
   (bibtex-set-dialect)
 #+end_src

 first.

 Regards,
 Sean


 On Thu, Nov 21, 2013 at 3:55 AM, Marvin Doyley marvin...@gmail.com
 wrote:
  Hi there,
 
  I have decided to give org-bibtex a try. I have loaded it in my .emacs
 file,
  but whenever I copy a bibtex entry and try to use org-bibtex-yank I get
 the
  following error
 
  Symbol's function definition is void: bibtex-beginning-of-entry
 
  Could someone tell me what this mean and how to fix it.
 
  Thanks
  M





Re: [O] managing articles in my personal library, and their citational material, using org mode instead of bibtex

2013-11-21 Thread Jambunathan K
Alan L Tyree alanty...@gmail.com writes:

 What I mean is to enter something like \cite{mann82} in the text and
 have it spit out (Mann 1982) in each and every export as well as
 constructing an entry for the bibliography.

(For benefit of others)

ox-jabref.el and JabRef can spit things out in different formats.  I

I have added support for the odt backend.  But I have fleshed out the
basic details so that it could be re-targeted for HTML or Plain Ascii
export.



Often the problem is that the author is stuck with a given DB and tool
and is unwilling to let go of investments that he has made in that
specific tool.  (This is perfectly understandable.)





Re: [O] Is it possible to specify the starting number of headings at exporting

2013-11-21 Thread Nick Dokos
Yujie Wen yjwen...@gmail.com writes:

   I am wondering whether it is possible to define the starting number
 of headings when exporting org-mode files.

   The problem is that, I had a long Org file that I want to separate
 it into several small ones, each will be exported to a HTML file. But
 if so, every exported HTML will have the headings numbered from 1,
 while I prefer the headings be numbered as if they are exported from
 one file, to show the continuation of contents.


If you split the big org file into small ones, you can use #+INCLUDE to
put things back together. It does not do quite what you want - it'll
produce a single HTML file on export - but I for one don't really care
what the HTML file looks like, as long as I can edit convenienttly.

-- 
Nick




Re: [O] rainbow parenthesis with org babel for reveal.js export

2013-11-21 Thread bernard
Eric Schulte schulte.eric at gmail.com writes:

 Org-mode uses htmlize.el [1] to fontify source code blocks.  Htmlize
 directly converts an Emacs buffer to HTML, so if you are exporting from
 a buffer in which parenthesis are colorized, then the exported HTML
 should be colorized as well.[…]

Thanks for the ultra-fast helpful answer. Pointing me to Htmilze allowed my
search-fu to find
http://yoo2080.wordpress.com/2013/08/26/how-to-make-rainbow-delimiters-mode-work-with-org-mode-export-or-htmlize/.

Cheers,

Bernard





[O] new export question: how to add a new option to an existing backend

2013-11-21 Thread Eric Schulte
Hi,

I'd like to add a new option to the LaTeX backend from a contrib/
package so that it can be set with a #+ keyword.  Is this possible?  If
so how would one go about making this change.  If not what's the best
way to add a new optional value to an existing backend (to be used by a
new link exporting function and/or the org-export-before-parsing-hook).

Thanks,

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



Re: [O] Problems with org-bibtex

2013-11-21 Thread Nick Dokos
Marvin Doyley marvin...@gmail.com writes:

 Hi Chris,
 That didn't work either.

 When I did
 #+begin_src emacs-lisp
   (bibtex-set-dialect)
 #+end_src

 I got the following error
 Debugger entered--Lisp error: (void-function bibtex-set-dialect)
   (bibtex-set-dialect)

Try
(require 'bibtex)

That should have been done automatically (e.g. when you load org-bibtex) but it 
seems to
not have been, for unknown reasons.

Nick


 On Thu, Nov 21, 2013 at 3:55 AM, Marvin Doyley marvin...@gmail.com 
 wrote:
  Hi there,
 
  I have decided to give org-bibtex a try. I have loaded it in my 
 .emacs file,
  but whenever I copy a bibtex entry and try to use org-bibtex-yank I 
 get the
  following error
 
  Symbol's function definition is void: bibtex-beginning-of-entry
 
  Could someone tell me what this mean and how to fix it.
 
  Thanks
  M




Re: [O] tricky odt export needs

2013-11-21 Thread Dan Griswold
Well, as you can see with my exchange with Suvayu I got past the error. Yet
I still have a strange problem. Your solution works on a small test file,
but not on my large (~ 13k words) document. The conversion of text to
page just doesn't happen.

I do have a special style file, so I thought that might be the issue. But
even when I remove the line #+ODT_STYLES_FILE: book.ott
 from the head of the file, there still seems to be no conversion.

Puzzled,

Dan



On Wed, Nov 20, 2013 at 4:33 PM, Christian Moe m...@christianmoe.comwrote:


 I said:

  You can do cross-references with ordinary links. Have a look at the
  manual section 4.2, Internal links. However, what you get out of the
  box is textual references to e.g. section headings, not page
  references. You can change that for each reference individually by
  right-clicking on them in LibreOffice. There should be a way to get page
  references by default, but off the cuff, I'm not sure how.

 Well, here's one way to get those page references, using filters:

 (defun my-odt-filter-pagerefs (text backend info)
Make page references, not textual references in ODT export.
(when (org-export-derived-backend-p backend 'odt)
  (replace-regexp-in-string text:reference-format=\text\
 text:reference-format=\page\ text)))

 (add-to-list 'org-export-filter-link-functions
   'my-odt-filter-pagerefs)

 (Whee! I just wrote my first export filter.)

 Org doesn't know what the page number will be, so when you open the
 document in e.g. LibreOffice, you still have to update fields (Tools 
 Update) before you see page numbers.

 Yours,
 Christian






Re: [O] tricky odt export needs

2013-11-21 Thread Christian Moe

Dan Griswold writes:

 Well, as you can see with my exchange with Suvayu I got past the error. Yet
 I still have a strange problem. Your solution works on a small test file,
 but not on my large (~ 13k words) document. The conversion of text to
 page just doesn't happen.

Odd. The document I tested on yesterday was not much smaller.

 I do have a special style file, so I thought that might be the issue. But
 even when I remove the line #+ODT_STYLES_FILE: book.ott
  from the head of the file, there still seems to be no conversion.

No, I can't think of any reason why a style file would interfere.

Puzzled, too.

Christian




Re: [O] Links to headings not generated in Tables

2013-11-21 Thread Luke Crook
Nicolas Goaziou n.goaziou at gmail.com writes:

 
 Hello,
 
 Luke Crook luke at balooga.com writes:
 
  Hi Nicolas, I'm definitely using 8.2.2, as reported by org-version.
 
 OK. Then could you provide an ECM? I'm unable to reproduce the problem.
 
 Regards,
 


Hi Nicolas,

The first two work correctly, the third does not generate a link for me.



| [[id:6920d682-963f-412b-927b-af7dcfd57c79][Code 13]]  |
| [[*Code 13]] |
| [[*Code 13][Code 13]]  |


*** Code 13
:PROPERTIES:
:ID:   6920d682-963f-412b-927b-af7dcfd57c79
:END:





Re: [O] managing articles in my personal library, and their citational material, using org mode instead of bibtex

2013-11-21 Thread Eric Schulte
Richard Lawrence richard.lawre...@berkeley.edu writes:

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

 Ian Barton li...@wilkesley.net writes:

 On 19/11/13 01:40, Christopher W. Ryan wrote:
 Not sure citational is even a word, but hopefully it conveys my meaning!

 I've been using LaTeX for academic writing and reading for quite some
 time, with emacs as my editor. I'm pretty familiar with managing a .bib
 file containing all the references I've collected, and using it in LaTeX
 \cite commands.

 I've come to org-mode more recently. I'm trying to imagine how I might
 use it to manage my personal library. I have a directory full of pdf
 files, each a downloaded article. Some articles I reference in papers I
 write; others I just read and want to keep.  I also have a .bib file
 where I put the citational material for all those articles. Whenever I
 download an article, I add its entry to my .bib file. I tend to manage
 this with JabRef because it searches Medline so easily, but I also will
 edit the .bib file directly when necessary.

 I like the idea of an org file containing the citational information
 (authors, title, journal, etc)  *plus* links to the pdfs on my hard
 drive, or on the internet. I could also include my notes about the
 articles. But what would that org file look like? How do I insert a
 reference to an article into the org file which contains the article I
 am writing?

 I'd be grateful for any explanations, or links to tutorials.


 I am also a grad student, and I use a setup which is similar to Eric's,
 but rather than importing from bibtex, I use Org's capture features to
 directly input the bibliographic data when I come across something I
 want to add to my reading list.  I don't maintain a separate .bib file
 at all; rather I generate it as needed from the Org file containing my
 reading list.

 This setup allows me to think of readings as TODO items included in my
 agenda, take notes and make links in the entry, and also keep
 bibliographic data in Org (which I export via org-bibtex).

 Here's what my setup looks like:

 1)  A capture template for new readings.  My template looks like this:

 ** %^{Todo state|FIND|PRINT|READ|NOTES} [#%^{Priority|A|B|C}] 
 %^{Description|Reading} %^g
%^{TITLE}p %^{AUTHOR}p %^{AREA}p %?
:PROPERTIES:
:Entered: %U
:END:

 This template does not have a field for adding links to PDFs, but you
 could easily add that.

 2) A hook to add bibliographic data to reading entries when finalizing a
 capture.  I put this in my Org setup:

 ;; post-processing in capture templates
 (defun add-bibliographic-data ()
   ; this is a bit hacky: we detect the AUTHOR property, and create bibtex 
 entries if
   ; it is present
   (message optionally adding bibliographic data)
   (if (and (org-entry-get (point) AUTHOR)
  (y-or-n-p Add bibliographic data? ))
   ; with prefix arg to get all fields:
   (org-bibtex-create-in-current-entry 1)
 nil))

 (add-hook 'org-capture-before-finalize-hook (lambda () 
 (add-bibliographic-data)))

 There may be a better way to do this, but it works for me!

 3) Elisp functions to export my entire reading list to .bib (these
 assume that your readings are not in a separate file, but under a top-level
 entry called Reading list in some other file):

 ;; lib/el/bib-export.el in my dissertation tree:
 (setq dissertation-bib-file 
 ~/Documents/philosophy/dissertation/build/dissertation.bib)

 (defun add-headline-to-bib-buffer (bib-buffer)
   Export headline at point to Bibtex into the given buffer
   (let ((bib-entry (org-bibtex-headline))
   (custom-id (org-entry-get (point) CUSTOM_ID)))
 (if (and custom-id bib-entry)
   (with-current-buffer bib-buffer
 (insert bib-entry)
 
 (defun export-subtree-to-bib-buffer (headline bib-buffer)
   Export the entries in the subtree at point to Bibtex into the given 
 buffer.
   (save-excursion
   (goto-char (org-find-exact-headline-in-buffer headline))
   (org-map-entries
(lambda () (add-headline-to-bib-buffer bib-buffer))
t ; match: all entries below this one
'tree ; scope: just this subtree
)))

 (defun reading-list-to-bibtex ()
   Export 'Reading list' headline in current buffer to dissertation.bib
   (interactive)
   (let ((org-buffer (current-buffer))
   (bib-buffer (create-file-buffer dissertation.bib)))
 (export-subtree-to-bib-buffer Reading list bib-buffer)
 (with-current-buffer bib-buffer
   (write-file dissertation-bib-file

 4) A Makefile entry to call the export functions:

 BATCH_EMACS=$(EMACS) --batch -Q 

 bib: tasks.org lib/el/bib-export.el
   $(BATCH_EMACS) --load lib/el/bib-export.el --file tasks.org --funcall 
 reading-list-to-bibtex


 Thus, I can run make bib in my dissertation tree and get a fresh
 export of all my readings to a .bib file.

 Hope that helps!

 Best,
 Richard


Very cool,

I think some of these functions could be merged into

Re: [O] tricky odt export needs

2013-11-21 Thread Dan Griswold
On Thu, Nov 21, 2013 at 11:38 AM, Suvayu Ali fatkasuvayu+li...@gmail.comwrote:

 First I would check the Output buffer.  That should have more
 information on why the export failed.


Thanks Suvayu. There was no Output buffer, only a few error messages in the
*Messages* buffer (and these are of dubious relevance.)

But it seems that the problem occurs only when I have
org-odt-preferred-output-format set to odt rather than doc or nil.

Dan


Re: [O] tricky odt export needs

2013-11-21 Thread Dan Griswold
On Wed, Nov 20, 2013 at 4:33 PM, Christian Moe m...@christianmoe.comwrote:


 Well, here's one way to get those page references, using filters:

 (defun my-odt-filter-pagerefs (text backend info)
Make page references, not textual references in ODT export.
(when (org-export-derived-backend-p backend 'odt)
  (replace-regexp-in-string text:reference-format=\text\
 text:reference-format=\page\ text)))

 (add-to-list 'org-export-filter-link-functions
   'my-odt-filter-pagerefs)

 (Whee! I just wrote my first export filter.)


That sounds pretty neat, Christian. But I get an export failed error, and
it doesn't complete creating the odt file. Any suggestions?

Thanks,

Dan


Re: [O] new export question: how to add a new option to an existing backend

2013-11-21 Thread Eric Schulte
Yujie Wen yjwen...@gmail.com writes:

 Hi, Eric,

   You can derive a new back-end from existing ones. Please consult org
 export reference
 documentationhttp://orgmode.org/worg/dev/org-export-reference.html
 .

 Yujie


Yes, I've done this before, however I'm hoping to modify an existing
backend.

Best,



 2013/11/22 Eric Schulte schulte.e...@gmail.com

 Hi,

 I'd like to add a new option to the LaTeX backend from a contrib/
 package so that it can be set with a #+ keyword.  Is this possible?  If
 so how would one go about making this change.  If not what's the best
 way to add a new optional value to an existing backend (to be used by a
 new link exporting function and/or the org-export-before-parsing-hook).

 Thanks,

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



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



Re: [O] imaxima babel

2013-11-21 Thread Eric Schulte
Changing :results output to :results output latex in Rüdiger's nice
example below would probably be an improvement.

Best,

Rüdiger Sonderfeld ruedi...@c-plusplus.de writes:

 TeX output is a feature of Maxima.  See
 (info (maxima) Functions and Variables for TeX Output)

 E.g.

 #+name: solve-maxima
 #+header: :exports results
 #+begin_src maxima :results output
   tex(exp(-x)/x);
 #+end_src
 #+RESULTS: solve-maxima
 : $${{e^ {- x }}\over{x}}$$


 On Thursday 21 November 2013 23:58:35 yggdra...@gmx.co.uk wrote:
 Hi,
 
 Is there a way to evaluate imaxima source code in org-mode to display
 the latex output inline in the org-buffer? I have found in [1] how to
 evaluate maxima code, but I don't understand if and how to adopt it to
 get the nice latex/pdf output. Any pointers appreciated, or just whether
 it is possible or not.
 
 
 I am running emacs 24.3.1 with org mode 7.9.3f.
 
 Thanks,
 
 Johnny
 
 Footnotes:
 [1]  http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-maxima.html



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



Re: [O] new export question: how to add a new option to an existing backend

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

 Hello,

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

 I'd like to add a new option to the LaTeX backend from a contrib/
 package so that it can be set with a #+ keyword.  Is this possible?  If
 so how would one go about making this change.  If not what's the best
 way to add a new optional value to an existing backend (to be used by a
 new link exporting function and/or the
 org-export-before-parsing-hook).

 It really depends on what you need. I don't get your example. What would
 that option do?

 Anyway, you can use defadvice (see ox-bibtex.el) to alter the
 behaviour of an existing back-end.


Hi Nicolas,

Thanks!  I was not aware that ox-bibtex.el existed, this accomplishes
exactly the use case I had in mind.  I've just pushed up two very small
changes to ox-bibtex.

1. The cite link following function falls back to obe-goto-citation if
   ebib is not fbound, and

2. `org-bibtex-process-bib-files' is only called on HTML export, so
   bibtex2html is not a requirement of ox-bibtex if used for latex
   export only.

Best,



 Regards,

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



Re: [O] managing articles in my personal library, and their citational material, using org mode instead of bibtex

2013-11-21 Thread Eric Schulte
Alan L Tyree alanty...@gmail.com writes:

 On 20/11/13 17:27, Jambunathan K wrote:
 Alan L Tyree alanty...@gmail.com writes:

 What I mean is to enter something like \cite{mann82} in the text and
 have it spit out (Mann 1982) in each and every export as well as
 constructing an entry for the bibliography.
 (For benefit of others)

 ox-jabref.el and JabRef can spit things out in different formats.  I

 I have added support for the odt backend.  But I have fleshed out the
 basic details so that it could be re-targeted for HTML or Plain Ascii
 export.

 

 Often the problem is that the author is stuck with a given DB and tool
 and is unwilling to let go of investments that he has made in that
 specific tool.  (This is perfectly understandable.)
 Hi Jambu,
 This is a bit cryptic. It seems to me that it is relatively easy to
 change DB and tools. I currently keep all my references in a bibtex
 DB, but there are plenty of conversion tools. The real problem is
 finding something that works.

 I still find Org mode a bit frustrating in this context. In the above
 quote I say something like \cite, but I don't really care what the
 entry looks like as long as it can retrieve information from a DB and
 construct the correct text reference and the correct bibliography
 entry across all exports.

 Is there such a DB and tool?

 Cheers,
 Alan


Checkout ox-bibtex.el in contrib used in combination with either ebib or
org-bibtex-extras.el.

Best,

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



Re: [O] managing articles in my personal library, and their citational material, using org mode instead of bibtex

2013-11-21 Thread Eric Schulte
 In the mean time I just pushed up a small change to this file which
 will resolve cite: links and export them correctly to LaTeX.


I just reverted my addition to org-bibtex-extras.el as it looks like
ox-bibtex.el (also in contrib) already handles cite: links on export.

Best,

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



Re: [O] Show TODO item in table of contents

2013-11-21 Thread Bernt Hansen
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Bastien b...@gnu.org writes:

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

 In html export include todo state words in table of contents.

 Would the following patch do the job?

 It does for me!  Thanks

 Applied then.


 Regards,

Hi Nicolas,

This patch 
4c94c4d (ox-html: Add TODO keyword to TOC entries, 2013-11-06)

changes the behaviour of HTML TOCs.  I noticed that when I export my
org-mode document (http://doc.norang.ca/org-mode.html) with this patch
the TOC no longer has numbering on the items - and it is just displayed
as a plain list.

Was this intended?  I prefer the old behaviour with numbered TOC entries
matching the numbered headlines (esp since my TOC in this document is
long)

Can this be fixed?

Thanks and regards,
Bernt




Re: [O] managing articles in my personal library, and their citational material, using org mode instead of bibtex

2013-11-21 Thread Alan L Tyree

On 22/11/13 15:04, Eric Schulte wrote:

Alan L Tyree alanty...@gmail.com writes:


On 20/11/13 17:27, Jambunathan K wrote:

Alan L Tyree alanty...@gmail.com writes:


What I mean is to enter something like \cite{mann82} in the text and
have it spit out (Mann 1982) in each and every export as well as
constructing an entry for the bibliography.

(For benefit of others)

ox-jabref.el and JabRef can spit things out in different formats.  I

I have added support for the odt backend.  But I have fleshed out the
basic details so that it could be re-targeted for HTML or Plain Ascii
export.



Often the problem is that the author is stuck with a given DB and tool
and is unwilling to let go of investments that he has made in that
specific tool.  (This is perfectly understandable.)

Hi Jambu,
This is a bit cryptic. It seems to me that it is relatively easy to
change DB and tools. I currently keep all my references in a bibtex
DB, but there are plenty of conversion tools. The real problem is
finding something that works.

I still find Org mode a bit frustrating in this context. In the above
quote I say something like \cite, but I don't really care what the
entry looks like as long as it can retrieve information from a DB and
construct the correct text reference and the correct bibliography
entry across all exports.

Is there such a DB and tool?

Cheers,
Alan


Checkout ox-bibtex.el in contrib used in combination with either ebib or
org-bibtex-extras.el.

Thanks Eric - I'll have a look.
Cheers,
Alan



Best,




--
Alan L Tyreehttp://www2.austlii.edu.au/~alan
Tel:  04 2748 6206  sip:typh...@iptel.org




[O] [PATCH] Re: \newpage in HTML export

2013-11-21 Thread Eric Abrahamsen
Eric Abrahamsen e...@ericabrahamsen.net writes:

 Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 On Thu, Nov 21, 2013 at 08:11:50AM +0700, Eric Abrahamsen wrote:
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 
  On Wed, Nov 20, 2013 at 03:20:02PM -0600, Russell Adams wrote:
  On Wed, Nov 20, 2013 at 09:15:43PM +, Luke Crook wrote:
  
   That works.  But that means I need both #+HTML: and #+Latex: for the 
   same
   thing. \newpage should convert as appropriate depending on the export.
  
   So, \newpage should translate to the HTML equivalent on HTML export, 
   and the
   Latex equivalent on Latex export.
  
   It only works correctly on Latex export
  
  \newpage is a Latex command, and so you need the #+Latex: prefix if
  you're exporting to multiple formats. That will prevent it from
  happening.
 
  To add a historical comment, eventhough Org claims to be backend
  neutral, it treats LaTeX preferencially in practice.  e.g. many common
  LaTeX commands/macros are understood by Org.
 
  Just follow what Russel said, put them both where you need a pagebreak.
  Try this:
 
  #+MACRO: pagebreak @@latex:\newpage@@ @@html:div 
  style=page-break-before: alwaysnbsp;/div@@
 
  {{{pagebreak}}}
 
  Hope this helps,
 
 Emacs already has the concept of the page-delimiter (defaults to ^L),
 for page-related commands. I once floated the idea of making a
 page-break a full org element, that could be handled differently by
 different backends. I think I made it sound too complicated, though.
 Anyway, that's still a possibility.

 This sounds like good idea.

 Let me see if I can dig up my original patch. Plebiscite!

Here's a fairly simple first stab, with page breaks made into an
element, and a sample handling in the LaTeX backend. I've hardcoded ^L
and the page-delimiter regexp that finds it, not sure it's worth
providing an org-page-delimiter shadow. For now, use C-q C-l to insert
the control character.

If this passes muster I can go through the other backends and add
page-break handling where it makes sense. If not, I'll just keep it on
my local branch!

E

From 377f447623756c5bf07302d99004678e2bfba135 Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen e...@ericabrahamsen.net
Date: Fri, 22 Nov 2013 14:41:28 +0700
Subject: [PATCH] Preliminary page break proposal

---
 lisp/org-element.el | 50 +++---
 lisp/ox-latex.el| 16 
 2 files changed, 59 insertions(+), 7 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 57e26ff..3e2affb 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -48,10 +48,10 @@
 ;; Other element types are: `babel-call', `clock', `comment',
 ;; `comment-block', `diary-sexp', `example-block', `export-block',
 ;; `fixed-width', `horizontal-rule', `keyword', `latex-environment',
-;; `node-property', `paragraph', `planning', `quote-section',
-;; `src-block', `table', `table-row' and `verse-block'.  Among them,
-;; `paragraph' and `verse-block' types can contain Org objects and
-;; plain text.
+;; `node-property', `page-break', `paragraph', `planning',
+;; `quote-section', `src-block', `table', `table-row' and
+;; `verse-block'.  Among them, `paragraph' and `verse-block' types can
+;; contain Org objects and plain text.
 ;;
 ;; Objects are related to document's contents.  Some of them are
 ;; recursive.  Associated types are of the following: `bold', `code',
@@ -174,8 +174,8 @@ is not sufficient to know if point is at a paragraph ending.  See
   '(babel-call center-block clock comment comment-block diary-sexp drawer
 	   dynamic-block example-block export-block fixed-width
 	   footnote-definition headline horizontal-rule inlinetask item
-	   keyword latex-environment node-property paragraph plain-list
-	   planning property-drawer quote-block quote-section section
+	   keyword latex-environment node-property page-break paragraph
+	   plain-list planning property-drawer quote-block quote-section section
 	   special-block src-block table table-row verse-block)
   Complete list of element types.)
 
@@ -204,7 +204,7 @@ regexp matching one object can also match the other object.)
 
 (defconst org-element-all-objects
   '(bold code entity export-snippet footnote-reference inline-babel-call
-	 inline-src-block italic line-break latex-fragment link macro
+	 inline-src-block italic line-break latex-fragment link macro page-break
 	 radio-target statistics-cookie strike-through subscript superscript
 	 table-cell target timestamp underline verbatim)
   Complete list of object types.)
@@ -2051,6 +2051,40 @@ CONTENTS is nil.
 	  (org-element-property :value node-property)))
 
 
+ Page Break
+
+(defun org-element-page-break-parser (limit affiliated)
+  Parse a page break.
+
+LIMIT bounds the search.  AFFILIATED is a list of which CAR is
+the buffer position at the beginning of the first affiliated
+keyword and CDR is a plist of affiliated keywords along with
+their value.
+
+Return