Re: [O] default headers for source code blocks

2014-09-09 Thread Ken Mankoff
What about custom template expansions?

http://nicholasvanhorn.com/2014/04/07/org-structure-completion/

Advantage: your C-c C-v d sql RET becomes only  On Sep 9, 2014, at 13:24, Subhan Michael Tindall  
> wrote:
> 
> My apologies if this is in TFM, but I can’t seem to find it after substantial 
> digging.
> I’m using a lot of source code blocks lately.
> What I’d like is a way to specify a set of default headers to insert when a 
> new block is created.
> Right now:
> C-c C-v d sql RET
> #+begin_src sql
> #+end_src
>  
> What I want is this:
> C-c C-v d sql RET
> #+begin_src sql  :exports code :tangle yes :comments noweb
> #+end_src
>  
> Is there a configuration variable I can set for this?  All I can find is refs 
> to see source language documentation, but nothing that actually indicates 
> if/how to manage it.
>  
> Thanks,
>  
>  
> Subhan Michael Tindall
> Program Analyst – FamilyCare Health Plans
> 825 NE Multnomah St, Suite 1400; Portland OR 97232
> Direct: 503-471-3127
> Fax:  503-471-3177
> Email:  subh...@familycareinc.org
> 
>  
> 
> This message is intended for the sole use of the individual and entity to 
> which it is addressed and may contain information that is privileged, 
> confidential and exempt from disclosure under applicable law. If you are not 
> the intended addressee, nor authorized to receive for the intended addressee, 
> you are hereby notified that you may not use, copy, disclose or distribute to 
> anyone the message or any information contained in the message. If you have 
> received this message in error, please immediately advise the sender by reply 
> email and delete the message.  Thank you.


Re: [O] help debugging latex-overlays boxes

2014-09-09 Thread John Kitchin
Nick Dokos  writes:

> John Kitchin  writes:
>
>> Nick Dokos  writes:
>>
>> I have traced my problem. The issue is in the function
>> org-preview-latex-fragment. At the end of the function, where it calls
>> org-format-latex, the default-directory variable that is used in the
>> function call has a value of
>> "c:/Users/YUYUA~1/AppData/Local/Temp/ltxpng/mole-balance"
>>
>> The YUYUA~1 is causing the problem.
>>
>
> My (perhaps naive) expectation would be that "YuYu Yao" would become
> "YUYUYA~1", deleting the space, turning the string to upper case,
> keeping the first six characters and adding the "~1" suffix. Why is the
> last "Y" not there? If it *were* there, would the latex invocation
> work?  I believe (quite without any evidence) that it should.

I don't think it would work. the Space is also not the issue, as it
affects some users with no spaces. This is for some reason, like a
partial dos 8.3 filename (http://en.wikipedia.org/wiki/8.3_filename). I
still do not know why it happens, but setting the
temporary-file-directory in the init.el solves the problem, e.g.:

(setq temporary-file-directory "c:/some/full/path")

>
>> I do not understand why the full path, "c:/Users/Yuyu
>> Yao/AppData/Local/Temp" is not showing up here. When I examine the
>> default-directory variable in a buffer in that directory, that is what
>> comes up. It is only inside the org function it gets chomped to what
>> looks like an old DOS format.
>>
>> Anyway, latex cannot handle that path, so no dvi is produced, and no
>> image.
>>
>> otherwise the latex file is produced, and it compiles fine with the full
>> path. Any ideas on how to fix that? Thanks,
>>
>>> John Kitchin  writes:
>>>
 Hi All,

 I am using org-mode in a course this fall with 60 students.  All of them
 are using org-mode from elpa. For about 10 of them, they are unable to
 toggle the latex-overlays; instead of getting the equations, they get
 empty gray boxes with an error that the png file was not created.  Oddly
 enough, they can export to PDF just fine. I have also checked that they
 have LaTeX (TeXLive) installed, and it appears it is. I am able to
 convert tex files to dvi, and then use dvipng to make a png image. But
 for some reason, the toggle-latex-overlay function does not work for
 them.

 I am at a loss to figure out what the issue is. These are Windows
 laptops that were preconfigured by the department. Almost all of them
 work fine, except for this small number I cannot figure out.

 Any ideas? Thanks,
>>>
>>> I would edebug-defun the function org-create-formula-image and step
>>> through it to make sure that it goes the way you want (are you sure you
>>> are using the dvipng method on these machines? maybe you are using the
>>> imagemagick method but the program has not been installed?  Check the
>>> value of org-latex-create-formula-image-program).
>>>
>>> While you are stepping you can also check the variables in the function
>>> and see e.g. what the output file name is.
>>>
>>> If that goes OK, then I would edebug-defun
>>> org-create-formula-image-with-dvipng next and check the latex input file
>>> it produces. Make sure that things like minted which require
>>> --shell-escape are *not* included in that input file: it's processed by
>>> a hard-wired call to latex (without --shell-escape) , so minted will
>>> cause a failure. If that is the case, check org-latex-packages-alist and
>>> make sure that minted's snippet-flag is nil.
>>>
>
> --
> Nick
>
>
>
>
>

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



Re: [O] Managing articles in orgmode and collaboration

2014-09-09 Thread John Kitchin
Thorsten Jolitz  writes:

I use https://github.com/jkitchin/jmax/blob/master/org/doi-utils.org

It is some code I wrote to build bibtex entries from a doi, and to
download the pdf if you have access to it.

I load it like this:
(org-babel-load-file "doi-utils.org")

You need to define some variables like:

org-ref-pdf-directory

and some features depend on org-ref
(https://github.com/jkitchin/jmax/blob/master/org/org-ref.org).

I use these pretty often.


> Christoph Groth  writes:
>
> Hi,
>
>> Any comments?
>
> do you have a function that automatically fetches bibtex entries for
> books from the web, given some info (title, year, author or so)?

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



Re: [O] Missing Agenda Export in ICS

2014-09-09 Thread Eric S Fraga
On Tuesday,  9 Sep 2014 at 10:46, SabreWolfy wrote:
> I'm using Org-mode 8.2.7c. I exported my Agenda with "C-x C-w" and specified
> an ICS file, which I then imported into Google Calendar. Many events
> appeared, but some did not. An example of one, which did not appear, was a
> standard timestamp event, where other "standard" ones also appeared. What
> are the reasons that an item would not export?

Have you looked at the actual calendar entry in the ics file?
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.3beta-265-g7cf7e4


signature.asc
Description: PGP signature


Re: [O] org-babel and lilypond broken after update

2014-09-09 Thread Steven Arntson
Achim Gratz  writes:

> Steven Arntson writes:
>> org-babel-lilypond-compile-lilyfile: Searching for program: no such
>> file
>> or directory, /usr/bin/lilypond
>>
>> because I installed lilypond into /usr/local/lilypond/usr/bin. I tried
>> "M-x customize-group lilypond RET" and "M-x describe function" but
>> couldn't solve the problem.
>
> There's no customize interface in the version of Org you are using.
> Just setq the variable org-babel-lilypond-nix-ly-path.

This worked perfectly---thank you!

>> 2. Since "org-babel-lilypond-tangle" is less convenient to type than
>> "ly-tangle" I think I should bind a key to it. I've never done
>> that---are there are any guidelines out there to keep newbies from
>> mucking things up?
>
> You don't need to since org-babel-tangle knows to call this function on
> lilypond blocks and is already bound to a key:
>
> http://orgmode.org/manual/Extracting-source-code.html
>
When I invoke "C-c C-v t" the minibuffer gives a result of "Tangled 0
code blocks from filename". I added a header of ":tangle yes" to every
code block, and then I get "Tangled 3 code blocks" but I don't get the
output of MIDI playback and PDF update that I'm accustomed to. Invoking
"M-x org-babel-lilypond-tangle" still produces that. Is there a way to
get that behavior from "C-c C-v t"?

Thank you for your help!
Best,
steven





Re: [O] Difference :header-args: and :header-args+:?

2014-09-09 Thread Rainer M Krug
Achim Gratz  writes:

> Rainer M Krug writes:
>> If this is the case, I would opt, in addition to the + operator, to
>> have a - operator, which *removes* properties from the property set
>> :header-args.
>
> Properties don't work that way, they're just strings.

So the + adds a string to the end of the inherited (or before defined)
string - correct? If this is the case, the same property can be
mwentioned in the :header-qrgs string? 

>
>> Initially I thought, to use :header-args+ instead of :header-args would
>> work, but I was wrong (see below).
>
> It's supposed to work, but doesn't due to a bug in the property API.

OK - good to know.

Rainer

>
>
> Regards,
> Achim.

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpVjuXzmKaFS.pgp
Description: PGP signature


Re: [O] default headers for source code blocks

2014-09-09 Thread Thorsten Jolitz
Subhan Michael Tindall  writes:

> My apologies if this is in TFM, but I can’t seem to find it after
> substantial digging.
>
> I’m using a lot of source code blocks lately.
>
> What I’d like is a way to specify a set of default headers to insert
> when a new block is created.

I have written an 'all-inclusive' function for this case
(https://github.com/tj64/org-dp), it handles all kinds of blocks, all
kinds of header-args including affiliated keywords, knows how to insert
empty blocks, wrap sexps or regions (between lines or marked), how
to 'unwrap' a src-block and how to convert one type of block into
another reusing its contents/parts:

,[ C-h f org-dp-wrap-in-block RET ]
| org-dp-wrap-in-block is an interactive Lisp function in
| `org-dp-lib.el'.
| 
| (org-dp-wrap-in-block &optional LINES USER-INFO &rest PROMPT-SPEC)
| 
| Wrap sexp-at-point or region in Org block.
| 
| A region instead of the sexp-at-point is wrapped if either
| 
|- optional arg LINES is an (positive or negative) integer or
| 
|- the region is active
| 
| In the first case the region is determined by moving LINES lines
| up (LINES is positive) or down (LINES is negative) from point
| using `forward-line', in the second case the active region is
| used.
| 
| If point is already inside of a block, modify it or unwrap its
| content/value instead of wrapping it in another block, except if
| explicitly asked for by user.
| 
| If USER-INFO is given, it should be a list in the format returned
| by `org-dp-prompt', i.e.
| 
|  (elem-type contents replace affiliated args)
| 
| Look up that function's docstring for more information about the
| list's elements. A non-nil USER-INFO suppresses calls to
| `org-dp-prompt' and is used instead of its return value.
| 
| Possible &rest PROMPT-SPEC should be keyword/value pairs used for
| restricting user-prompting via `org-dp-prompt', e.g.
| 
|   :noprompt-affiliated t :noprompt-replace t
| 
| see the docstring of that function for more info.
`

It is possible (and easy) to define new utility functions by restricting
this very generic function to special use cases, e.g. from my init.el:

#+BEGIN_SRC emacs-lisp
;; *** Org DP

(when (require 'org-dp-lib nil t)
  (defun tj/wrap-in-elisp-block ()
(org-dp-wrap-in-block
 nil '(src-block nil nil nil
 (:language "emacs-lisp"
:preserve-indent 1

  (global-set-key (kbd "C-c w w") 'org-dp-wrap-in-block)

  (global-set-key (kbd "C-c w l")
  (lambda ()
(interactive)
(let ((current-prefix-arg '(4)))
  (call-interactively
   'org-dp-wrap-in-block

  (global-set-key (kbd "C-c w e")
  (lambda ()
(interactive)
(tj/wrap-in-elisp-block)))

  (global-set-key (kbd "C-c w a")
  (lambda ()
(interactive)
(backward-sexp)
(tj/wrap-in-elisp-block))) )

#+END_SRC

I you tell me exactly what you need I could write you an utility
function, or maybe play around with the function yourself, its very
powerfull. 

-- 
cheers,
Thorsten




Re: [O] org-babel and lilypond broken after update

2014-09-09 Thread Achim Gratz
Steven Arntson writes:
> org-babel-lilypond-compile-lilyfile: Searching for program: no such file
> or directory, /usr/bin/lilypond
>
> because I installed lilypond into /usr/local/lilypond/usr/bin. I tried
> "M-x customize-group lilypond RET" and "M-x describe function" but
> couldn't solve the problem.

There's no customize interface in the version of Org you are using.
Just setq the variable org-babel-lilypond-nix-ly-path.

> 2. Since "org-babel-lilypond-tangle" is less convenient to type than
> "ly-tangle" I think I should bind a key to it. I've never done
> that---are there are any guidelines out there to keep newbies from
> mucking things up?

You don't need to since org-babel-tangle knows to call this function on
lilypond blocks and is already bound to a key:

http://orgmode.org/manual/Extracting-source-code.html


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

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] org-babel and lilypond broken after update

2014-09-09 Thread Steven Arntson
Achim Gratz  writes:
>
>> (setq ly-nix-ly-path "lilypond")
>
> With the next release these variables will go away and the corresponding
> settings will become customizable.

Two followup questions:

1. Now when I run "M-x org-babel-lilypond-tangle" I get

org-babel-lilypond-compile-lilyfile: Searching for program: no such file
or directory, /usr/bin/lilypond

because I installed lilypond into /usr/local/lilypond/usr/bin. I tried
"M-x customize-group lilypond RET" and "M-x describe function" but
couldn't solve the problem.

2. Since "org-babel-lilypond-tangle" is less convenient to type than
"ly-tangle" I think I should bind a key to it. I've never done
that---are there are any guidelines out there to keep newbies from
mucking things up?

Thank you very much for your help!
steven




Re: [O] org-babel and lilypond broken after update

2014-09-09 Thread Steven Arntson
Achim Gratz  writes:

>
> BTW, you should not install both org and org-plus-contrib.  Use the
> latter if you need something from contrib, otherwsie use just plain org,
> but never both.
>
>
> Regards,
> Achim.

Thanks for this---it's like the 4th time I've been doing the same thing
in two similar ways with emacs. I guess I'm a "belt and suspenders" kind
of guy. I think I'll uninstall "org-plus-contrib" since I can't remember
why I started using it.

Thank you!
steven




Re: [O] default headers for source code blocks

2014-09-09 Thread Ista Zahn
Hi Subhan,

I think the idea is that you should not set his on each individual
block, but set global values. For example

#+PROPERTY: header-args:sql  :exports code :tangle yes :comments noweb

Best,
Ista

On Tue, Sep 9, 2014 at 1:24 PM, Subhan Michael Tindall
 wrote:
> My apologies if this is in TFM, but I can’t seem to find it after
> substantial digging.
>
> I’m using a lot of source code blocks lately.
>
> What I’d like is a way to specify a set of default headers to insert when a
> new block is created.
>
> Right now:
>
> C-c C-v d sql RET
>
> #+begin_src sql
>
> #+end_src
>
>
>
> What I want is this:
>
> C-c C-v d sql RET
>
> #+begin_src sql  :exports code :tangle yes :comments noweb
>
> #+end_src
>
>
>
> Is there a configuration variable I can set for this?  All I can find is
> refs to see source language documentation, but nothing that actually
> indicates if/how to manage it.
>
>
>
> Thanks,
>
>
>
>
>
> Subhan Michael Tindall
>
> Program Analyst – FamilyCare Health Plans
>
> 825 NE Multnomah St, Suite 1400; Portland OR 97232
>
> Direct: 503-471-3127
>
> Fax:  503-471-3177
>
> Email:  subh...@familycareinc.org
>
>
>
>
> This message is intended for the sole use of the individual and entity to
> which it is addressed and may contain information that is privileged,
> confidential and exempt from disclosure under applicable law. If you are not
> the intended addressee, nor authorized to receive for the intended
> addressee, you are hereby notified that you may not use, copy, disclose or
> distribute to anyone the message or any information contained in the
> message. If you have received this message in error, please immediately
> advise the sender by reply email and delete the message.  Thank you.



Re: [O] Managing articles in orgmode and collaboration

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

> Thomas S. Dye writes: 
>
>> I don't manage my bibliography references in Org mode.  I am 
>> used to managing a bibtex database and have never found the need 
>> to move everything to Org. 
>
> Same here.

Me too.  I use the format

./literature
./literature/article1/
./literature/article1/article1.pdf 
./literature/article1/article1.bib ← one entry
./literature/article1/article1.org ← notes
...

I collect all bib files to create the master bibfile.  I also generate
a nicer overview.org → overview.html for easy search, though most of
the time reftex is enough.  I then use reftex to cite access the
master bib file.

>> There are tools that use the information in your article .tex 
>> files to create this kind of bibtex file from a larger bibtex 
>> database. 
>
> Yes, emacs via reftex-create-bibtex-file =)

That's wicket cool!

—Rasmus

-- 
Enough with the bla bla!




[O] default headers for source code blocks

2014-09-09 Thread Subhan Michael Tindall
My apologies if this is in TFM, but I can't seem to find it after substantial 
digging.
I'm using a lot of source code blocks lately.
What I'd like is a way to specify a set of default headers to insert when a new 
block is created.
Right now:
C-c C-v d sql RET
#+begin_src sql
#+end_src

What I want is this:
C-c C-v d sql RET
#+begin_src sql  :exports code :tangle yes :comments noweb
#+end_src

Is there a configuration variable I can set for this?  All I can find is refs 
to see source language documentation, but nothing that actually indicates 
if/how to manage it.

Thanks,


Subhan Michael Tindall
Program Analyst - FamilyCare Health Plans
825 NE Multnomah St, Suite 1400; Portland OR 97232
Direct: 503-471-3127
Fax:  503-471-3177
Email:  subh...@familycareinc.org
[Email-Signature-Logos June 20143]


This message is intended for the sole use of the individual and entity to which 
it is addressed and may contain information that is privileged, confidential 
and exempt from disclosure under applicable law. If you are not the intended 
addressee, nor authorized to receive for the intended addressee, you are hereby 
notified that you may not use, copy, disclose or distribute to anyone the 
message or any information contained in the message. If you have received this 
message in error, please immediately advise the sender by reply email and 
delete the message.  Thank you.


Re: [O] Managing articles in orgmode and collaboration

2014-09-09 Thread Jorge A. Alfaro-Murillo
Thomas S. Dye writes: 

I don't manage my bibliography references in Org mode.  I am 
used to managing a bibtex database and have never found the need 
to move everything to Org. 


Same here.

Bibtex mode has functions for automatic reference key 
generation: 

http://www.jonathanleroux.org/bibtex-mode.html#0630 


You can configure this process.


You can also download the .bib from Google Scholar or whatever and 
then clean the entry, so that your database has the same format.


Either a separate bibtex file for each article, or separate 
bibtex files for each co-author.  


Or better do both...

#+BEGIN_SRC latex 
 \bibliography{/home/you/references/articles.bib}

 % \bibliography{/home/collaborator_1/references/articles.bib}
 % \bibliography{/home/collaborator_2/references/articles.bib}
 ...
 \bibliography{references}

#+END_SRC

When a collaborator_i is working on the file she/he comments the 
first line and uncomments the i-th line AND everybody runs 
reftex-create-bibtex-file (or copy paste the new references for 
the unfortunate non-emacs user) after adding new references and 
finishing editing. Everybody shares a current version of the .tex 
file and the references.bib file.


In general, you'll want to have the bibtex file(s) for an 
article only contain the references that you'll use in the 
article, especially if you intend to distribute the bibtex files 
as part of a reproducible research project. 


Note that when the article is ready the references.bib is the only 
thing you need to compile, since it has all the references, so you 
erase the all the other \bibliography's


There are tools that use the information in your article .tex 
files to create this kind of bibtex file from a larger bibtex 
database. 


Yes, emacs via reftex-create-bibtex-file =)

Best,

--
Jorge.




Re: [O] Managing articles in orgmode and collaboration

2014-09-09 Thread Thomas S. Dye
Aloha Christoph,

I don't manage my bibliography references in Org mode.  I am used to
managing a bibtex database and have never found the need to move
everything to Org.

Christoph Groth  writes:

> Most solutions seem to be based around a central BibTeX file and take
> advantage of RefTeX to navigate between citations to articles (in LaTeX
> or org files), the BibTeX file, related entries in an org-file, and
> linked external files.  Often the key that connects the various items is
> a unique label (in LastnameYear format, for example).  This key is used
> as label when citing and in BibTeX, as orgmode CUSTOM_ID, and as the
> filename of an associated external file.

Bibtex mode has functions for automatic reference key generation:

http://www.jonathanleroux.org/bibtex-mode.html#0630

You can configure this process.

> This seems to work well for people who have complete control over the
> articles they write.  But what about articles with co-authors?  These
> must be self-contained, so one needs a separate BibTeX file for each
> article project.  Let’s say that a co-author adds a new reference to a
> common project, but the cited paper is already in my database under a
> different label.  Maybe that very paper is already cited in an older
> article with different co-authors using a different \cite label?

Either a separate bibtex file for each article, or separate bibtex files
for each co-author.  A LaTeX document can use any number of bibtex files
per document.

In general, you'll want to have the bibtex file(s) for an article only
contain the references that you'll use in the article, especially if you
intend to distribute the bibtex files as part of a reproducible research
project. There are tools that use the information in your article .tex
files to create this kind of bibtex file from a larger bibtex database.

In my work flow, I have a large legacy bibtex file with about 6,000
references.  When I'm writing an article, I create another bibtex file
just for the article.  I use ebib to open both the legacy bibtex file
and the article bibtex file and copy from one to the other, which ebib
makes very convenient.  Then I autogenerate the reference key in ebib by
pressing 'K'. 

hth,
Tom

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



[O] bug#18430: 24.4.50; org-mode: File mode specification error: (error "`recenter'ing a window that does not display current-buffer.")

2014-09-09 Thread Glenn Morris
Leo Liu wrote:

> In a recent build of emacs trunk, I constantly getting this error
> whenever I open a .org file. Could this be fixed? Thanks, Leo

See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18401#10






Re: [O] help debugging latex-overlays boxes

2014-09-09 Thread Nick Dokos
John Kitchin  writes:

> Nick Dokos  writes:
>
> I have traced my problem. The issue is in the function
> org-preview-latex-fragment. At the end of the function, where it calls
> org-format-latex, the default-directory variable that is used in the
> function call has a value of
> "c:/Users/YUYUA~1/AppData/Local/Temp/ltxpng/mole-balance"
>
> The YUYUA~1 is causing the problem.
>

My (perhaps naive) expectation would be that "YuYu Yao" would become
"YUYUYA~1", deleting the space, turning the string to upper case,
keeping the first six characters and adding the "~1" suffix. Why is the
last "Y" not there? If it *were* there, would the latex invocation
work?  I believe (quite without any evidence) that it should.

> I do not understand why the full path, "c:/Users/Yuyu
> Yao/AppData/Local/Temp" is not showing up here. When I examine the
> default-directory variable in a buffer in that directory, that is what
> comes up. It is only inside the org function it gets chomped to what
> looks like an old DOS format.
>
> Anyway, latex cannot handle that path, so no dvi is produced, and no
> image.
>
> otherwise the latex file is produced, and it compiles fine with the full
> path. Any ideas on how to fix that? Thanks,
>
>> John Kitchin  writes:
>>
>>> Hi All,
>>>
>>> I am using org-mode in a course this fall with 60 students.  All of them
>>> are using org-mode from elpa. For about 10 of them, they are unable to
>>> toggle the latex-overlays; instead of getting the equations, they get
>>> empty gray boxes with an error that the png file was not created.  Oddly
>>> enough, they can export to PDF just fine. I have also checked that they
>>> have LaTeX (TeXLive) installed, and it appears it is. I am able to
>>> convert tex files to dvi, and then use dvipng to make a png image. But
>>> for some reason, the toggle-latex-overlay function does not work for
>>> them.
>>>
>>> I am at a loss to figure out what the issue is. These are Windows
>>> laptops that were preconfigured by the department. Almost all of them
>>> work fine, except for this small number I cannot figure out.
>>>
>>> Any ideas? Thanks,
>>
>> I would edebug-defun the function org-create-formula-image and step
>> through it to make sure that it goes the way you want (are you sure you
>> are using the dvipng method on these machines? maybe you are using the
>> imagemagick method but the program has not been installed?  Check the
>> value of org-latex-create-formula-image-program).
>>
>> While you are stepping you can also check the variables in the function
>> and see e.g. what the output file name is.
>>
>> If that goes OK, then I would edebug-defun
>> org-create-formula-image-with-dvipng next and check the latex input file
>> it produces. Make sure that things like minted which require
>> --shell-escape are *not* included in that input file: it's processed by
>> a hard-wired call to latex (without --shell-escape) , so minted will
>> cause a failure. If that is the case, check org-latex-packages-alist and
>> make sure that minted's snippet-flag is nil.
>>

--
Nick






Re: [O] latex header lines vs latex block

2014-09-09 Thread Thorsten Jolitz
Sebastien Vauban 
writes:

> See http://lists.gnu.org/archive/html/emacs-orgmode/2014-06/msg00744.html
> for Nicolas' answer on this point:
>
>   ╭
>   │ I suggest to use existing solutions instead: configure
>   │ `org-latex-classes'.
>   ╰


a related question: is this the right format to create the preamble
string:

#+BEGIN_SRC emacs-lisp
'(;; Name
  "obb-article-full-page"
  ;; Preamble
  (concat
   "\\documentclass{article}\n"
   "[DEFAULT-PACKAGES]\n"
   "[PACKAGES]\n"
   "[EXTRA]\n"
   "\\usepackage[cm]{fullpage}\n")
  ;; Sectioning Structure
  ("\\part{%s}" . "\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}") ...)
#+END_SRC

not sure if I need the line-feeds ...

-- 
cheers,
Thorsten




Re: [O] help debugging latex-overlays boxes

2014-09-09 Thread John Kitchin
The issue seems to finally be the value of temporary-file-directory,
which is defined in C-source, and I think that is where the ~1 comes
from. I have a workaround solution, which is to set the
temproary-file-directory variable this way:

(setq temporary-file-directory (expand-file-name "~/../Local/Temp"))

which gives it a full path.

It is pretty odd. There are about 50 students with nominally the same
computers in this class, but this issue seems to only affect about 20%
of them!

John Kitchin  writes:

> Nick Dokos  writes:
>
> I have traced my problem. The issue is in the function
> org-preview-latex-fragment. At the end of the function, where it calls
> org-format-latex, the default-directory variable that is used in the
> function call has a value of
> "c:/Users/YUYUA~1/AppData/Local/Temp/ltxpng/mole-balance"
>
> The YUYUA~1 is causing the problem.
>
> I do not understand why the full path, "c:/Users/Yuyu
> Yao/AppData/Local/Temp" is not showing up here. When I examine the
> default-directory variable in a buffer in that directory, that is what
> comes up. It is only inside the org function it gets chomped to what
> looks like an old DOS format.
>
> Anyway, latex cannot handle that path, so no dvi is produced, and no
> image.
>
> otherwise the latex file is produced, and it compiles fine with the full
> path. Any ideas on how to fix that? Thanks,
>
>> John Kitchin  writes:
>>
>>> Hi All,
>>>
>>> I am using org-mode in a course this fall with 60 students.  All of them
>>> are using org-mode from elpa. For about 10 of them, they are unable to
>>> toggle the latex-overlays; instead of getting the equations, they get
>>> empty gray boxes with an error that the png file was not created.  Oddly
>>> enough, they can export to PDF just fine. I have also checked that they
>>> have LaTeX (TeXLive) installed, and it appears it is. I am able to
>>> convert tex files to dvi, and then use dvipng to make a png image. But
>>> for some reason, the toggle-latex-overlay function does not work for
>>> them.
>>>
>>> I am at a loss to figure out what the issue is. These are Windows
>>> laptops that were preconfigured by the department. Almost all of them
>>> work fine, except for this small number I cannot figure out.
>>>
>>> Any ideas? Thanks,
>>
>> I would edebug-defun the function org-create-formula-image and step
>> through it to make sure that it goes the way you want (are you sure you
>> are using the dvipng method on these machines? maybe you are using the
>> imagemagick method but the program has not been installed?  Check the
>> value of org-latex-create-formula-image-program).
>>
>> While you are stepping you can also check the variables in the function
>> and see e.g. what the output file name is.
>>
>> If that goes OK, then I would edebug-defun
>> org-create-formula-image-with-dvipng next and check the latex input file
>> it produces. Make sure that things like minted which require
>> --shell-escape are *not* included in that input file: it's processed by
>> a hard-wired call to latex (without --shell-escape) , so minted will
>> cause a failure. If that is the case, check org-latex-packages-alist and
>> make sure that minted's snippet-flag is nil.
>>
>> HTH,
>> Nick
>>
>>
>>

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



Re: [O] org-babel and lilypond broken after update

2014-09-09 Thread Achim Gratz
Steven Arntson writes:
> I updated some packages through the package manager, including org and
> org-plus-contrib, and now "M-x ly-" gives "[no match]" in the
> minibuffer. I didn't mess with my .emacs at all, which contains these
> lines:

The prefix has been changed from ly- to org-babel-lilypond- in order to
keep it in the right namespace.

> (setq ly-nix-ly-path "lilypond")

With the next release these variables will go away and the corresponding
settings will become customizable.

> I'm wondering if I put something somewhere that got clobbered when the
> new versions installed in my .emacs.d/elpa folder. Or if the new version
> might have a bug. Thank you, if you have any help for me!

BTW, you should not install both org and org-plus-contrib.  Use the
latter if you need something from contrib, otherwsie use just plain org,
but never both.


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

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] Managing articles in orgmode and collaboration

2014-09-09 Thread Samuel Loury
Vikas Rawal  writes:

> There is bibretrieve (https://github.com/pzorin/bibretrieve) and bibfetch 
> (https://github.com/dschoepe/bibfetch/blob/master/bibfetch.el).
Is it only a result of a google search or did you personally use one of those?

-- 
Konubinix
GPG Key: 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A


pgpkKynkteJEg.pgp
Description: PGP signature


Re: [O] help debugging latex-overlays boxes

2014-09-09 Thread John Kitchin
Nick Dokos  writes:

I have traced my problem. The issue is in the function
org-preview-latex-fragment. At the end of the function, where it calls
org-format-latex, the default-directory variable that is used in the
function call has a value of
"c:/Users/YUYUA~1/AppData/Local/Temp/ltxpng/mole-balance"

The YUYUA~1 is causing the problem.

I do not understand why the full path, "c:/Users/Yuyu
Yao/AppData/Local/Temp" is not showing up here. When I examine the
default-directory variable in a buffer in that directory, that is what
comes up. It is only inside the org function it gets chomped to what
looks like an old DOS format.

Anyway, latex cannot handle that path, so no dvi is produced, and no
image.

otherwise the latex file is produced, and it compiles fine with the full
path. Any ideas on how to fix that? Thanks,

> John Kitchin  writes:
>
>> Hi All,
>>
>> I am using org-mode in a course this fall with 60 students.  All of them
>> are using org-mode from elpa. For about 10 of them, they are unable to
>> toggle the latex-overlays; instead of getting the equations, they get
>> empty gray boxes with an error that the png file was not created.  Oddly
>> enough, they can export to PDF just fine. I have also checked that they
>> have LaTeX (TeXLive) installed, and it appears it is. I am able to
>> convert tex files to dvi, and then use dvipng to make a png image. But
>> for some reason, the toggle-latex-overlay function does not work for
>> them.
>>
>> I am at a loss to figure out what the issue is. These are Windows
>> laptops that were preconfigured by the department. Almost all of them
>> work fine, except for this small number I cannot figure out.
>>
>> Any ideas? Thanks,
>
> I would edebug-defun the function org-create-formula-image and step
> through it to make sure that it goes the way you want (are you sure you
> are using the dvipng method on these machines? maybe you are using the
> imagemagick method but the program has not been installed?  Check the
> value of org-latex-create-formula-image-program).
>
> While you are stepping you can also check the variables in the function
> and see e.g. what the output file name is.
>
> If that goes OK, then I would edebug-defun
> org-create-formula-image-with-dvipng next and check the latex input file
> it produces. Make sure that things like minted which require
> --shell-escape are *not* included in that input file: it's processed by
> a hard-wired call to latex (without --shell-escape) , so minted will
> cause a failure. If that is the case, check org-latex-packages-alist and
> make sure that minted's snippet-flag is nil.
>
> HTH,
> Nick
>
>
>

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



Re: [O] Difference :header-args: and :header-args+:?

2014-09-09 Thread Achim Gratz
Rainer M Krug writes:
> If this is the case, I would opt, in addition to the + operator, to
> have a - operator, which *removes* properties from the property set
> :header-args.

Properties don't work that way, they're just strings.

> Initially I thought, to use :header-args+ instead of :header-args would
> work, but I was wrong (see below).

It's supposed to work, but doesn't due to a bug in the property API.


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

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




Re: [O] Difference :header-args: and :header-args+:?

2014-09-09 Thread Achim Gratz
Aaron Ecay writes:
> Can you say more about the corner cases?

It's been quite some time since I looked at this, but inline calls were
quirky for instance since their point of call is ill-defined.

> As to the non-scalability, that should be fixed by some combination of
> the parser cache and retrieving all properties at once (via
> ‘org-entry-properties’) rather than ‘org-entry-get’-ing them
> one-by-one.

I don't think that will solve the problems.  Note that the new syntax is
dealing with default header args via the property facility just the same
and the only real change is that it makes it possible to separate
different Babel languages as well as defaults for all languages.

> Most computer languages with which I’m familiar (Python, R,
> C, Scheme/Lisp, ...) use lexical scoping by default, and elisp has been
> slowly but steadily moving in that direction for years.  Thus this new
> suggested dynamic-type behavior for header args is surprising to me.

There isn't even an execution model for Babel, so this discussion is
going nowhere. Anyway, the idea was that when you look at a Babel
invocation, you should be able to figure out the default header args at
that point without actually having to trace the execution all the way
down to the last recursion level.  That's also important for caching
since the cache signature for results doesn't take default headers into
account.  If you want to fix header args for certain block you can
already do so by just specifying the header arg directly with the surce
block.  If you absolutely must use properties for this, you can simply
do something like

:var test=(org-entry-get nil "property" 'inherit)

to pick up a property at the site of definition.  But then at least it
is explicit.

> The first demonstration in the attachment (not related to #+calls)
> seems like a much clearer case of deficiency of the new system: an
> inability to inherit different args from different levels.

No, it doesn't demonstrate this.  Try to accumulate something to the
commenr property via comment+ at the lower level and convince yourself it
fails in exactly the same way: only the lowest level is returned as the
value of the property.

That looks like a bug in the property API.  When getting the property it
determines that the property is defined at the lowest level and then
doesn't ascend into the upper ones.  But even the examples in the manual
show that the entry should add to the higher level definition of the
property if the +-variant is used.  The problem is that
org-entry-get-with-inheritance uses org-entry-get (with the inheritance
parameter set to nil), but has no provision to check for the "+" on the
property.

>> /testing/examples/ob-header-arg-defaults.org
>
> I find the content of this file incredibly dense, and the suggestion
> of its use as documentation bordering on a joke.

I wasn't offering it as documentation, only as a means to figure out
what is or isn't supposed to be working.  Plus it does boil down the
whole topic into the smallest possible space.  And if you do that you'll
see that inheritance across multiple levels has not been tested so far
(also not all possible combinations of shadowing), only inheritance
between global and tree properties.

> (Documentation may
> not exist, and that just means an area for improvement has been found.
> But it’s not as though we’re all going to read that file and suddenly
> understand what you mean.)  It looks like it is trying to demonstrate
> inheritance and overriding of :var header args.  I can’t figure out
> why the #+call in “Overwrite” gets go1, but the addition of “var+ to1”
> in “Accumulate” causes this to shift, not to “to1”, but to “ge1”.

The most specific layer is ge1.  While go1 is shadowed by to1 in the
same layer, this is then again shadowed by ge1 (the more specific
layer).  Shadowing only happens in the same layer, which are overlaid
only just before the invocation.  Add :var+: "to3" and remove the
t3="th3" definition to see this in action.

> That is a very confusing interaction (to name just one).  It’s also not
> clear to me how it relates to other header args, since vars supplement
> each other, whereas other types of header replace.

The other header args are treated exactly the same, it's just that
whatever their latest definition "wins" and you never see the other
definitions.  Properties are just strings right until babel interprets
them as header args.  If you print the complete properties as they get
seen by the source block, you'll see this.


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

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] latex header lines vs latex block

2014-09-09 Thread Thorsten Jolitz
Sebastien Vauban 
writes:

> Thorsten Jolitz wrote:
>> Hi List, 
>>
>> I often see many lines like this if Org files:
>>
>> ,
>> | #+LaTeX_CLASS: koma-book
>> | #+LaTeX_HEADER: \usepackage[utf8]{inputenc}
>> | #+LaTeX_HEADER: \usepackage[T1]{fontenc} 
>> | #+LaTeX_HEADER: \usepackage{palatino}
>> | #+LaTeX_HEADER: \bibliographystyle{alpha}
>> | #+LaTeX_HEADER: \bibliography{../bandbook.bib}
>> | #+LaTeX_HEADER: \usepackage{fixltx2e}
>> | #+LaTeX_HEADER: \usepackage{graphicx} [...]
>> `
>>
>> would it be the same to just put a 
>>
>> #+BEGIN_LATEX
>> ... latex-header code ...
>> #+END_LATEX
>>
>> instead of many header lines?
>
> No, that would NOT go in the LaTeX "header" part (that is, the
> preamble).
>
> See http://lists.gnu.org/archive/html/emacs-orgmode/2014-06/msg00744.html
> for Nicolas' answer on this point:
>
>   ╭
>   │ I suggest to use existing solutions instead: configure
>   │ `org-latex-classes'.
>   ╰

good point, thanks for the tip!

-- 
cheers,
Thorsten




Re: [O] Managing articles in orgmode and collaboration

2014-09-09 Thread Thorsten Jolitz
Vikas Rawal  writes:

>> 
>> It shouldn’t be too difficult to write a “capture” function in emacs
>> that turns such records into entries in an org file.  That would be
>> automatic enough for me.
>> 
>
> There is bibretrieve (https://github.com/pzorin/bibretrieve) and
> bibfetch
> (https://github.com/dschoepe/bibfetch/blob/master/bibfetch.el).

cool, can you recommend one of the two?
Just from the repo looks, I would probably go for bibretrieve.

-- 
cheers,
Thorsten




Re: [O] Managing articles in orgmode and collaboration

2014-09-09 Thread Fabrice Popineau
I have written a couple of functions to export the Qiqqa library format to
Org if anybody is interested.
Qiqqa has been much more eager and acute to find online references to all
my pdfs papers.

Fabrice


2014-09-09 14:18 GMT+02:00 Vikas Rawal :

> >
> > It shouldn’t be too difficult to write a “capture” function in emacs
> > that turns such records into entries in an org file.  That would be
> > automatic enough for me.
> >
>
> There is bibretrieve (https://github.com/pzorin/bibretrieve) and bibfetch
> (https://github.com/dschoepe/bibfetch/blob/master/bibfetch.el).
>
> Vikas
>



-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] Managing articles in orgmode and collaboration

2014-09-09 Thread Vikas Rawal
> 
> It shouldn’t be too difficult to write a “capture” function in emacs
> that turns such records into entries in an org file.  That would be
> automatic enough for me.
> 

There is bibretrieve (https://github.com/pzorin/bibretrieve) and bibfetch 
(https://github.com/dschoepe/bibfetch/blob/master/bibfetch.el).

Vikas


Re: [O] [PATCH] org-table-beginning/end-of-field

2014-09-09 Thread Florian Beck
Hi Nicolas,

thanks for the review. I hope the new version is an improvement.

Nicolas Goaziou  writes:

> Also, note that you can avoid requiring MOVE-FN, ELEMENT and CMP-FN if
> you decide that
>
>   (< n 0)  => (#'org-table-next-field :contents-end #'<=)
>   (> n 0)  => (#'org-table-previous-fierd :contents-begin #'>=)
>
> Up to you.

I wanted to use the n=0 case to supress the conditional movement to the
next field. It's probably not worth it and I removed it. Now everything
simplifies to one function.

> IOW, you need to let-bind (org-element-context) and find the first
> `table', `table-row' or `table-cell' object/element among it and its
> parents. Then
>
>   - if no such ancestor is found: return an error (not at a table)
>
>   - if `table' is found but point is not within
> [:contents-begin :contents-end[ interval, return an error (not
> inside the table)
>
>   - if `table' or `table-row' is found, you need to apply
> org-table/previous/next/-field once (and diminish N by one) to make
> sure point will be left on a regular cell, if possible.

But as long as I have a table cell ancestor, I should be fine. Am I
missing something? I added a function `org-element-get' to help with
that. What do you think? (If `cl-labels' is a no-go, we could split out
a helper function.)

> Thank you for taking care of this. There are bonus points if you can
> write tests along with this change.

I added a couple of tests. Not really succinct, though.

Also, I modified `org-element-table-cell-parser', because otherwise
:contents-begin and :contents-end point to the end of the cell. Not sure
if this breaks anything.

-- 
Florian Beck


>From 2b1a63e70830e7604c7f59dd0110aedf3a9c1e53 Mon Sep 17 00:00:00 2001
From: Florian Beck 
Date: Tue, 9 Sep 2014 12:29:53 +0200
Subject: [PATCH 1/4] org-element: Adjust content boundaries in empty cells

* lisp/org-element.el (org-element-table-cell-parser): Let
:contents-begin and :contents-end point to the beginning
of an empty table cell.
---
 lisp/org-element.el | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index f175fbc..47fa3f1 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -,12 +,15 @@ and `:post-blank' keywords."
   (let* ((begin (match-beginning 0))
 	 (end (match-end 0))
 	 (contents-begin (match-beginning 1))
-	 (contents-end (match-end 1)))
+	 (contents-end (match-end 1))
+	 ;; Avoid having the contents at the end of an empty cell.
+	 (empty-pos (when (= contents-begin contents-end)
+		  (min (1+ begin) end
 (list 'table-cell
 	  (list :begin begin
 		:end end
-		:contents-begin contents-begin
-		:contents-end contents-end
+		:contents-begin (or empty-pos contents-begin)
+		:contents-end (or empty-pos contents-end)
 		:post-blank 0
 
 (defun org-element-table-cell-interpreter (table-cell contents)
-- 
1.9.1

>From 10f68bf26f82f4cbc0e097bac9a4d3b997c10bc4 Mon Sep 17 00:00:00 2001
From: Florian Beck 
Date: Tue, 9 Sep 2014 12:31:35 +0200
Subject: [PATCH 2/4] org-element: Implement `org-element-get'

* lisp/org-element.el (org-element-get): New function.
---
 lisp/org-element.el | 20 
 1 file changed, 20 insertions(+)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 47fa3f1..f55dd37 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -5873,6 +5873,26 @@ Providing it allows for quicker computation."
 	   ;; Store results in cache, if applicable.
 	   (org-element--cache-put element cache)))
 
+(defun org-element-get (&optional type pom)
+  "Return the nearest object or element of TYPE at POM."
+  (let* ((pom (or pom (point)))
+	 (context (with-current-buffer (if (markerp pom)
+	   (marker-buffer pom)
+	 (current-buffer))
+		(save-excursion
+		  (goto-char pom)
+		  (org-element-context)
+(cl-labels ((get-type (type context)
+			  (cond ((not context) nil)
+((not type) context)
+((eql type (car context))
+ context)
+(t (get-type type
+	 (plist-get
+	  (cadr context)
+	  :parent))
+  (get-type type context
+
 (defun org-element-nested-p (elem-A elem-B)
   "Non-nil when elements ELEM-A and ELEM-B are nested."
   (let ((beg-A (org-element-property :begin elem-A))
-- 
1.9.1

>From 64f937fe289e7aca41471ec731aec1590bebe947 Mon Sep 17 00:00:00 2001
From: Florian Beck 
Date: Tue, 9 Sep 2014 12:35:09 +0200
Subject: [PATCH 3/4] org-table: Handle optional arguments and cleanup

* lisp/org-table.el (org-table-beginning-of-field): Fix
docstring. Call `org-table-end-of-field'.
(org-table-end-of-field): Fix docstring.  Handle missing and
negative args.
---
 lisp/org-table.el | 60 +++
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 547f933..290cdce 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -1062,36 +1062,44 @@ Before do

Re: [O] Managing articles in orgmode and collaboration

2014-09-09 Thread Christoph Groth
Thorsten Jolitz wrote:

> do you have a function that automatically fetches bibtex entries for
> books from the web, given some info (title, year, author or so)?

I haven’t yet started to manage literature with org mode, so I do not
have anything so far.

It’s usually easy to find BibTeX records on the web.  For books and
articles in my field (physics) google scholar works quite fine.  For
articles only, arXiv offers powerful search capabilities.

It shouldn’t be too difficult to write a “capture” function in emacs
that turns such records into entries in an org file.  That would be
automatic enough for me.




Re: [O] latex header lines vs latex block

2014-09-09 Thread Sebastien Vauban
Thorsten Jolitz wrote:
> Hi List, 
>
> I often see many lines like this if Org files:
>
> ,
> | #+LaTeX_CLASS: koma-book
> | #+LaTeX_HEADER: \usepackage[utf8]{inputenc}
> | #+LaTeX_HEADER: \usepackage[T1]{fontenc} 
> | #+LaTeX_HEADER: \usepackage{palatino}
> | #+LaTeX_HEADER: \bibliographystyle{alpha}
> | #+LaTeX_HEADER: \bibliography{../bandbook.bib}
> | #+LaTeX_HEADER: \usepackage{fixltx2e}
> | #+LaTeX_HEADER: \usepackage{graphicx} [...]
> `
>
> would it be the same to just put a 
>
> #+BEGIN_LATEX
> ... latex-header code ...
> #+END_LATEX
>
> instead of many header lines?

No, that would NOT go in the LaTeX "header" part (that is, the
preamble).

See http://lists.gnu.org/archive/html/emacs-orgmode/2014-06/msg00744.html
for Nicolas' answer on this point:

  ╭
  │ I suggest to use existing solutions instead: configure
  │ `org-latex-classes'.
  ╰

Best regards,
  Seb

-- 
Sebastien Vauban




[O] latex header lines vs latex block

2014-09-09 Thread Thorsten Jolitz

Hi List, 

I often see many lines like this if Org files:

,
| #+LaTeX_CLASS: koma-book
| #+LaTeX_HEADER: \usepackage[utf8]{inputenc}
| #+LaTeX_HEADER: \usepackage[T1]{fontenc} 
| #+LaTeX_HEADER: \usepackage{palatino}
| #+LaTeX_HEADER: \bibliographystyle{alpha}
| #+LaTeX_HEADER: \bibliography{../bandbook.bib}
| #+LaTeX_HEADER: \usepackage{fixltx2e}
| #+LaTeX_HEADER: \usepackage{graphicx} [...]
`

would it be the same to just put a 

#+BEGIN_LATEX
... latex-header code ...
#+END_LATEX

instead of many header lines?

-- 
cheers,
Thorsten





Re: [O] Managing articles in orgmode and collaboration

2014-09-09 Thread Thorsten Jolitz
Christoph Groth  writes:

Hi,

> Any comments?

do you have a function that automatically fetches bibtex entries for
books from the web, given some info (title, year, author or so)?

-- 
cheers,
Thorsten




[O] Missing Agenda Export in ICS

2014-09-09 Thread SabreWolfy
I'm using Org-mode 8.2.7c. I exported my Agenda with "C-x C-w" and specified
an ICS file, which I then imported into Google Calendar. Many events
appeared, but some did not. An example of one, which did not appear, was a
standard timestamp event, where other "standard" ones also appeared. What
are the reasons that an item would not export?

--
* Diary
** Entry does not work
<2014-09-15 Mon 18:00-20:00>
-

This entry does not appear in the export. Other similar ones do appear.




Re: [O] Managing articles in orgmode and collaboration

2014-09-09 Thread Christoph Groth

Hi again,

I’m replying to myself, as I think I’ve found a possible solution 
to my

problem.

Most publications have some kind of unique ID that can be present 
in
BibTeX: a DOI number, a ISBN, a preprint ID, or an URL.  One could 
use

one these fields as an org-id unique ID for the publication’s
org-mode-entry.  (If several such fields are present, priorities 
could

be used to choose one.)  Then, org-id can be used to find article
entries by unique ID.

This way, even if a reference has been added to a project-specific
.bib-file by a collaborator (with some label of his choice), it 
should
be possible to find the relevant org-mode-entry if the paper is 
already
anywhere in the library.  In the worst case, a missing DOI id will 
have

to be added to the .bib-file-entry.

The org entry on the article would contain links and notes.  The 
BibTeX

data could be kept in a :BIBTEX: drawer.

Any comments?

Christoph




Re: [O] [BUG] Entries from Org code blocks appear in agenda

2014-09-09 Thread Francesco Pizzolante


Hi Nicolas,

>> I noticed that entries from Org code blocks are erroneously displayed in
>> the agenda.
>>
>> Here's a very simple Org example in order to reproduce it
>> (my-simple-test.org):
>>
>> * Test
>>
>> #+BEGIN_SRC org ,SCHEDULED: <2014-09-04 Thu 10:00> #+END_SRC
>
> This is a known bug that would require to use the parser in
> "org-agenda.el" for a proper fix.
>
> Meanwhile, I wrote a workaround. Would you mind testing it (note: it
> applies on maint, probably not on master without conflicts).

Thanks for the patch.

I just applied and tested it on org-plus-contrib-20140908 from Elpa but
the workaround does not work as I can still see the erroneous headings
appearing in the agenda.

Regards,
 Francesco




Re: [O] Difference :header-args: and :header-args+:?

2014-09-09 Thread Rainer M Krug
Aaron Ecay  writes:

> Hi Achim,
>
> 2014ko irailak 8an, Achim Gratz-ek idatzi zuen:
>> 
>> Aaron Ecay writes:
>>> Eric Schulte has said 
>>> that the deprecation of this feature is “premature”.  I didn’t realize
>>> at the time that the deprecation was also included in the manual rather
>>> than just a code comment.  Possibly it should be un-deprecated.
>> 
>> It shouldn't, owing to a number of essentially un-fixable corner cases
>> and its inherent non-scaleability.

I think that one main confusion comes fro the fact that by the new
syntax, the previous properties in the header arguments have been
demoted to sub-properties of the real property :header-args. So all
operations on :header-args are operations on a *set of properties*. If
this is the case, I would opt, in addition to the + operator, to have
a - operator, which *removes* properties from the property set
:header-args.

I would actually call the + an "operation on an already defined
property" and it should give an error message if the property is not set
yet.

So we have a property setter (:header-args) and property operators
(header-args+) as well as (hopefully) :header-args-. By using this
terminology, and that the property operators can only be called when the
property has already been defined (which it usually is due to default
values), the usage should be clearer.

The same should apply to the :var as it also contains a set of entities.

>
> Can you say more about the corner cases?  I looked for discussion on the
> mailing list around the time your changes were introduced.  I only found
> a message  (in a
> thread about how/where #+call lines insert their results) that treats
> the change as a fait accompli, (“I agree that this didn't make all that
> much sense in the past, but with property evaluation and elisp argument
> evaluation now anchored to the point of call [...]”)
>
> I could have missed something, of course.
>
> As to the non-scalability, that should be fixed by some combination of
> the parser cache and retrieving all properties at once (via
> ‘org-entry-properties’) rather than ‘org-entry-get’-ing them one-by-one.
> There are a couple recent threads about this.  Here’s one
>  about a reimplementation
> of the property API functions in terms of the parser.  Here
> 
> the speed tradeoffs of the two approaches are discussed.  (IOW, as
> presently implemented the classical method is not scalable, but said
> unscalability is by no means “inherent”.)
>
>> 
>>> Certainly I agree that the suggested replacement is less capable.
>> 
>> Do you have an example of something that it cannot do (modulo the bugs
>> and corners of the deprecated syntax)?
>
> See the attached file for two examples, one related to #+call lines and
> one not.
>
> Again, can you say more about what you mean by the bugs and corners of
> the deprecated syntax?  The #+call behavior doesn’t seem like a bug, but
> basically a difference in whether header args are dynamically (wrt point
> of call) or lexically (wrt point of definition) scoped.  Dynamic
> vs. lexical scoping is not a bug, but a matter of taste/language
> design/etc.  Most computer languages with which I’m familiar (Python, R,
> C, Scheme/Lisp, ...) use lexical scoping by default, and elisp has been
> slowly but steadily moving in that direction for years.  Thus this new
> suggested dynamic-type behavior for header args is surprising to me.
>
> The first demonstration in the attachment (not related to #+calls)
> seems like a much clearer case of deficiency of the new system: an
> inability to inherit different args from different levels.  (Please
> factor away from the nonsense strings in place of “yes” and “no” – I
> wanted to make it clear where each value was coming from, and assure
> that they were not being generated by default.  Of course in a real use
> case the values for these header args would be “yes” and “no”.  Also,
> one could also demonstrate the problem with header args that can take
> an arbitrary string value by design, like :session.)

Initially I thought, to use :header-args+ instead of :header-args would
work, but I was wrong (see below).

,
| *** Subtree
| :PROPERTIES:
| :header-args+: :cache quux
| :END:
| 
| *PROBLEM*: we don’t get =:comments foo= from parent headline (“The new way”)
| 
| #+begin_src emacs-lisp
| (awe-show-headers :cache :comments)
| #+end_src
| 
| #+RESULTS:
| : ((:comments . "")
| :  (:cache . "quux no"))
`

I guess one problem that the properties in :header-args are evaluated
From left to right, and if one is found, this one is used? In case of
inheritance (and adding a property via :header-args+) appends it, and if
a same one exists before, the older one is used?

>
> From your other mail:
>
> 2014ko irailak 8an, Achim Grat

Re: [O] org-babel and lilypond broken after update

2014-09-09 Thread Thorsten Jolitz
Steven Arntson  writes:

> 

have a look there for my answer

-- 
cheers,
Thorsten




Re: [O] Difference :header-args: and :header-args+:?

2014-09-09 Thread Rainer M Krug
Sorry about some points - see corrections below:

Rainer M Krug  writes:

> Achim Gratz  writes:
>
>> Aaron Ecay writes:
>>> Eric Schulte has said 
>>> that the deprecation of this feature is “premature”.  I didn’t realize
>>> at the time that the deprecation was also included in the manual rather
>>> than just a code comment.  Possibly it should be un-deprecated.
>>
>> It shouldn't, owing to a number of essentially un-fixable corner cases
>> and its inherent non-scaleability.
>>
>>> Certainly I agree that the suggested replacement is less capable.
>>
>> Do you have an example of something that it cannot do (modulo the bugs
>> and corners of the deprecated syntax)?
>
> I agree with Achim, that the new header-args should be able to do the
> same as the old syntax, but I also think that it is more "clunky" and
> less easy to grasp how to do things.
>
> And the problem are 
>
> a) the different ways that properties can be set (system wide, file
> wide, subtree level, code block - I might have forgotten some),
>
> b) the different levels and
>
> d) the inheritance rules of these levels (I assume inheritance is only
> in subtrees and code blocks in the subtree? How do file wide and system
> wide properties play here? (7.4. Property Inheritance, I am confused about the
> system wide and file wide properties?


d) the inheritance rules of these levels - In the manual it says it is
off (7.4 Property Inheritance):

,
| Org mode does not turn this on by default, because it can slow down
| property searches significantly and is often not needed.  However, if
| you find inheritance useful, you can turn it on by setting the variable
| `org-use-property-inheritance'.
`

But based on my experience it is on? Also in the examples it is on?
Especially the inheritance with the combination of the + is confusing
to me. If inheritance is on, the + should add an argument to the
header-args property, while without the +, it should overwrite the
inherited property? Or do they do the same?


>
> I know that this information is likely somewhere in the manual, but this
> whole issue of properties (especially when including the +) becomes
> rather confusing to me.
>
> Rainer
>
>>
>>
>> Regards,
>> Achim.

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

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

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

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

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


pgpcEGUlQHUML.pgp
Description: PGP signature


Re: [O] Difference :header-args: and :header-args+:?

2014-09-09 Thread Rainer M Krug
Achim Gratz  writes:

> Aaron Ecay writes:
>> Eric Schulte has said 
>> that the deprecation of this feature is “premature”.  I didn’t realize
>> at the time that the deprecation was also included in the manual rather
>> than just a code comment.  Possibly it should be un-deprecated.
>
> It shouldn't, owing to a number of essentially un-fixable corner cases
> and its inherent non-scaleability.
>
>> Certainly I agree that the suggested replacement is less capable.
>
> Do you have an example of something that it cannot do (modulo the bugs
> and corners of the deprecated syntax)?

I agree with Achim, that the new header-args should be able to do the
same as the old syntax, but I also think that it is more "clunky" and
less easy to grasp how to do things.

And the problem are 

a) the different ways that properties can be set (system wide, file
wide, subtree level, code block - I might have forgotten some),

b) the different levels and

d) the inheritance rules of these levels (I assume inheritance is only
in subtrees and code blocks in the subtree? How do file wide and system
wide properties play here? (7.4. Property Inheritance, I am confused about the
system wide and file wide properties?

I know that this information is likely somewhere in the manual, but this
whole issue of properties (especially when including the +) becomes
rather confusing to me.

Rainer

>
>
> Regards,
> Achim.

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpo1uC5z05Rx.pgp
Description: PGP signature


[O] org-babel and lilypond broken after update

2014-09-09 Thread Steven Arntson


I'm an enthusiastic and error-prone new user of emacs (24.3.1) and
org-babel (org 8.2.7c). I've been using lilypond mode in the context of
org-mode documents, using the command "ly-tangle" to typeset music into
midi and pdf files. It's been working great for the past few weeks,
until today ...

I updated some packages through the package manager, including org and
org-plus-contrib, and now "M-x ly-" gives "[no match]" in the
minibuffer. I didn't mess with my .emacs at all, which contains these
lines:

;;  lilypond 
(autoload 'LilyPond-mode "lilypond-mode")
(org-babel-do-load-languages
  'org-babel-load-languages
  '(
(emacs-lisp . t)
(sh t)
(org t)
(latex . t)
(lilypond t)))

(setq ly-arrange-mode t)
(setq ly-nix-ly-path "lilypond")

I'm wondering if I put something somewhere that got clobbered when the
new versions installed in my .emacs.d/elpa folder. Or if the new version
might have a bug. Thank you, if you have any help for me!

-Steven