Re: [O] Here is a patch I want to add to org.el……

2015-03-02 Thread Andreas Leha
Hi Nicolas,

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

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:
 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 I am talking about `org-toggle-latex-fragment'.  And even if that is
 fast, it is very annoying behaviour.  I'd very much like to be able to
 toggle individual images.  In a math-heavy document the redisplay of all
 formula images of even the current section takes noticable moment.  But
 much worse: if I am working on a formula, I usually like to see other
 formulas as images.  But they disappear as soon as I switch off the
 image of the current formula to debug it.

 It is quite hard to even achieve the state where all formulas except the
 formula under the point are displayed as image.

 And I'd expect `org-toggle-latex-fragment' to do what its name suggests:
 to toggle the latex fragment, i.e. to produce the same state after the
 second invocation.  Similarly to visibility cycling only a prefix should
 act globally, IMO.

 Fair enough.

 Would you mind testing the following patch, then? It makes
 `org-toggle-latex-fragment' behave more to your liking.


 From my first tests I can say:  I very much like it!  Thanks a lot!


I spoke a little too soon.  I still like it, but there is a regression.
See http://permalink.gmane.org/gmane.emacs.orgmode/95563

Regards,
Andreas




Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Perhaps the difference is too subtle.  Note that you would never deal with
 a `citation' other than through a mapping.

 Hmm. I still find `citations/citation' pair confusing. What about
 `citation/part'?

So (citation ⋯ :parts ((part ⋯) (part ⋯))).  Fine with me.  Other
possibilities are citation/entry and :entries.  Or less nice:
citation/cite and :cites.

 Right, I was trying *to add* support for [@k1; ⋯;@kN].

 Please don't. Let's keep shortcuts simple.

It would enable complicated argument [@k1;@k2;@k3], which is pretty
nice.  There's still no pre and post notes etc, only keys.

—Rasmus

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



Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 I was actually looking at this today and wondering why this was not
 supported.

Not enough specifications.

 I think a citation object should always member of a citations object.  So
 the above would be

(citations (:begin n :end N :prefix pre :suffix post
:citations
'((citation (:key k1 :begin n1 :end N1 :prefix pre1))
  (citation (:key k2 :begin n2 :end N2 :prefix pre2 :suffix 
 post2)

OK. 

However mixing `citations' and `citation' is confusing. I'd rather keep
the outer one as `citation'. What could go inside? Maybe `cite'?

Moreover,

  [cite:@key]

will be parsed as

  [citation (:begin n :end N
 :whatever '((whatever (:key key :begin n1 :end N1 :prefix pre1]

Is that correct?

 This makes it naturally to operate over one many citations.  I don't know
 if this should be some sort of pseudo-object or what.  Also, one issue I
 ran into when trying to get [@k1; @k2] working was that @k2 is recognized
 as an inline citation (which means that I probably did something
 wrong)...

[@k1; @k2] ?

This is unspecified. [@k1] is a shortcut for [(cite):@k1], nothing more.
Anything more complicated should go in a [cite:...] object.

 Of course, a quasi-tricky part (I think) is that [cite: pre @key post]
 should be (with no global :prefix and :suffix):

(citations (:begin n :end N
:citations
'((citation (:key key :begin n1 :end N1 :prefix pre :suffix 
 post)

 Which imply that citations are parsed from the middle and outwards.

I don't see any ambiguity here, since semi colons are forbidden in PRE
and POST.

 Nicolas: I wrote a patch for subtypes (with / as a separator as most
 people seemed to like that).  Should I post it or will you take care of it
 eventually?  I don't know if you have got a game-plan in mind?

I didn't add subtypes because we didn't reach a consensus on it.
I suggest to wait until everybody realizes subtypes are the superior
choice.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-calendar-holiday and local holidays

2015-03-02 Thread Alexis


On 2015-03-03T08:58:20+1100, Jorge A. Alfaro-Murillo 
jorge.alfaro-muri...@yale.edu said:


JAA holidays.el appends holiday-local-holidays to 
calendar-holidays JAA via a defcustom, so if you set 
holiday-local-holidays in your JAA .emacs, restart emacs and the 
local holidays are not in JAA calendar-holidays, it is because 
you are calling something that JAA loads holidays.el before you 
set holiday-local-holidays.


JAA If you add the code above to your .emacs and later modify 
your JAA configuration and remove or move the part that loads 
JAA holidays.el, then either your code will fail (because JAA 
calendar-holidays is not yet defined) or calendar-holidays will 
JAA have your local holidays twice and they will show twice in 
your JAA agenda.


JAA I think that you should look for whatever calls holidays.el 
and JAA set holiday-local-holidays before that.


i just tried moving my `(setq holiday-local-holidays ...)` to the 
very first line of my config setup, and lo, that does result in 
local holidays appearing in my Org agenda. However, my config 
setup is a 3000+ line Org Babel file, in which i group together 
things that are related in my mind, and the setup for the calendar 
is about a third of the way through this. Thus 


JAA If not, then at least use eval-after-load so that JAA 
calendar-holidays is already defined when the code is run, and 
JAA add-to-list so that the entries do not get added twice if 
they are JAA already there:


JAA #+BEGIN_SRC emacs-lisp (eval-after-load 'holidays '(dolist 
JAA (holiday holiday-local-holidays) (add-to-list 
'calendar-holidays JAA holiday)) #+END_SRC


 works better in my context, and is more robust, longer-term, 
than my original suggestion to use


   (setq calendar-holidays (append calendar-holidays 
   holiday-local-holidays)) 

So, thank you! Although i do note that my suggestion was 
nevertheless within the guidelines of the documentation for 
`calendar-holidays`:


   Note that these variables have no effect on 
   `calendar-holidays' after it has been set (e.g. after the 
   calendar is loaded).  In that case, customize 
   `calendar-holidays' directly.


i feel the above documentation could be improved by adding that 
`eval-after-load` should probably by used in this context, e.g.:


   Note that these variables have no effect on 
   `calendar-holidays' after it has been set (e.g. after the 
   calendar is loaded).  In that case, customize 
   `calendar-holidays' directly, for example by using 
   `eval-after-load':


   (eval-after-load 'holidays
'(dolist (holiday holiday-local-holidays)
  (add-to-list 'calendar-holidays 
  holiday)))


i'll open a GNU Emacs issue to that effect. :-)

Thanks again!


Alexis.



Re: [O] org-latex-fragments on sections

2015-03-02 Thread Andreas Leha
Hi Rasmus,

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

 Rasmus ras...@gmx.us writes:
 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi Rasmus,

 Thanks for testing this

 Rasmus ras...@gmx.us writes:
 Andreas Leha andreas.l...@med.uni-goettingen.de writes:


 I just add that the behaviour is not as expected also when the prefixed
 command (C-u C-c C-x C-l) is used.
 [...]
 unfortunately when my maker is at point

   ** section 1.1

 the command org-preview-latex-fragment (C-c C-x C-l) has no effect.

 I can't reproduce in neither Org 8.2 nor 8.3 using emacs -q.

 When I put the cursor on ** section 1.1 and do C-u C-c C-x C-l I get the
 desired fragments, i.e. section 1.1.1 and 1.1.2.

 —Rasmus

 I just tried with emacs -Q (which I had not done previously) and can
 still reproduce it.

 My system info:

 GNU Emacs 24.4.50.1 (x86_64-apple-darwin13.3.0, NS appkit-1265.21
 Version 10.9.4 (Build 13E28)) of 2014-09-02 on mib106584i.local
 Org-mode version 8.3beta (release_8.3beta-902-gd749e8)

 I'm on:

 GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.8) of 
 2015-02-27 on W530

 Org-mode version 8.3beta (release_8.3beta-882-gf8731e @ 
 /usr/share/emacs/site-lisp/org/)

 And I just updated to latest version of master, and it still works.

 That is strange.


Nothing strange after all.  I just forgot that I still had Nicolas (very
nice) patch about improved latex fragment handling applied.  On the
clean build I see the expected behaviour as well.  Thanks for your
effort in reproducing this.

(Reported in that thread
 http://permalink.gmane.org/gmane.emacs.orgmode/95597)

Sorry for the noise,
Andreas




Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 So (citation ⋯ :parts ((part ⋯) (part ⋯))).  Fine with me.  Other
 possibilities are citation/entry and :entries.  Or less nice:
 citation/cite and :cites.

I don't mind using :entries and `entry' either. I'll update wip-cite
in a few days.

 It would enable complicated argument [@k1;@k2;@k3], which is pretty
 nice.  There's still no pre and post notes etc, only keys.

Shortcuts are simple citations that ought to be available in most
back-ends. I don't see your example as a particularly straightforward
one. I suggest to use

  [(cite):@k1;@k2;@k3]

Note that your example doesn't even provide an in-text equivalent while
[@k1] has @k1.


Regards,



Re: [O] org-calendar-holiday and local holidays

2015-03-02 Thread Jorge A. Alfaro-Murillo

Melleus  writes:

Alexis flexibe...@gmail.com writes: 

see that local holiday. To fix this, i use M-: to evaluate: 

   (setq calendar-holidays (append calendar-holidays 
holiday-local-holidays)) 


Works perfectly this way, thank you. 

jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) writes: 

They should show up after you restart emacs. 


I supposed it should. But in fact in does not work.


holidays.el appends holiday-local-holidays to calendar-holidays 
via a defcustom, so if you set holiday-local-holidays in your 
.emacs, restart emacs and the local holidays are not in 
calendar-holidays, it is because you are calling something that 
loads holidays.el before you set holiday-local-holidays.


If you add the code above to your .emacs and later modify your 
configuration and remove or move the part that loads holidays.el, 
then either your code will fail (because calendar-holidays is not 
yet defined) or calendar-holidays will have your local holidays 
twice and they will show twice in your agenda.


I think that you should look for whatever calls holidays.el and 
set holiday-local-holidays before that.


If not, then at least use eval-after-load so that 
calendar-holidays is already defined when the code is run, and 
add-to-list so that the entries do not get added twice if they are 
already there:


#+BEGIN_SRC emacs-lisp
 (eval-after-load 'holidays
   '(dolist (holiday holiday-local-holidays)
(add-to-list 'calendar-holidays holiday))
#+END_SRC

Best,
--
Jorge.




[O] What to use for tables with lengthy text in cells?

2015-03-02 Thread Matt Price
I have a project which will require me to enter about a paragraph in each
of 5 fields several times a day. I would use org tables, but I need to be
able to see the table contents in the buffer, and org hides long lines. I
tried using table.el but it feels incredibly clumsy - for instance, I can't
find a way to add a row to the end of the table, which seems crazy.

I am wondering  what other people do in this situation - I guess I could
use a spreadsheet or an odt document but I would much rather stay in emacs
if I can.

Thanks as always,
Matt


Re: [O] What to use for tables with lengthy text in cells?

2015-03-02 Thread Charles C. Berry

On Mon, 2 Mar 2015, Matt Price wrote:


I have a project which will require me to enter about a paragraph in each
of 5 fields several times a day. I would use org tables, but I need to be
able to see the table contents in the buffer, and org hides long lines. I
tried using table.el but it feels incredibly clumsy - for instance, I can't
find a way to add a row to the end of the table, which seems crazy.

I am wondering  what other people do in this situation - I guess I could
use a spreadsheet or an odt document but I would much rather stay in emacs
if I can.


I sometimes use babel blocks for this purpose.

For example, with ob-org.el loaded, with this org file:


--8---cut here---start-8---
#+NAME: abc
#+BEGIN_SRC org :exports none
  This is chunk ~abc~.
#+END_SRC

Formatting via ascii:
#+BEGIN_SRC emacs-lisp :var x=abc() :exports results
(org-export-string-as x 'ascii t)
#+END_SRC

And plainly: call_abc()
--8---cut here---end---8---

export via ascii yields:


--8---cut here---start-8---
Formatting via ascii:
,
| This is chunk `abc'.
`

And plainly: `This is chunk ~abc~.'
--8---cut here---end---8---


You can also use the noweb idiom to capture the contents of
any kind of src block.

HTH,

Chuck



Re: [O] Missing OpenDocument schema files and ODT file corruption

2015-03-02 Thread Monroe, Will

  
  
David,

On 3/2/15 2:25 PM, J. David Boyd wrote:

  "Monroe, Will" wtmonroe...@gmail.com writes:


  
Hello,

I'm using Emacs 24.4, Org-mode version 8.2.10 and I've run into a
problem with missing OpenDocument schema files. Upon startup, I see
these messages:

,
| Debug (ox-odt): Searching for OpenDocument styles files...
| Debug (ox-odt): Trying /usr/share/emacs/etc/org/styles/... [2 times]
| Debug (ox-odt): Trying /Users/wmonro1/.emacs.d/etc/styles/...
| Debug (ox-odt): Trying
/Users/wmonro1/.emacs.d/elpa/org-20150223/etc/styles/...
| Debug (ox-odt): Using styles under
/Users/wmonro1/.emacs.d/elpa/org-20150223/etc/styles/
| Debug (ox-odt): Searching for OpenDocument schema files...
| Debug (ox-odt): Trying /usr/share/emacs/etc/org/schema/... [2 times]
| Debug (ox-odt): No OpenDocument schema files installed
`

I think I've had these errors for some time but I haven't paid much
attention to them. However, I recently started exporting to
OpenDocument formats (e.g., ODT) and I've encountered frequent
problems with "file corruption" and some ODT files that won't even
open. I want to find out what's happening so I can use the
export/publishing functions for ODT more reliably.

I searched the org-mode listerv and found a recommendation to check
the values of org-odt-styles-dir and org-odt-schema-dir. I got the
following values:

,
| org-odt-styles-dir:
| "/Users/wmonro1/.emacs.d/elpa/org-20150223/etc/styles/"
| 
| org-odt-schema-dir
| nil
`

There is documentation for `org-odt-schema-dir' the explains the
following:

,
| Documentation:
| Directory that contains OpenDocument schema files.
| 
| This directory contains:
| 1. rnc files for OpenDocument schema
| 2. a "schemas.xml" file that specifies locating rules needed
| for auto validation of OpenDocument XML files.
| 
| Use the customize interface to set this variable. This ensures
| that `rng-schema-locating-files' is updated and auto-validation
| of OpenDocument XML takes place based on the value
| `rng-nxml-auto-validate-flag'.
| 
| The default value of this variable varies depending on the
| version of org in use and is initialized from
| `org-odt-schema-dir-list'. The OASIS schema files are available
| only in the org's private git repository. It is *not* bundled
| with GNU ELPA tar or standard Emacs distribution.
| 
| You can customize this variable.
| 
| This variable was introduced, or its default value was changed, in
| version 24.1 of Emacs.
`

So, now I understand why the error messages are occuring but, given
that the value seems to be `nil' by default, I'm not sure if I need to
change anything. Again, I'm experiencing some problems with org-mode
export to ODT and I'd like to clear those up. Would it help to obtain
the "rnc" and "schemas.xml" files and then point `org-odt-schema-dir'
to them? 

Will 

  
  
If I recall correctly, I was getting errors also until I added these files in.

I found the files schemas.xml, OrgOdtContentTemplate.xml, and OrgOdtStyles.xml
in the git repository for Org mode, in the etc/schema and
etc/styles directories.

I then copied the etc/schema/schemas.xmls and etc/styles/OrgOdt*.xml files to my
/usr/share/emacs/etc/org/styles directory, and the errors went away.

That must be where org-odt-schema-dir defaults to, as I don't have it set
anywhere.

Thanks for your reply.  That helped.

I wasn't sure if it was wise to change the default setting for
`org-odt-schema-dir' but I went ahead and did so; just chose a
directory in ~/Dropbox that my other Emacs instances can also
access.

Will
  




Re: [O] org-calendar-holiday and local holidays

2015-03-02 Thread Alexis


On 2015-03-03T02:26:37+1100, Jorge A. Alfaro-Murillo said:

JAA Alexis writes:

 When i scroll down to look at the current value of 
 `calendar-holidays`, however, i see that neither the current 
 value nor the original value makes any reference to the 
 `holiday-local-holidays` variable. And indeed, when i examine 
 my agenda for next Monday, which is a local holiday i've 
 specified in `holiday-local-holidays`, i can't see that local 
 holiday. To fix this, i use M-: to evaluate:
 
 (setq calendar-holidays (append calendar-holidays 
 holiday-local-holidays))
 
 after which the local holiday next Monday appears in my Org 
 agenda.


JAA You do not need to add that, calendar-holidays appends JAA 
holiday-local-holidays when holidays.el is loaded, just restart 
JAA emacs.


Not in my Emacs (manually compiled 24.4.1, the most recent 
official stable release). My `local-holidays` variable was set for 
years, such that only as part of trying to help the OP did i 
notice that it's been obsoleted; the documentation for it says:


 This variable is an alias for `holiday-local-holidays'. 
 This variable is obsolete since 23.1; use 
 `holiday-local-holidays' instead.


So i changed my init to refer to `holiday-local-holidays` instead 
of `local-holidays`, and restarted Emacs, and the issue persisted: 
the value of `holiday-local-holidays` is /not/ included in 
`calendar-holidays` by default. The `(setq calendar-holidays ...` 
line i described above is necessary to work around this.


JAA It is also not a documentation bug, at least in my emacs 
JAA (25.0.50.1) the documentation of calendar-holidays says 
clearly:


JAA Note that these variables [`holiday-other-holidays', JAA 
`holiday-general-holidays', `holiday-local-holidays', JAA 
`holiday-christian-holidays', `holiday-hebrew-holidays', JAA 
`holiday-islamic-holidays', `holiday-bahai-holidays', JAA 
`holiday-oriental-holidays' and `holiday-solar-holidays'] have 
JAA no effect on `calendar-holidays' after it has been set JAA 
(e.g. after the calendar is loaded). In that case, customize JAA 
`calendar-holidays' directly.


In 24.4.1, the documentation is phrased differently; it says:

   Additional holidays are easy to add to the list, just put them 
   in the list `holiday-other-holidays' in your init file. 
   Similarly, by setting any of `holiday-general-holidays', 
   `holiday-local-holidays', `holiday-christian-holidays', 
   `holiday-hebrew-holidays', `holiday-islamic-holidays', 
   `holiday-bahai-holidays', `holiday-oriental-holidays', or 
   `holiday-solar-holidays' to nil in your init file, you can 
   eliminate unwanted categories of holidays.


   The aforementioned variables control the holiday choices 
   offered by the function `holiday-list' when it is called 
   interactively.


   They also initialize the default value of `calendar-holidays', 
   which is the default list of holidays used by the function 
   `holiday-list' in the non-interactive case.  Note that these 
   variables have no effect on `calendar-holidays' after it has 
   been set (e.g. after the calendar is loaded).  In that case, 
   customize `calendar-holidays' directly.


   The intention is that (in the US) `holiday-local-holidays' be 
   set in site-init.el and `holiday-other-holidays' be set by the 
   user.


It's the fact that, despite the above docstring, and that, as i 
described above, setting the value of `holiday-local-holidays` has 
no direct effect on `calendar-holidays` /even after a restart of 
Emacs/, that led me to suggest there might be a code bug or a 
documentation bug (e.g. maybe some variable needed to be set to 
`t` to ensure the value of `holiday-local-holidays` gets included 
in `calendar-holidays`).


Since things work for you, and the phrasing for the documentation 
for `calendar-holidays` has changed between the most recent stable 
release and the development version of Emacs you're using, my 
guess is that there is indeed a bug in 24.4.1 and earlier that has 
subsequently been fixed. Later today i'll try building from the 
first 24.5 pretest and the master branch, and examine what happens 
with `holiday-local-holidays` / `calendar-holidays` in both 
instances.



Alexis.



Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 However mixing `citations' and `citation' is confusing. I'd rather keep
 the outer one as `citation'. What could go inside? Maybe `cite'?

Perhaps the difference is too subtle.  Note that you would never deal with
a `citation' other than through a mapping.

 Moreover,

   [cite:@key]

 will be parsed as

   [citation (:begin n :end N
  :whatever '((whatever (:key key :begin n1 :end N1 :prefix 
 pre1]

 Is that correct?

Yeah, exactly.  So the format would be a map over the list of whatevers in
ox.

 This makes it naturally to operate over one many citations.  I don't know
 if this should be some sort of pseudo-object or what.  Also, one issue I
 ran into when trying to get [@k1; @k2] working was that @k2 is recognized
 as an inline citation (which means that I probably did something
 wrong)...

 [@k1; @k2] ?

 This is unspecified. [@k1] is a shortcut for [(cite):@k1], nothing more.
 Anything more complicated should go in a [cite:...] object.

Right, I was trying *to add* support for [@k1; ⋯;@kN].  One issue doing
this was that the regexp for inline citations also captured @k2 in [@k1;
@k2], but it's cause I did a mistake.

 Of course, a quasi-tricky part (I think) is that [cite: pre @key post]
 should be (with no global :prefix and :suffix):

(citations (:begin n :end N
:citations
'((citation (:key key :begin n1 :end N1 :prefix pre :suffix 
 post)

 Which imply that citations are parsed from the middle and outwards.

 I don't see any ambiguity here, since semi colons are forbidden in PRE
 and POST.

I was talking about paring [cite: pre @k post] as 


(citation (:begin n :end N
   :cites
'((cite (:key key :begin n1 :end N1 :prefix pre :suffix 
post)

And not:

(citation (:begin n :end N :prefix pre :suffix post
   :cites '((cite (:key key :begin n1 :end N1)

Perhaps I'm worrying about things that need not be worried about.

—Rasmus

-- 
This message is brought to you by the department of redundant departments







Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 Perhaps the difference is too subtle.  Note that you would never deal with
 a `citation' other than through a mapping.

Hmm. I still find `citations/citation' pair confusing. What about
`citation/part'?

 Right, I was trying *to add* support for [@k1; ⋯;@kN].

Please don't. Let's keep shortcuts simple.

 I was talking about paring [cite: pre @k post] as 


 (citation (:begin n :end N
:cites
 '((cite (:key key :begin n1 :end N1 :prefix pre :suffix 
 post)

 And not:

 (citation (:begin n :end N :prefix pre :suffix post
:cites '((cite (:key key :begin n1 :end N1)

 Perhaps I'm worrying about things that need not be worried about.

The latter would be obtained with

  [cite: pre; @k; post]


Regards,



Re: [O] What to use for tables with lengthy text in cells?

2015-03-02 Thread Rasmus
Hi Matt,

Matt Price mopto...@gmail.com writes:

 I have a project which will require me to enter about a paragraph in each
 of 5 fields several times a day. I would use org tables, but I need to be
 able to see the table contents in the buffer, and org hides long lines. I
 tried using table.el but it feels incredibly clumsy - for instance, I can't
 find a way to add a row to the end of the table, which seems crazy.

AFAIK there's no word-wrap for tables (but it would be cool).

I never figured out tabel.el, either.  I don't 

 I am wondering  what other people do in this situation - I guess I could
 use a spreadsheet or an odt document but I would much rather stay in emacs
 if I can.

I'm sure you are already aware of this, but the only way I can think of is
the following:

|---+---+---+---+---|
| 5   | 5   | 5   | 5   | 5   |
|---+---+---+---+---|
|   |   |   |   |   |
#+TBLFM: 

Which will truncate the column at 5 characters and where you can edit a
cell with C-c `...

—Rasmus

-- 
Lasciate ogni speranza, voi che leggete questo.




Re: [O] Exporter: Derived backend options-alist

2015-03-02 Thread James Harkins

On March 3, 2015 12:51:31 AM Nicolas Goaziou m...@nicolasgoaziou.fr wrote:


 Then I created an org file that begins:

 #+BEGIN_SRC org
   ,#+title:: PulseCount
   ,#+summary:: Pulse counter.
   ,#+related:: Classes/Stepper
   ,#+categories:: UGensTriggers

It should be

  #+title: PulseCount


Gah... doubled colons, which are part of scdoc syntax but not org. That's a 
10:30 PM brain failure. Thanks for the second pair of eyes.


I have another question about source blocks, but, separate question, 
separate thread.


hjh

Sent with AquaMail for Android
http://www.aqua-mail.com







Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 It would enable complicated argument [@k1;@k2;@k3], which is pretty
 nice.  There's still no pre and post notes etc, only keys.

 Shortcuts are simple citations that ought to be available in most
 back-ends. I don't see your example as a particularly straightforward
 one. I suggest to use

   [(cite):@k1;@k2;@k3]

That also fine, though for the simple case slightly less readable.

 Note that your example doesn't even provide an in-text equivalent while
 [@k1] has @k1.

But that's OK since I can easily formulate this in human-language:

   @k1, @k2, and @k3 argues ⋯ → A1 (Y1), A2 (Y2), and A3 (Y3) argues

Whereas I can't easily do

   Argument (@k1;@k2;@k3) →  Argument (A1 Y1; A2 Y2; A3 Y3)

Perhaps I'm thinking too much in terms of text/parenthesis citations here.

—Rasmus

-- 
. . . The proofs are technical in nature and provides no real
understanding



[O] Archive search non-functional

2015-03-02 Thread Jay Iyer
Hi, are others able to search through the emacs-orgmode archives?  For some
reason, I haven't been able to search for the last several days.  Any
thoughts?
Thanks.
-jay


Re: [O] Here is a patch I want to add to org.el……

2015-03-02 Thread Nicolas Goaziou
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 I spoke a little too soon.  I still like it, but there is a regression.
 See http://permalink.gmane.org/gmane.emacs.orgmode/95563

Indeed. I also fixed a few other things. Here's the update.

Thanks for the feedback.


Regards,

From f79cd3a0499b1cc1fd9022d958f032d73defeac8 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou m...@nicolasgoaziou.fr
Date: Sat, 28 Feb 2015 00:30:43 +0100
Subject: [PATCH] Change `org-toggle-latex-fragment' behaviour

* lisp/org.el (org-remove-latex-fragment-image-overlays): Allow to
  limit overlay removal through optional arguments.  Define a new
  return value.
(org-toggle-latex-fragment): Change behaviour.  Update docstring
accordingly.
(org-format-latex): Update docstring.  Remove overlay when LaTeX
fragment is deleted.

* etc/ORG-NEWS: Signal change.

The new behaviour is the following:

  - With a double prefix argument or with a single prefix argument
when point is before the first headline, toggle overlays in the
whole buffer;

  - With a single prefix argument, toggle overlays in the current
subtree;

  - On latex code, toggle overlay at point;

  - Otherwise, toggle overlays in the current section.

Suggested-by: kuangd...@163.com
http://permalink.gmane.org/gmane.emacs.orgmode/95492
---
 etc/ORG-NEWS |  14 ++
 lisp/org.el  | 147 ++-
 2 files changed, 109 insertions(+), 52 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 65d63eb..252dc3b 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -120,6 +120,20 @@ end-users browser.  You may force initial usage of MathML via
 ~org-html-mathjax-template~ or by setting the ~path~ property of
 ~org-html-mathjax-options~.
 ** New features
+*** New behaviour for `org-toggle-latex-fragment'.
+The new behaviour is the following:
+
+- With a double prefix argument or with a single prefix argument
+  when point is before the first headline, toggle overlays in the
+  whole buffer;
+
+- With a single prefix argument, toggle overlays in the current
+  subtree;
+
+- On latex code, toggle overlay at point;
+
+- Otherwise, toggle overlays in the current section.
+
 *** Additional markup with =#+INCLUDE= keyword
 The content of the included file can now be optionally marked up, for
 instance as HTML.  See the documentation for details.
diff --git a/lisp/org.el b/lisp/org.el
index d05a7b8..bbc9338 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -18748,77 +18748,119 @@ looks only before point, not after.
   List of overlays carrying the images of latex fragments.)
 (make-variable-buffer-local 'org-latex-fragment-image-overlays)
 
-(defun org-remove-latex-fragment-image-overlays ()
-  Remove all overlays with LaTeX fragment images in current buffer.
-  (mapc 'delete-overlay org-latex-fragment-image-overlays)
-  (setq org-latex-fragment-image-overlays nil))
+(defun org-remove-latex-fragment-image-overlays (optional beg end)
+  Remove all overlays with LaTeX fragment images in current buffer.
+When optional arguments BEG and END are non-nil, remove all
+overlays between them instead.  Return t when some overlays were
+removed, nil otherwise.
+  (let (removedp)
+(setq org-latex-fragment-image-overlays
+	  (let ((beg (or beg (point-min)))
+		(end (or end (point-max
+	(org-remove-if
+	 (lambda (o)
+	   (and (= (overlay-start o) beg)
+		(= (overlay-end o) end)
+		(progn (delete-overlay o)
+			   (or removedp (setq removedp t)
+	 org-latex-fragment-image-overlays)))
+removedp))
 
 (define-obsolete-function-alias
   'org-preview-latex-fragment 'org-toggle-latex-fragment 24.4)
-(defun org-toggle-latex-fragment (optional subtree)
+(defun org-toggle-latex-fragment (optional arg)
   Preview the LaTeX fragment at point, or all locally or globally.
+
 If the cursor is in a LaTeX fragment, create the image and overlay
-it over the source code.  If there is no fragment at point, display
-all fragments in the current text, from one headline to the next.  With
-prefix SUBTREE, display all fragments in the current subtree.  With a
-double prefix arg \\[universal-argument] \\[universal-argument], or when \
-the cursor is before the first headline,
-display all fragments in the buffer.
-The images can be removed again with \\[org-toggle-latex-fragment].
+it over the source code, if there is none, or remove it otherwise.
+If there is no fragment at point, display all fragments in the
+current section.
+
+With prefix ARG, preview or clear image for all fragments in the
+current subtree or in the whole buffer when used before the first
+headline.  With a double prefix ARG \\[universal-argument] \
+\\[universal-argument] preview or clear images
+for all fragments in the buffer.
   (interactive P)
   (unless (buffer-file-name (buffer-base-buffer))
 (user-error Can't preview LaTeX fragment in a non-file buffer))
-  (if org-latex-fragment-image-overlays
-  (progn 

Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Richard Lawrence
Hi Nicolas,

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 To support multi cites, we must first decide how the parsed will present
 information, i.e., what are the properties in the following case

   [cite:pre; pre1 @k1 post1; pre2 @k2 post2; post]

I was thinking that this should yield a citation object with a structure like:

('citation ...
  :common-prefix pre
  :common-suffix post
  :references ((:prefix pre1
:key k1
:suffix post1 ...)
   (:prefix pre2
:key k2
:suffix post2 ...))
  ...)

Would that work?

 There is also the following degenerate case

   [cite:pre; pre ;post]

 What should be done about it?

Hmm, I don't quite understand what you mean.  This is not allowed by the
grammar (as far as I can tell), so that should not parse as a citation
object, IMO.

 I didn't implement -keys as there is no consensus on them.

Oh, I did not realize there were outstanding issues with this.  I
remember Rasmus not liking `'.  I'm fine with changing it, though I
cannot think of a better symbol.  Does someone think we should not have
a way of indicating that a reference should produce a full bibliography
entry?  Or that we should indicate it in some other way?  

Best,
Richard



Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Richard Lawrence
Aaron Ecay aarone...@gmail.com writes:

 It would also be possible to just use an external program like
 citeproc-java.  WDYT?

I agree with Rasmus that using an external tool is the preferred way to
go here.  I don't think introducing a dependency is really a problem, so
long as we choose the right dependency -- LaTeX is a dependency for the
PDF exporter, after all.

Is there any reason to go with citeproc-java over a different CSL
implementation, like citeproc-js or pandoc-citeproc?  I am a little
nervous about shelling out to something that sounds it like it requires
loading the JVM...

I think Zotero also has a built-in CSL processor (actually, I think it
uses citeproc-js), and Erik Hetzner's zotxt plugin looks like it lets
you communicate with it in client-server fashion:

https://bitbucket.org/egh/zotxt/src

So maybe Zotero + zotxt is a good candidate for a `blessed' citation
manager and CSL processor?  

Best,
Richard




Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Richard Lawrence
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 The first issue is that the parser includes trailing punctuation in
 “bare” @key citations.  So the following does not work as expected (the
 :key includes the period): “This was demonstrated most recently by
 @Smith2015.”  I’m not sure what the right approach is – one option
 would be to say that keys can contain punctuation, but must end (and
 begin) with an alphanumeric character.

 I'll update the parser once there is a new syntax for keys. At the
 moment, it is correct wrt syntax.

Sorry, I may not have emphasized this enough, but in the grammar, I wrote:

  - A KEY optionally begins with `-', and obligatorily contains `@' or
`' followed by a string of characters which begins with a letter
or `_', and may contain alphanumeric characters and the following
*internal* punctuation characters:
   :.#$%-+?~/
   
The `internal' here was meant to express exactly what Aaron said: keys
can contain punctuation, but may not end (or begin) with punctuation.

Best,
Richard



Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Avram Lyon
On Mon, Mar 2, 2015 at 7:16 PM Richard Lawrence 
richard.lawre...@berkeley.edu wrote:

 Is there any reason to go with citeproc-java over a different CSL
 implementation, like citeproc-js or pandoc-citeproc?  I am a little
 nervous about shelling out to something that sounds it like it requires
 loading the JVM...


citeproc-java just calls citeproc-js from Rhino or Nashorn, so there's
little reason to go with citeproc-java for any application not already
running on the JVM.

Zotero is indeed using citeproc-js directly from XULrunner/Firefox, and
that is the best-supported usage of the library.

If you're looking for something with citation management and CSL proessing,
perhaps zotxt is best. If you just want CSL processing, it would be best to
run citeproc-js by itself (there is a citeproc-node, but it's not quite
plug-and-play).


Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Rasmus
t...@tsdye.com (Thomas S. Dye) writes:

 Rasmus ras...@gmx.us writes:

 I have noticed tex4ht manages to do proper citations in odt.  Perhaps we
 can study the resulting xml and how it adds a entries.  Formatting is
 tricky...  Perhaps only zotero is useful here.

 IIUC, tex4ht uses the dvi (device independent format of Knuth) file
 produced by LaTeX.  Thus, it is able to take advantage of the work of
 sophisticated citations managers built on bibtex.  I think of it,
 perhaps naively, as a program that can be configured to generate dvi
 drivers for odt, html, xml, etc.

Thanks.

The point I was trying to raise is that it adds proper citations in LO.
That means a citation is a gray field rather than white plaintext.
Much like the macro \citet{·} differs from plaintext A (Y) in LaTeX.

—Rasmus

-- 
May the Force be with you



Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

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

 What's the next step here?  Adding support for multiple references?
 multi-cites? `'-keys?

 To support multi cites, we must first decide how the parsed will present
 information, i.e., what are the properties in the following case

   [cite:pre; pre1 @k1 post1; pre2 @k2 post2; post]

I was actually looking at this today and wondering why this was not
supported.

I think a citation object should always member of a citations object.  So
the above would be

   (citations (:begin n :end N :prefix pre :suffix post
   :citations
   '((citation (:key k1 :begin n1 :end N1 :prefix pre1))
 (citation (:key k2 :begin n2 :end N2 :prefix pre2 :suffix 
post2)

This makes it naturally to operate over one many citations.  I don't know
if this should be some sort of pseudo-object or what.  Also, one issue I
ran into when trying to get [@k1; @k2] working was that @k2 is recognized
as an inline citation (which means that I probably did something wrong)...

Of course, a quasi-tricky part (I think) is that [cite: pre @key post]
should be (with no global :prefix and :suffix):

   (citations (:begin n :end N
   :citations
   '((citation (:key key :begin n1 :end N1 :prefix pre :suffix 
post)

Which imply that citations are parsed from the middle and outwards.


Nicolas: I wrote a patch for subtypes (with / as a separator as most
people seemed to like that).  Should I post it or will you take care of it
eventually?  I don't know if you have got a game-plan in mind?
[I also have other outstanding patches, so I just want to put my limited
Org-time where it makes sense].

Cheers,
Rasmus

-- 
There are known knowns; there are things we know that we know







Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Rasmus
Looks cool Aaron.  Thanks!

Aaron Ecay aarone...@gmail.com writes:

 The first issue is that the parser includes trailing punctuation in
 “bare” @key citations.  So the following does not work as expected (the
 :key includes the period): “This was demonstrated most recently by
 @Smith2015.”  I’m not sure what the right approach is – one option
 would be to say that keys can contain punctuation, but must end (and
 begin) with an alphanumeric character.

I also tried to solve this in the attached patch.  Feel free to use it in
the unlikely case that it adds anything to your fix (I didn't check).
Note, cf. my other recent post, this should probably be part of a
citations object rather than a citation object (assuming you take my idea
at good value).

 The second issue is that the :key property of the citation element
 includes the @.  This is not right IMO: it’s a detail of the syntax.
 And it means that consumers of the syntax, who might want to look up
 the key in a database, will always have to remember to strip the @.
 I’ve pushed a provisional fix for this in my branch.

I agree that the @ should not be part of the key.

 Citation modes are responsible for formatting the in-text citation
 (usually, a reference to a full citation stored elsewhere).  [...]
 Citation styles are responsible for formatting the citation in the
 bibliography [...]

Cool!


 - How much is it worth trying to keep latex and the other backends
 together.

A lot!  In the sense that you get approximately the same output across
backends when using support citation commands.  When you are using citepos
or similar you are on your own, but a highlevel API would be nice.

 The current implementation uses some common functions (in ox-cite.el)
 for all backends, including latex.  However, latex basically does its
 own thing.  So it would be possible to include in ox-cite only code for
 non-latex backends, and then implement latex citations solely in
 ox-latex.  Separation would make the initial implementation very
 simple.  On the other hand, I worry that it would perpetuate the present
 situation where latex and non-latex citations are two separate
 universes.  On the third hand, serious latex users will probably just
 say you should use latex of you want nice citations, since latex is so
 much better.  ;)

I use LaTeX and in a recent funding request .doc (no x) was *mandatory*!
I'm told that some journals only accept word...

 - How much of the non-latex citation code is it worth implementing in
 elisp.

As little as possible, though a highlevel API is nice, e.g. being able to
make a citepos using (concat (citeauthor cite) 's (citeyear cite)).

 Is it worth trying to put together a bare-bones elisp implementation,
 so people can have dependency-free bibliographies?  My inclination is to
 say “no,”

+1 (so 2 × no).

 to avoid duplicating the considerable effort put into the CSL
 universe (over 7,000 citation styles available!).  However, it also
 seems a bit wrong to have a core feature depend on a third party
 executable.

Afaik, we need latexml or mathtoweb.jar to turn math into mathml for odt.

 (How much it would slow down export to continually shell out to an
 external program is also an open question.)

Does it matter with async?

 I didn’t try to do anything about support for editing/inserting citations
 within org mode.  It would be good to know whether John Kitchin is willing
 to contribute bits of his org-ref code for that.  (I see on Worg that he
 has an FSF assignment on file, but I don’t want to take without asking –
 or do porting/integration work that he’s happy to do himself!)

I haven't tried org-ref, but isn't it just reftex?  If so something like
this

(add-to-list 'reftex-cite-format-builtin
   '(org Org-mode citation
 ((?t . [cite:%l])
  (?p . [parencite:%l]

Should work.  We'd automatically add subtypes and maybe make an
intelligent choice based on whether prefix and postfix is used.  Another
idea would be to use the ox-export dispatcher code, somehow...

 PS the code uses relatively new functions from the subr-x and let-alist
 libraries, so it probably works best on a recent-ish (past few months)
 trunk version of emacs.

In another post, Nicolas said we can target (at least?) 24.4 for v8.4.
I'm assuming citation won't make 8.3...

—Rasmus

-- 
Send from my Emacs
From 60e7b587ccda20e63fe0d90ce27315831be27d76 Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Mon, 2 Mar 2015 18:18:02 +0100
Subject: [PATCH] org-element.el: Add subkeys to citation objects

* org-element.el (org-element--set-regexps),
  (org-element-citation-parser),
  (org-element-citation-interpreter): Add citation subtypes.
---
 lisp/org-element.el | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index b341cef..7745558 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -197,8 +197,8 @@ specially 

Re: [O] org-babel-execute: being exported

2015-03-02 Thread Aaron Ecay
Hi Jarmo,

2015ko martxoak 2an, Jarmo Hurri-ek idatzi zuen:

[...]

 1. How can I identify, in org-babel-execute:processing, if the code is
executed for export or for some other reason?

I think the test (not (null org-babel-exp-reference-buffer)) should thee
you when you’re being called as part of export.

-- 
Aaron Ecay



Re: [O] org-latex-fragments on sections

2015-03-02 Thread Andreas Leha
Hi Rasmus,

Rasmus ras...@gmx.us writes:
 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi Rasmus,

 Thanks for testing this

 Rasmus ras...@gmx.us writes:
 Andreas Leha andreas.l...@med.uni-goettingen.de writes:


 I just add that the behaviour is not as expected also when the prefixed
 command (C-u C-c C-x C-l) is used.
 [...]
 unfortunately when my maker is at point

   ** section 1.1

 the command org-preview-latex-fragment (C-c C-x C-l) has no effect.

 I can't reproduce in neither Org 8.2 nor 8.3 using emacs -q.

 When I put the cursor on ** section 1.1 and do C-u C-c C-x C-l I get the
 desired fragments, i.e. section 1.1.1 and 1.1.2.

 —Rasmus

 I just tried with emacs -Q (which I had not done previously) and can
 still reproduce it.

 My system info:

 GNU Emacs 24.4.50.1 (x86_64-apple-darwin13.3.0, NS appkit-1265.21
 Version 10.9.4 (Build 13E28)) of 2014-09-02 on mib106584i.local
 Org-mode version 8.3beta (release_8.3beta-902-gd749e8)

 I'm on:

 GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.8) of 
 2015-02-27 on W530

 Org-mode version 8.3beta (release_8.3beta-882-gf8731e @ 
 /usr/share/emacs/site-lisp/org/)

 And I just updated to latest version of master, and it still works.

That is strange.


 This is what I see

  http://i.imgur.com/RytjyTW.png

 Perhaps I misunderstood the issue?

I think you understood correctly.  That is what I'd like to see, as
well.  But I see this

  http://i.imgur.com/KJJHSWl.png


Thanks,
Andreas




[O] org-tag-alist - more tags in one keystroke

2015-03-02 Thread David Belohrad

Dear All,

i'm using ordinary org-tag-alist:

setq org-tag-alist '(
(Attachment . ?a)
(Budget . ?b))


my question is, can I specify more tags for a single shortcut? Like:

setq org-tag-alist '(
;; lowercase are general 'widely used' flags
(Attachment . ?a)
(Budget:@Home . ?b))


Whatever I do, I cannot force to make it running. My stuff is, that I
have people names assigned under tags, and sometimes it happens that the
names are the same, hence I need to distinguish according to surname:

setq org-tag-alist '(
(@Pedersen:Joseph . ?a)
(@Pedersen:Claire . ?b))


^^^ the above does not work. Is there any way how to make it working?

thanks
.d.








Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Thomas S. Dye
Aloha Aaron,

Aaron Ecay aarone...@gmail.com writes:

 Hi Tom,

 2015ko martxoak 2an, Thomas S. Dye-ek idatzi zuen:
 
 Aloha Aaron,
 
 Aaron Ecay aarone...@gmail.com writes:
 
 By way of illustration, Biblatex (AFAICT) doesn’t provide a possessive
 citation command, which was mentioned by someone in this thread (or its
 predecessor) as a desideratum.  I’d expect a savvy latex user to put in
 their preamble:
 
 \newcommand{\citeposs}[1]{\citeauthor{#1}’s (\citeyear{#1})}
 
 That doesn’t really work in org.  (It could be put together with an org
 macro, but would lose the kind of click-to-view functionality that
 org-ref already provides and which would be ported to the new syntax as
 well.)
 
 #+name: define-citeposs-link
 #+begin_src emacs-lisp :results silent :exports none
 (org-add-link-type 
  citeposs 'ebib-open-org-link
  (lambda (path desc format)
(cond
 ((eq format 'html)
  (format (cite%s/cite) path))
 ((eq format 'latex)
  (format \\citeauthor{%s}'s (\\citeyear{%s}) path path)
 #+end_src
 
 I haven't tested this, but I think it would work in Org mode.

 The main thrust of this thread, and the previous one, has been to
 define a citation syntax in org.  I don’t think anyone contests that
 link-based solutions basically do the trick for Latex (only).  And
 yet, (almost?) everyone has agreed that something more is needed, or
 at least inevitable.  So I’m puzzled why you brought this up.

 Are you trying to argue for subtype-based citations?  This is what I
 infer from your messages (not just this one, and please do correct me if
 I’m wrong).  If so, it would make it easier for me to understand you if
 you said so outright.  My own opinion is that plists are better than
 subtypes, but I’ve also said that I don’t think the correct decision can
 be made a priori.  So don’t let me stop you (in general, not just Tom)
 from going ahead with an implementation of subtypes, if that’s your
 preferred solution.  I would like to help out with coding or testing,
 though I haven’t yet been able to figure out where my efforts would be
 best applied.  So if there’s something you (again, in general) think
 would be helpful, don’t hesitate to ask.

I'm not able to understand the full implications of subtypes
vs. plists, so don't have a preferred solution along those lines.

I brought this up in reaction to This doesn't really work in org.

I'm hoping for an Org mode citation syntax where there is an analogous
org-add-cite-type function, so I only have to remember the syntax one
time and can forget about it when I'm writing.

Sorry if this is noise and thanks for your patience.

All the best,
Tom

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



[O] Exporter: Derived backend options-alist

2015-03-02 Thread James Harkins
I'm trying to derive an exporter backend from ASCII. I need to add some export 
options, so I have:

#+BEGIN_SRC {emacs-lisp}
(org-export-define-derived-backend 'scdoc 'ascii
  :translate-alist  ... omitted for brevity...
  :options-alist
  '((:categories CATEGORIES nil nil t)
(:related RELATED nil nil t)
(:summary SUMMARY nil nil t)
(:redirect REDIRECT nil nil t))
)

... snip snip...

(defun org-scdoc-template (contents info)
  Return complete document string after SCDoc conversion.
CONTENTS is the transcoded contents string.  INFO is a plist
holding export options.
  (let* ((title (org-export-data (plist-get info :title) info))
(categories (org-export-data (plist-get info :categories) info))
(related (org-export-data (plist-get info :related) info))
(summary (org-export-data (plist-get info :summary) info))
(redirect (org-export-data (plist-get info :redirect) info))
(output (format TITLE:: %s\n title)))
(if categories (setq output (concat output (format CATEGORIES:: %s\n 
categories
(if related (setq output (concat output (format RELATED:: %s\n 
categories
(if summary (setq output (concat output (format SUMMARY:: %s\n 
categories
(if redirect (setq output (concat output (format REDIRECT:: %s\n 
categories
(concat output \n\n contents)))
#+END_SRC

(Pardon the un-idiomatic Emacs-lisp.)

Then I created an org file that begins:

#+BEGIN_SRC org
  ,#+title:: PulseCount
  ,#+summary:: Pulse counter.
  ,#+related:: Classes/Stepper
  ,#+categories:: UGensTriggers

  ,* Description
  Each trigger increments a counter which is output as a signal.
#+END_SRC

Then I run org-scdoc-export-as-scdoc, and I get as the first few lines:

TITLE:: 
CATEGORIES:: 
RELATED:: 
SUMMARY:: 
REDIRECT:: 

... telling me that the template function retrieved empty strings for all the 
export options.

Obviously I've done something wrong, but... what? (let ((title 
(org-export-data (plist-get info :title) info)))...) is copied from 
ox-latex.el, and ox-latex clearly has no problem accessing the title.

Thanks in advance. I'm sure I'll have other questions later.

hjh





[O] org-latex-fragments on sections

2015-03-02 Thread Andreas Leha
Hi, 

I am forwarding a question from stackexchange [1] here, as I am
interested in this myself and I think this a bug.

I just add that the behaviour is not as expected also when the prefixed
command (C-u C-c C-x C-l) is used.

begin_quote

In the following Orgmode file, I can't figure a way to preview only the
latex fragments of section 1.1 (= those contained in sections 1.1.1 and
1.1.2, not those of section 1.2 nor section 2)

#+begin_org
* section 1
** section 1.1
*** section 1.1.1
$\alpha=1$ 
*** section 1.1.2
$\alpha=2$
** section 1.2 
$\alpha=3$

* section 2 
** section 2.1
$\alpha=4$
** section 2.2
$\alpha=5$
#+end_org

unfortunately when my maker is at point

  ** section 1.1

the command org-preview-latex-fragment (C-c C-x C-l) has no effect.

Same question to preview only the latex fragments of (the whole) section
1, it seems that at point

  * section 1 

the command C-c C-x C-l processes ALL latex fragments (section 1 and
section 2) of the tree.

end_quote


Regards,
Andreas


[1] 
http://stackoverflow.com/questions/28807852/dealing-with-org-latex-preview-within-trees




Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Eric S Fraga
On Sunday,  1 Mar 2015 at 14:24, Thomas S. Dye wrote:
 Rasmus ras...@gmx.us writes:

 Probably a CITATION_STYLE as well, e.g. numeric, author-year, etc.

 I suggest we keep Patrick Daly's distinction between citation style
 and citation mode.  Hence, #+CITATION_MODE instead
 of #+CITATION_STYLE. 

Agreed.

[...]

 The following tables describe my uncertainty about how the Org mode
 citations map to these three modes.  The tables show example (modulo
 style) replacement text at the point of the Org mode citation.  Note
 that the Vancouver mode will also require the addition of citation
 information in a footnote or endnote, separate from the position of the
 Org mode citation.

I'm very much in line with the second of your two maps:

 #+name: second-map
 | citation | Harvard   | Vancouver  | numerical  |

 |--+---++|
 | @key | author (year) | author (1) | author (1) |
 | [@key]   | (author year) | (1)| (1)|
 | cite:| author (year) | author (1) | author (1) |
 | (cite):  | (author year) | (1)| (1)|


thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-820-gd92ef9



Re: [O] org-latex-fragments on sections

2015-03-02 Thread Andreas Leha
Hi Rasmus,

Thanks for testing this

Rasmus ras...@gmx.us writes:
 Andreas Leha andreas.l...@med.uni-goettingen.de writes:


 I just add that the behaviour is not as expected also when the prefixed
 command (C-u C-c C-x C-l) is used.
 [...]
 unfortunately when my maker is at point

   ** section 1.1

 the command org-preview-latex-fragment (C-c C-x C-l) has no effect.

 I can't reproduce in neither Org 8.2 nor 8.3 using emacs -q.

 When I put the cursor on ** section 1.1 and do C-u C-c C-x C-l I get the
 desired fragments, i.e. section 1.1.1 and 1.1.2.

 —Rasmus

I just tried with emacs -Q (which I had not done previously) and can
still reproduce it.

My system info:

GNU Emacs 24.4.50.1 (x86_64-apple-darwin13.3.0, NS appkit-1265.21 Version 
10.9.4 (Build 13E28)) of 2014-09-02 on mib106584i.local
Org-mode version 8.3beta (release_8.3beta-902-gd749e8)

Best,
Andreas




Re: [O] org-latex-fragments on sections

2015-03-02 Thread Rasmus
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi Rasmus,

 Thanks for testing this

 Rasmus ras...@gmx.us writes:
 Andreas Leha andreas.l...@med.uni-goettingen.de writes:


 I just add that the behaviour is not as expected also when the prefixed
 command (C-u C-c C-x C-l) is used.
 [...]
 unfortunately when my maker is at point

   ** section 1.1

 the command org-preview-latex-fragment (C-c C-x C-l) has no effect.

 I can't reproduce in neither Org 8.2 nor 8.3 using emacs -q.

 When I put the cursor on ** section 1.1 and do C-u C-c C-x C-l I get the
 desired fragments, i.e. section 1.1.1 and 1.1.2.

 —Rasmus

 I just tried with emacs -Q (which I had not done previously) and can
 still reproduce it.

 My system info:

 GNU Emacs 24.4.50.1 (x86_64-apple-darwin13.3.0, NS appkit-1265.21
 Version 10.9.4 (Build 13E28)) of 2014-09-02 on mib106584i.local
 Org-mode version 8.3beta (release_8.3beta-902-gd749e8)

I'm on:

GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.8) of 
2015-02-27 on W530

Org-mode version 8.3beta (release_8.3beta-882-gf8731e @ 
/usr/share/emacs/site-lisp/org/)

And I just updated to latest version of master, and it still works.

This is what I see

 http://i.imgur.com/RytjyTW.png

Perhaps I misunderstood the issue?

Rasmus

-- 
. . . It begins of course with The Internet.  A Net of Peers






Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Aaron Ecay
Hi Tom,

2015ko martxoak 2an, Thomas S. Dye-ek idatzi zuen:
 
 Aloha Aaron,
 
 Aaron Ecay aarone...@gmail.com writes:
 
 By way of illustration, Biblatex (AFAICT) doesn’t provide a possessive
 citation command, which was mentioned by someone in this thread (or its
 predecessor) as a desideratum.  I’d expect a savvy latex user to put in
 their preamble:
 
 \newcommand{\citeposs}[1]{\citeauthor{#1}’s (\citeyear{#1})}
 
 That doesn’t really work in org.  (It could be put together with an org
 macro, but would lose the kind of click-to-view functionality that
 org-ref already provides and which would be ported to the new syntax as
 well.)
 
 #+name: define-citeposs-link
 #+begin_src emacs-lisp :results silent :exports none
 (org-add-link-type 
  citeposs 'ebib-open-org-link
  (lambda (path desc format)
(cond
 ((eq format 'html)
  (format (cite%s/cite) path))
 ((eq format 'latex)
  (format \\citeauthor{%s}'s (\\citeyear{%s}) path path)
 #+end_src
 
 I haven't tested this, but I think it would work in Org mode.

The main thrust of this thread, and the previous one, has been to
define a citation syntax in org.  I don’t think anyone contests that
link-based solutions basically do the trick for Latex (only).  And
yet, (almost?) everyone has agreed that something more is needed, or
at least inevitable.  So I’m puzzled why you brought this up.

Are you trying to argue for subtype-based citations?  This is what I
infer from your messages (not just this one, and please do correct me if
I’m wrong).  If so, it would make it easier for me to understand you if
you said so outright.  My own opinion is that plists are better than
subtypes, but I’ve also said that I don’t think the correct decision can
be made a priori.  So don’t let me stop you (in general, not just Tom)
from going ahead with an implementation of subtypes, if that’s your
preferred solution.  I would like to help out with coding or testing,
though I haven’t yet been able to figure out where my efforts would be
best applied.  So if there’s something you (again, in general) think
would be helpful, don’t hesitate to ask.

Thanks,

-- 
Aaron Ecay



Re: [O] Org agenda time table formatting reverses when loading zenburn theme

2015-03-02 Thread Claudius Mueller

I installed the latest version of zenburn - but I see the same thing. I then 
went and tested with different themes (such as wombat). Same thing. Whatever 
theme I load - it upsets my agenda. This is really weird.

Claudius

Jorge A. Alfaro-Murillo writes:

 Claudius Mueller writes:

 if I load a theme (such as zenburn) and then rebuild my agenda - 
 the time table has changed: (i) the sorting of time is reversed, 
 and (ii) tasks that were inline before are now sorted out of the 
 time table (see arrow in both pictures).

 I do not use zenburn very often, but I just tried to replicate the 
 behavior and couldn't. What version of zenburn do you have? I 
 haven't pulled the origin since commit 0ded23f of April of last 
 year. You could try checking out that commit (git checkout 
 0ded23f) and see if your agenda behaves as expected, if so report 
 the bug to the developers of zenburn.

 Best,




Re: [O] org-calendar-holiday and local holidays

2015-03-02 Thread Jorge A. Alfaro-Murillo

Alexis writes:

When i scroll down to look at the current value of 
`calendar-holidays`, however, i see that neither the current 
value nor the original value makes any reference to the 
`holiday-local-holidays` variable. And indeed, when i examine my 
agenda for next Monday, which is a local holiday i've specified 
in `holiday-local-holidays`, i can't see that local holiday. To 
fix this, i use M-: to evaluate: 

   (setq calendar-holidays (append calendar-holidays 
holiday-local-holidays)) 

after which the local holiday next Monday appears in my Org 
agenda.


You do not need to add that, calendar-holidays appends 
holiday-local-holidays when holidays.el is loaded, just restart 
emacs. 

Given the documentation for the `calendar-holidays` variable, 
the fact that i need to manually add the value of the 
`holiday-local-holidays` variable to `calendar-holidays` seems 
to me like it might be a coding or documentation bug in Emacs 
 ?


It is also not a documentation bug, at least in my emacs 
(25.0.50.1) the documentation of calendar-holidays says clearly:


Note that these variables [`holiday-other-holidays', 
`holiday-general-holidays', `holiday-local-holidays', 
`holiday-christian-holidays', `holiday-hebrew-holidays', 
`holiday-islamic-holidays', `holiday-bahai-holidays', 
`holiday-oriental-holidays' and `holiday-solar-holidays'] have no 
effect on `calendar-holidays' after it has been set (e.g. after 
the calendar is loaded). In that case, customize 
`calendar-holidays' directly.


Best,

--
Jorge.




[O] reftex support for figures

2015-03-02 Thread Ken Mankoff
Hi,

Org + reftex works for me for citations and equations but not figures.

I assume equation support works because I write equations inside \begin{align} 
environments and have actual LaTeX code for \label{eq:foo}. But Figures are in 
Org syntax:

#+CAPTION: Foo
#+LABEL: fig:foo
[[./foo.png]]

And when I try to insert a figure reference with Reftex, none are found.

Does anyone have Reftex support working with Org figures?

Thanks,

  -k.



[O] Missing OpenDocument schema files and ODT file corruption

2015-03-02 Thread Monroe, Will

  
  
Hello,

I'm using Emacs 24.4, Org-mode version 8.2.10 and I've run into a
problem with missing OpenDocument schema files.  Upon startup, I see
these messages:

,
| Debug (ox-odt): Searching for OpenDocument styles files...
| Debug (ox-odt): Trying /usr/share/emacs/etc/org/styles/... [2
times]
| Debug (ox-odt): Trying /Users/wmonro1/.emacs.d/etc/styles/...
| Debug (ox-odt): Trying
/Users/wmonro1/.emacs.d/elpa/org-20150223/etc/styles/...
| Debug (ox-odt): Using styles under
/Users/wmonro1/.emacs.d/elpa/org-20150223/etc/styles/
| Debug (ox-odt): Searching for OpenDocument schema files...
| Debug (ox-odt): Trying /usr/share/emacs/etc/org/schema/... [2
times]
| Debug (ox-odt): No OpenDocument schema files installed
`

I think I've had these errors for some time but I haven't paid much
attention to them.  However, I recently started exporting to
OpenDocument formats (e.g., ODT) and I've encountered frequent
problems with "file corruption" and some ODT files that won't even
open.  I want to find out what's happening so I can use the
export/publishing functions for ODT more reliably.

I searched the org-mode listerv and found a recommendation to check
the values of org-odt-styles-dir and org-odt-schema-dir.  I got the
following values:

,
| org-odt-styles-dir:
| "/Users/wmonro1/.emacs.d/elpa/org-20150223/etc/styles/"
| 
| org-odt-schema-dir
| nil
`

There is documentation for `org-odt-schema-dir' the explains the
following:

,
| Documentation:
| Directory that contains OpenDocument schema files.
| 
| This directory contains:
| 1. rnc files for OpenDocument schema
| 2. a "schemas.xml" file that specifies locating rules needed
|    for auto validation of OpenDocument XML files.
| 
| Use the customize interface to set this variable.  This ensures
| that `rng-schema-locating-files' is updated and auto-validation
| of OpenDocument XML takes place based on the value
| `rng-nxml-auto-validate-flag'.
| 
| The default value of this variable varies depending on the
| version of org in use and is initialized from
| `org-odt-schema-dir-list'.  The OASIS schema files are available
| only in the org's private git repository.  It is *not* bundled
| with GNU ELPA tar or standard Emacs distribution.
| 
| You can customize this variable.
| 
| This variable was introduced, or its default value was changed, in
| version 24.1 of Emacs.
`

So, now I understand why the error messages are occuring but, given
that the value seems to be `nil' by default, I'm not sure if I need
to change anything.  Again, I'm experiencing some problems with
org-mode export to ODT and I'd like to clear those up.  Would it
help to obtain the "rnc" and "schemas.xml" files  and then point
`org-odt-schema-dir' to them?  

Will
  




Re: [O] org-calendar-holiday and local holidays

2015-03-02 Thread Jorge A. Alfaro-Murillo

Hi Melleus.

Melleus writes:

Does %%(org-calendar-holiday) know about holiday-local-holidays? 
I'm not programmer, sorry. I've set up those local holidays but 
cannot see them in my agenda.


They should show up after you restart emacs.

Best,
--
Jorge.




Re: [O] Exporter: Derived backend options-alist

2015-03-02 Thread Nicolas Goaziou
Hello,

James Harkins jamshar...@qq.com writes:

 I'm trying to derive an exporter backend from ASCII. I need to add some 
 export options, so I have:

 #+BEGIN_SRC {emacs-lisp}
 (org-export-define-derived-backend 'scdoc 'ascii
   :translate-alist  ... omitted for brevity...
   :options-alist
   '((:categories CATEGORIES nil nil t)
 (:related RELATED nil nil t)
 (:summary SUMMARY nil nil t)
 (:redirect REDIRECT nil nil t))
 )

 ... snip snip...

 (defun org-scdoc-template (contents info)
   Return complete document string after SCDoc conversion.
 CONTENTS is the transcoded contents string.  INFO is a plist
 holding export options.
   (let* ((title (org-export-data (plist-get info :title) info))
   (categories (org-export-data (plist-get info :categories) info))
   (related (org-export-data (plist-get info :related) info))
   (summary (org-export-data (plist-get info :summary) info))
   (redirect (org-export-data (plist-get info :redirect) info))
   (output (format TITLE:: %s\n title)))
 (if categories (setq output (concat output (format CATEGORIES:: %s\n 
 categories
 (if related (setq output (concat output (format RELATED:: %s\n 
 categories
 (if summary (setq output (concat output (format SUMMARY:: %s\n 
 categories
 (if redirect (setq output (concat output (format REDIRECT:: %s\n 
 categories
 (concat output \n\n contents)))
 #+END_SRC

 (Pardon the un-idiomatic Emacs-lisp.)

 Then I created an org file that begins:

 #+BEGIN_SRC org
   ,#+title:: PulseCount
   ,#+summary:: Pulse counter.
   ,#+related:: Classes/Stepper
   ,#+categories:: UGensTriggers

It should be 

  #+title: PulseCount
  ...
  #+categories: UGensTriggers


   ,* Description
   Each trigger increments a counter which is output as a signal.
 #+END_SRC

 Then I run org-scdoc-export-as-scdoc, and I get as the first few lines:

 TITLE:: 
 CATEGORIES:: 
 RELATED:: 
 SUMMARY:: 
 REDIRECT:: 

 ... telling me that the template function retrieved empty strings for
 all the export options.

`org-export-data' always returns a string, even with a nil first
argument. If categories, related, etc. values are not parsed, just use

  (categories (plist-get info :categories))
  

Regards,

-- 
Nicolas Goaziou



Re: [O] refiling with helm

2015-03-02 Thread Leo Ufimtsev
I found that changing the default refiling targets made refiling useful for me. 

By default, only first level headings show up. 

I have a customized config so that all my org files show up: 



(setq myvar/org-dir ~/git/LeoUfimtsev.github.io/org/) 

(setq myvar/org-files (file-expand-wildcards (concat myvar/org-dir *.org))) 
...customize..: 


'(org-refile-targets 
(quote 
((org-agenda-files :maxlevel . 10) 
(nil :maxlevel . 10) 
(myvar/org-files :maxlevel . 10 







My notes are somewhat cryptic, but here is a link if of use: 

http://leoufimtsev.github.io./org/emacs.html#sec-14-16-3 



Leo Ufimtsev | Intern Software Engineer @ Eclipse Team 

- Original Message -

From: Xebar Saram zelt...@gmail.com 
To: org mode emacs-orgmode@gnu.org 
Sent: Saturday, February 28, 2015 1:19:17 AM 
Subject: [O] refiling with helm 

Hi guys 

I was wondering if anyone uses helm for refiling org capture data. and if so 
can anyone share his methods/setup? 

googling for it didnt yield to many results (especially for people like me who 
dont know to code :)) 

thx 

Z 



Re: [O] Notifications-notify for org-mode scheduled items?

2015-03-02 Thread Nick Dokos
Nick Dokos ndo...@gmail.com writes:

 torys.ander...@gmail.com (Tory S. Anderson) writes:

 I was actually just playing with this. If you don't mind adding your whole 
 daily schedule to the notify list, you can use

 (org-agenda-to-appt)

 Unrelated to agenda, there is (appt-add)

 As far submitting just a single item from the agenda for a pop-up reminder, 
 I'm still at a loss.
 - Tory

 Leo Ufimtsev lufim...@redhat.com writes:

 Hello folks,

 I would like to receive desktop notifications (1* e.g below) for scheduled 
 items. 
 E.g if I schedule like this:

 * Make Coffee 
   SCHEDULED: 2015-03-02 Mon 01:30

 Then I would like a desktop notification to pup up at 1:30 telling me to 
 make coffee.

 I saw the org-notify package, but besides this post:
 http://permalink.gmane.org/gmane.emacs.orgmode/59339
 I didn't see any documentation on it, making it somewhat tricky to 
 configure. 

 I'd be willing to spend time figuring out the package, but I'm wondering, 
 has someone got something like this to work already?
 And if so, would you be willing to share a 'high-level' overview? (I'd be 
 happy to figure out the details).

 Thank you


 1* I get a desktop notification if I run this command:
 (notifications-notify
:title Title
:body This is bimportant/b.
:actions '(Confirm I agree Refuse I disagree)
:on-action 'my-on-action-function
:on-close 'my-on-close-function)
 ref:
 https://www.gnu.org/software/emacs/manual/html_node/elisp/Desktop-Notifications.html


 Leo Ufimtsev | Intern Software Engineer @ Eclipse Team

 There is a FAQ entry with a couple of pointers, one to an ancient
 posting of mine (I still use that mechanism seven years later :-)) and one
 to a more refined setup by Russell Adams (using zenity):

 http://orgmode.org/worg/org-faq.html#automatic-reminders

 Russel's entry in org-hacks is followed by a similar entry by Sarah
 Bagby using terminal-notifier on OS X.


... and I just noticed that after those two, there is a posting by
Richard Riley, using gnome-osd.




Re: [O] org-calendar-holiday and local holidays

2015-03-02 Thread Melleus
jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) writes:

 They should show up after you restart emacs.

I supposed it should. But in fact in does not work.




[O] Notifications-notify for org-mode scheduled items?

2015-03-02 Thread Leo Ufimtsev
Hello folks,

I would like to receive desktop notifications (1* e.g below) for scheduled 
items. 
E.g if I schedule like this:

* Make Coffee 
  SCHEDULED: 2015-03-02 Mon 01:30

Then I would like a desktop notification to pup up at 1:30 telling me to make 
coffee.

I saw the org-notify package, but besides this post:
http://permalink.gmane.org/gmane.emacs.orgmode/59339
I didn't see any documentation on it, making it somewhat tricky to configure. 

I'd be willing to spend time figuring out the package, but I'm wondering, has 
someone got something like this to work already?
And if so, would you be willing to share a 'high-level' overview? (I'd be happy 
to figure out the details).

Thank you


1* I get a desktop notification if I run this command:
(notifications-notify
   :title Title
   :body This is bimportant/b.
   :actions '(Confirm I agree Refuse I disagree)
   :on-action 'my-on-action-function
   :on-close 'my-on-close-function)
ref:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Desktop-Notifications.html


Leo Ufimtsev | Intern Software Engineer @ Eclipse Team



Re: [O] Notifications-notify for org-mode scheduled items?

2015-03-02 Thread Nick Dokos
torys.ander...@gmail.com (Tory S. Anderson) writes:

 I was actually just playing with this. If you don't mind adding your whole 
 daily schedule to the notify list, you can use

 (org-agenda-to-appt)

 Unrelated to agenda, there is (appt-add)

 As far submitting just a single item from the agenda for a pop-up reminder, 
 I'm still at a loss.
 - Tory

 Leo Ufimtsev lufim...@redhat.com writes:

 Hello folks,

 I would like to receive desktop notifications (1* e.g below) for scheduled 
 items. 
 E.g if I schedule like this:

 * Make Coffee 
   SCHEDULED: 2015-03-02 Mon 01:30

 Then I would like a desktop notification to pup up at 1:30 telling me to 
 make coffee.

 I saw the org-notify package, but besides this post:
 http://permalink.gmane.org/gmane.emacs.orgmode/59339
 I didn't see any documentation on it, making it somewhat tricky to 
 configure. 

 I'd be willing to spend time figuring out the package, but I'm wondering, 
 has someone got something like this to work already?
 And if so, would you be willing to share a 'high-level' overview? (I'd be 
 happy to figure out the details).

 Thank you


 1* I get a desktop notification if I run this command:
 (notifications-notify
:title Title
:body This is bimportant/b.
:actions '(Confirm I agree Refuse I disagree)
:on-action 'my-on-action-function
:on-close 'my-on-close-function)
 ref:
 https://www.gnu.org/software/emacs/manual/html_node/elisp/Desktop-Notifications.html


 Leo Ufimtsev | Intern Software Engineer @ Eclipse Team

There is a FAQ entry with a couple of pointers, one to an ancient
posting of mine (I still use that mechanism seven years later :-)) and one
to a more refined setup by Russell Adams (using zenity):

http://orgmode.org/worg/org-faq.html#automatic-reminders

Russel's entry in org-hacks is followed by a similar entry by Sarah
Bagby using terminal-notifier on OS X.

HTH,
Nick





Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Richard Lawrence
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

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

 That would be wonderful!  Will you publish a patch or, better, a branch
 somewhere, even if it's not ready for master?

 I created a new branch: wip-cite. It introduces support for @key
 [@key] [cite:pre @key post] and [(cite):pre @key post] constructs.

Great!  I'll take a look.

What's the next step here?  Adding support for multiple references?
multi-cites? `'-keys?  

 As a reminder, I prefer subkeys over plists because they have a smaller
 footprint in the document. Also, as already explained, having many
 subkeys is not a problem with proper tooling (e.g., some completion with
 descriptions). Note that this is closer to org-ref requirements,
 probably making easier to port some features into core.

 However, opinion from advanced citation users on this ML has more weight
 that mine. Instead of trying to figure out hypothetical crazy uses for
 citations (e.g., using 50 different citation commands), I'd rather hear
 from people with real citation requirements who are willing to use this
 machinery.

Yes, me too.

 At this point, we probably need to implement a BIBLIOGRAPHY keyword
 (files) and BIBLIOGRAPHY_BACKEND (bibtex, zotero, jabref...) and provide
 basic tools to handle citations in an Org document.

Could we guess the backend from the file extension on the BIBLIOGRAPHY,
to keep things simple here?  I don't use a citation manager, so I don't
know if this is possible for anything other than Bib(La)TeX.  

Also, as mentioned earlier, it would be really nice to support
org-bibtex as one of the reference database formats.  (It's what I use,
so naturally it's what I think we should bless. :) This would allow
storing your reference database in-document.

Some things to think about:

1) Is there ever a need to mix reference database formats in the same
document (e.g., zotero and org-bibtex)?  (I would think not, but my
needs are simple.)

2) Is there ever a need to mix multiple reference databases in the
*same* format (e.g., two different .bib files)?  (I would think so,
given the existence in BibLaTeX of \addbibresource.)

3) If the answer to either 1 or 2 is yes, how should we decide
precedence between multiple reference databases?  (Two databases might
contain the same key.)

Best,
Richard



Re: [O] org-calendar-holiday and local holidays

2015-03-02 Thread Melleus
Alexis flexibe...@gmail.com writes:

 see that local holiday. To fix this, i use M-: to evaluate:

(setq calendar-holidays (append calendar-holidays
 holiday-local-holidays))

 after which the local holiday next Monday appears in my Org agenda.

Works perfectly this way, thank you.




Re: [O] Notifications-notify for org-mode scheduled items?

2015-03-02 Thread Tory S. Anderson
I was actually just playing with this. If you don't mind adding your whole 
daily schedule to the notify list, you can use

(org-agenda-to-appt)

Unrelated to agenda, there is (appt-add)

As far submitting just a single item from the agenda for a pop-up reminder, I'm 
still at a loss.
- Tory

Leo Ufimtsev lufim...@redhat.com writes:

 Hello folks,

 I would like to receive desktop notifications (1* e.g below) for scheduled 
 items. 
 E.g if I schedule like this:

 * Make Coffee 
   SCHEDULED: 2015-03-02 Mon 01:30

 Then I would like a desktop notification to pup up at 1:30 telling me to make 
 coffee.

 I saw the org-notify package, but besides this post:
 http://permalink.gmane.org/gmane.emacs.orgmode/59339
 I didn't see any documentation on it, making it somewhat tricky to configure. 

 I'd be willing to spend time figuring out the package, but I'm wondering, has 
 someone got something like this to work already?
 And if so, would you be willing to share a 'high-level' overview? (I'd be 
 happy to figure out the details).

 Thank you


 1* I get a desktop notification if I run this command:
 (notifications-notify
:title Title
:body This is bimportant/b.
:actions '(Confirm I agree Refuse I disagree)
:on-action 'my-on-action-function
:on-close 'my-on-close-function)
 ref:
 https://www.gnu.org/software/emacs/manual/html_node/elisp/Desktop-Notifications.html


 Leo Ufimtsev | Intern Software Engineer @ Eclipse Team



Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Aaron Ecay
Hi Rasmus,

2015ko martxoak 1an, Rasmus-ek idatzi zuen:
 
 At this point, we probably need to implement a BIBLIOGRAPHY keyword
 (files) and BIBLIOGRAPHY_BACKEND (bibtex, zotero, jabref...) and provide
 basic tools to handle citations in an Org document.
 
 Probably a CITATION_STYLE as well, e.g. numeric, author-year, etc.
 
 I'll try to look at biblatex support for ox-latex, which should be the
 easiest target, but ATM I'm a bit busy.  

If you have time, I’d appreciate your opinion on whether the approach
I’ve started of doing latex and non-latex together in ox-cite is a good
approach, or whether instead you’d rather handle latex within ox-latex.

Should we also support “plain” bibtex and natbib?

 For bibtex-outside-of-latex, reftex-cite.el is decent, but not great¹.
 Still, it may be easier to fix it up that to write our own bibtex
 parser.

It would also be possible to just use an external program like
citeproc-java.  WDYT?

Thanks,

-- 
Aaron Ecay



Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Aaron Ecay
Hi Tom,

2015ko martxoak 2an, Thomas S. Dye-ek idatzi zuen:
 
 I'm not able to understand the full implications of subtypes
 vs. plists, so don't have a preferred solution along those lines.
 
 I brought this up in reaction to This doesn't really work in org.
 
 I'm hoping for an Org mode citation syntax where there is an analogous
 org-add-cite-type function, so I only have to remember the syntax one
 time and can forget about it when I'm writing.
 
 Sorry if this is noise and thanks for your patience.

Not noise at all.  I think I understand where you are coming from
better.

Your comment inspired me to implement
org-export-cite-add-citation-mode-latex in the experimental citation
support I just pushed.  So you can do:

(org-export-cite-add-citation-mode-latex tsd \\mycitecommand[%s][%s]{%s} 
\\myparencitecommand[%s][%s]{%s})

Add to your document:

#+CITATION_MODE: tsd

And citations should just work with your chosen commands.  I’m sure when
advanced citation support comes along (whether from subtypes or plists),
a similarly simple wrapper can be implemented.

I also found your discussion of citation modes vs. styles at
http://mid.gmane.org/m2k2z0mekp@tsdye.com illuminating, so thanks
for that.

-- 
Aaron Ecay



Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Nicolas Goaziou
Richard Lawrence richard.lawre...@berkeley.edu writes:

 What's the next step here?  Adding support for multiple references?
 multi-cites? `'-keys?

To support multi cites, we must first decide how the parsed will present
information, i.e., what are the properties in the following case

  [cite:pre; pre1 @k1 post1; pre2 @k2 post2; post]

There is also the following degenerate case

  [cite:pre; pre ;post]

What should be done about it?

I didn't implement -keys as there is no consensus on them.

Regards,



Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Nicolas Goaziou
Hello,

Aaron Ecay aarone...@gmail.com writes:

 I decided to go ahead and see what I could make of it. The result has
 been pushed to the org mode repo to the branch wip-cite-awe. (I didn’t
 want to push to your branch without asking, but if you prefer I’ll do
 that and delete my own.)

This is not *my* branch. However, I suggest to push only consensual
features with documentation and tests there, and experiment features in
other branches.

 The first issue is that the parser includes trailing punctuation in
 “bare” @key citations.  So the following does not work as expected (the
 :key includes the period): “This was demonstrated most recently by
 @Smith2015.”  I’m not sure what the right approach is – one option
 would be to say that keys can contain punctuation, but must end (and
 begin) with an alphanumeric character.

I'll update the parser once there is a new syntax for keys. At the
moment, it is correct wrt syntax.

 The second issue is that the :key property of the citation element
 includes the @.  This is not right IMO: it’s a detail of the syntax.
 And it means that consumers of the syntax, who might want to look up
 the key in a database, will always have to remember to strip the @.
 I’ve pushed a provisional fix for this in my branch.

Please apply it to wip-cite. A dedicated test would be nice, too.

 The code is very rough and ready, has lots of TODO comments in it, is
 missing tests, documentation in the manual, etc.  Nonetheless, I want to
 get feedback on it early, given that many people have already contributed
 so much useful information to this discussion.

I didn't look closely at the code, but I suggest to use org-cite.el
instead of ox-cite.el. Even though this is only related to export at
the moment, this library will also contain commands to manipulate
citation objects. It also shorten prefix for these functions.

Thanks for your work,

Regards,

-- 
Nicolas Goaziou



Re: [O] Missing OpenDocument schema files and ODT file corruption

2015-03-02 Thread J. David Boyd
Monroe, Will wtmonroe...@gmail.com writes:

 Hello,

 I'm using Emacs 24.4, Org-mode version 8.2.10 and I've run into a
 problem with missing OpenDocument schema files. Upon startup, I see
 these messages:

 ,
 | Debug (ox-odt): Searching for OpenDocument styles files...
 | Debug (ox-odt): Trying /usr/share/emacs/etc/org/styles/... [2 times]
 | Debug (ox-odt): Trying /Users/wmonro1/.emacs.d/etc/styles/...
 | Debug (ox-odt): Trying
 /Users/wmonro1/.emacs.d/elpa/org-20150223/etc/styles/...
 | Debug (ox-odt): Using styles under
 /Users/wmonro1/.emacs.d/elpa/org-20150223/etc/styles/
 | Debug (ox-odt): Searching for OpenDocument schema files...
 | Debug (ox-odt): Trying /usr/share/emacs/etc/org/schema/... [2 times]
 | Debug (ox-odt): No OpenDocument schema files installed
 `

 I think I've had these errors for some time but I haven't paid much
 attention to them. However, I recently started exporting to
 OpenDocument formats (e.g., ODT) and I've encountered frequent
 problems with file corruption and some ODT files that won't even
 open. I want to find out what's happening so I can use the
 export/publishing functions for ODT more reliably.

 I searched the org-mode listerv and found a recommendation to check
 the values of org-odt-styles-dir and org-odt-schema-dir. I got the
 following values:

 ,
 | org-odt-styles-dir:
 | /Users/wmonro1/.emacs.d/elpa/org-20150223/etc/styles/
 | 
 | org-odt-schema-dir
 | nil
 `

 There is documentation for `org-odt-schema-dir' the explains the
 following:

 ,
 | Documentation:
 | Directory that contains OpenDocument schema files.
 | 
 | This directory contains:
 | 1. rnc files for OpenDocument schema
 | 2. a schemas.xml file that specifies locating rules needed
 | for auto validation of OpenDocument XML files.
 | 
 | Use the customize interface to set this variable. This ensures
 | that `rng-schema-locating-files' is updated and auto-validation
 | of OpenDocument XML takes place based on the value
 | `rng-nxml-auto-validate-flag'.
 | 
 | The default value of this variable varies depending on the
 | version of org in use and is initialized from
 | `org-odt-schema-dir-list'. The OASIS schema files are available
 | only in the org's private git repository. It is *not* bundled
 | with GNU ELPA tar or standard Emacs distribution.
 | 
 | You can customize this variable.
 | 
 | This variable was introduced, or its default value was changed, in
 | version 24.1 of Emacs.
 `

 So, now I understand why the error messages are occuring but, given
 that the value seems to be `nil' by default, I'm not sure if I need to
 change anything. Again, I'm experiencing some problems with org-mode
 export to ODT and I'd like to clear those up. Would it help to obtain
 the rnc and schemas.xml files and then point `org-odt-schema-dir'
 to them? 

 Will 

If I recall correctly, I was getting errors also until I added these files in.

I found the files schemas.xml, OrgOdtContentTemplate.xml, and OrgOdtStyles.xml
in the git repository for Org mode, in the etc/schema and
etc/styles directories.

I then copied the etc/schema/schemas.xmls and etc/styles/OrgOdt*.xml files to my
/usr/share/emacs/etc/org/styles directory, and the errors went away.

That must be where org-odt-schema-dir defaults to, as I don't have it set
anywhere.

Good luck!

Dave








Re: [O] Citation syntax: a revised proposal

2015-03-02 Thread Rasmus
Aaron Ecay aarone...@gmail.com writes:

 Hi Rasmus,

 2015ko martxoak 1an, Rasmus-ek idatzi zuen:
 
 At this point, we probably need to implement a BIBLIOGRAPHY keyword
 (files) and BIBLIOGRAPHY_BACKEND (bibtex, zotero, jabref...) and provide
 basic tools to handle citations in an Org document.
 
 Probably a CITATION_STYLE as well, e.g. numeric, author-year, etc.
 
 I'll try to look at biblatex support for ox-latex, which should be the
 easiest target, but ATM I'm a bit busy.  

 If you have time, I’d appreciate your opinion on whether the approach
 I’ve started of doing latex and non-latex together in ox-cite is a good
 approach, or whether instead you’d rather handle latex within ox-latex.

Good that I didn't start hacking on ox-latex in the plain, but went for
org-element instead :)

I will check them out.  I think ox-cite will be a beast.  Still, since
citation is a single object it should probably be in backends.
E.g. export of inlinetasks are handled in backends.

Still, general functionality and backend support and/or API should
probably be in a separate library.

WDYT?

 Should we also support “plain” bibtex and natbib?

I think John said that journals often require natbib.  At this point I'm
using biblatex only.

For ox-latex, it might make sense to have a :citation-backend which is
maps supported citations types to packages.  Until somebody complains, we
could support biblatex only.

 For bibtex-outside-of-latex, reftex-cite.el is decent, but not great¹.
 Still, it may be easier to fix it up that to write our own bibtex
 parser.

 It would also be possible to just use an external program like
 citeproc-java.  WDYT?

This is the preferred method by far!  The closer we can get to the latex
citation where we just insert naïve commands the better IMO.

—Rasmus

-- 
In theory, practice and theory are the same. In practice they are not