[O] Citation syntax and ODT

2015-02-21 Thread Vaidheeswaran


Those working on the citation syntax should make it clear that the
"lowest common" cite syntax does NOT also IMPOSE (or GUARANTEE) a
specific style on the produced document.

When I say this, I specifically mean:

1. I want my citation and references to be carried over FAITHFULLY to
   the exported document.

2. I DON'T CARE how (1) is styled.



The above observations would translate to:

The Cite object in it's SIMPLEST form specifies just a citekey (or a
set of citekeys). The Cite-object is qualified with a footnote saying
that any key-value pair -- including "type" -- that is specified with
Cite object MAY BE IGNORED by a backend.



Note that I am not speaking against Bells and Whistles.  I am only
saying that Bells and Whistles MUST NOT be imposed upon a backend like
ODT where the available tools are NOT AS RICH OR AS MATURE AS that
available with other backends like HTML or LaTeX.



A simple search of this discussion list suggests that there already
exists ODT/JabRef implementation.  I hope those who are working on the
syntax also study the EXISTING IMPLEMENTATION and HAVE THAT
IMPLEMENTATION INFORM THE ENTERPRISE.

If someone puts up a draft that (re)-captures the state-of-the-art, I
am willing to do the homework of whetting the spec. against existing
IMPLEMENTATION.





Re: [O] [ANN] org-link-edit.el --- Slurp and barf with Org links

2015-02-21 Thread Thomas S. Dye
Kyle Meyer  writes:

> As I mention in the package commentary, I think this works well with
> Oleh Krehel's excellent Hydra [2] because it allows you to repeat any of
> these commands with a single key after the initial key sequence to
> invoke the popup.

Brilliant!  Hydra is a real find.

Thanks,
Tom

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



Re: [O] Citation syntax: a revised proposal

2015-02-21 Thread Samuel Wales
hi richard,

indeed i am not proposing changing any existing syntax.


samuel



Re: [O] Citation syntax: a revised proposal

2015-02-21 Thread Samuel Wales
hi rasmus!

thanks for your comments.

we are definitely not communicating about the same things.
i do not even understand what you think i am proposing.  :)
if you get a chance to re-read my old posts on the subject,
i think it might help?


samuel



Re: [O] Org mode for the new guy.

2015-02-21 Thread Thierry Banel
Cool!
You may share on the Worg site.
Look here for easy instructions:
  http://orgmode.org/worg/worg-about.html


Le 21/02/2015 04:31, Garrett Fuller a écrit :
> I am still learning how to use emacs. When I was learned about org
> mode, I was really excited. I found it very difficult to extract the
> basic usage of org mode from the resources available on the website.
> The resources available are both plentiful and VERY thorough, but all
> I wanted was a rundown of basic use commands so I could play with it
> and get comfortable.
>
> I eventually got there, and wrote myself a little ,org cheat sheet of
> controls and commands. I wanted to share what I worked out with other
> beginners somehow, but I have absolutely no idea how to go about that.
>
> So, I figured I would share it with you guys. Maybe you can make it
> available for beginners? 
>
> Org mode is cooler than sliced bread, btw. Love it. I am now taking
> notes in all of my classes with it. Thanks alot!
>
> -- 
> The more I learn, the more I know I don't know.
> Garrett Fuller




Re: [O] How to insert a link in an Org buffer programmatically?

2015-02-21 Thread Kyle Meyer
Marcin Borkowski  wrote:
> Hello fellow Orgers,
>
> I'd like to insert a link (say, at point), given its description and the
> text of the link itself, from Elisp code.  Is there any function to do
> this?  I mean, some escaping might be needed, right?

`(insert (org-make-link-string LINK DESCRIPTION))' should do what you
want.

-- 
Kyle



[O] Question about logreschedule

2015-02-21 Thread Yuri Niyazov
In org-mode it is possible to log rescheduling information about an
item by setting org-log-reschedule to 'time; this results in lines
like "- Rescheduled from "2015-01-29 Thu" on [2015-02-10 Tue 20:45]"
entered into the Logbook.

I am trying to build some performance measurement tools; the general
architecture of these tools would be that I would convert agenda
information to CSV using
http://orgmode.org/manual/Extracting-agenda-information.html then
import the CSVs into a database and then work with the database. One
of the pieces of information that I would really like to include in
the database (and thus in the CSV, and thus in the agenda) is the
rescheduling information. Now, the Log view in Agenda parses lines
like "- State "DONE"   from "TODO"   [2015-01-27 Tue 23:15]"
in the LOGBOOK drawer and includes them in the agenda, but I haven't
seen it do anything with the "Rescheduled from %s to %s" lines.

How can I get the rescheduled lines into the agenda and then into a csv?

Thanks!



[O] How to insert a link in an Org buffer programmatically?

2015-02-21 Thread Marcin Borkowski
Hello fellow Orgers,

I'd like to insert a link (say, at point), given its description and the
text of the link itself, from Elisp code.  Is there any function to do
this?  I mean, some escaping might be needed, right?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] Warning about section named "Footnotes"

2015-02-21 Thread Nicolas Goaziou
Hello,

Arni Magnusson  writes:

> Attached is the formatted patch. I think my email client mangled it
> last time, as I pasted it inside the email body.

Applied, with a small removal (last part of the sentence, which I found
unnecessary).

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Org mode for the new guy.

2015-02-21 Thread Richard Lawrence
Garrett Fuller  writes:

> I am still learning how to use emacs. When I was learned about org mode, I
> was really excited. I found it very difficult to extract the basic usage of
> org mode from the resources available on the website. The resources
> available are both plentiful and VERY thorough, but all I wanted was a
> rundown of basic use commands so I could play with it and get comfortable.
>
> I eventually got there, and wrote myself a little ,org cheat sheet of
> controls and commands. I wanted to share what I worked out with other
> beginners somehow, but I have absolutely no idea how to go about that.
>
> So, I figured I would share it with you guys. Maybe you can make it
> available for beginners?

Cool, thanks!  I've been using Org for years now and I didn't even know
about C-x n s and C-x n w.  Thanks for sharing.

Best,
Richard




Re: [O] Citation syntax: a revised proposal

2015-02-21 Thread Thomas S. Dye
Rasmus  writes:

>  What Org desperately needs in terms of
> reproducible, scientific writing is a rigorous, standard syntax.

IMHO, the citation syntax discussion is more about making citations work
correctly in the various backends and less about reproducible documents.
Babel was a key development for reproducible documents.  With babel,
"non-standard" functions could be stuffed in a noexport section, made
buffer local with Emacs local variables, and distributed so others can
reproduce the document.

This model has a certain beauty.  A community of scholars can share
reproducible documents and concentrate on the content without having to
agree upon and use a standard syntax for document preparation.

Or, a sub-community of scholars, like the Kitchin research group, can
adopt a package built on top of extensible syntax, then distribute their
work in reproducible form to scholars in the larger community.

At any rate, I'm just reacting to "desperately needs" and "rigorous,
standard".

I think Samuel's ideas on extensible syntax are compatible with
reproducible scientific writing.

All the best,
Tom

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



Re: [O] Bug: Drawers question [8.2.10 (8.2.10-30-gca21b7-elpa @ c:/USR/FJM/APP/.emacs.d/elpa/org-20150126/)]

2015-02-21 Thread Nicolas Goaziou
Hello,

"Francis J. Monari, Esquire"  writes:

> Questions about Drawers:
> * Is it wise to have drawers with duplicate names under the same
> heading?

I don't see any problem with this.

> * I have noticed that in some respects list items identified by “- [ ] "
> are second class citizens (they have some aspects of headings, but not
> all).  Is it wise or recommended (in terms of the the development of org
> mode) to place draws under these list items?

Syntax allows drawers within lists.

> * Is it possible to specify a “canonical” order for drawers?
> e.g. PROPERTIES first, LOGBOOK second, etc.

PROPERTIES always comes first, i.e., it will be invalid for a LOGBOOK to
appear before PROPERTIES in Org 8.3.

> When org mode changes the file (I have noticed this with adding notes to
> the LOGBOOK drawer), sometimes the LOGBOOK drawer “jumps” ahead of the
> PROPERTIES drawer.

> * Sometimes, when org mode changes the file (I have not noticed a
> pattern), spaces are added after the “:END:” for the drawer.  Is this
> normal or expected?

These points are fixed in Org development branch.


Regards,

-- 
Nicolas Goaziou



Re: [O] Warning about section named "Footnotes"

2015-02-21 Thread Arni Magnusson

Dear Nicolas,

Attached is the formatted patch. I think my email client mangled it last 
time, as I pasted it inside the email body.


Best regards,

Arni



On Tue, 9 Dec 2014, Nicolas Goaziou wrote:

I have revised the paragraph following your suggestion, and prepared 
the patch using the 'git format-patch' command. See below.


Thank you. However, I'm unable to apply it. Could you try to update Org 
first and send it again as an attachment?


Also, you need to specify the node modified in the commit message.


In the past, I have signed FSF papers for Emacs and Texinfo 
contributions. Does that cover this contribution as well? If not, I'm 
happy with the TINYCHANGE stamp.


The stamp is not needed, then.
From 72bda40525eed23941046694382814e3d04d9b97 Mon Sep 17 00:00:00 2001
From: Arni Magnusson 
Date: Sat, 21 Feb 2015 16:08:43 +
Subject: [PATCH] Add documentation regarding reserved keywords in @node
 Headlines

---
 doc/org.texi  | 8 +++-
 doc/orgguide.texi | 6 +-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index bec46a9..8c7e3c3 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -1208,7 +1208,13 @@ headings indented less than 30 stars.}.  For example:
 * Another top level headline
 @end example
 
-@noindent Some people find the many stars too noisy and would prefer an
+@vindex org-footnote-section
+@noindent Note that a headline named after @code{org-footnote-section},
+which defaults to @samp{Footnotes}, is considered as special.  A subtree
+with this headline will be silently ignored by exporting functions,
+unless the value of @code{org-footnote-section} is modified.
+
+Some people find the many stars too noisy and would prefer an
 outline that has whitespace followed by a single star as headline
 starters.  @ref{Clean view}, describes a setup to realize this.
 
diff --git a/doc/orgguide.texi b/doc/orgguide.texi
index e32fa7c..7308d32 100644
--- a/doc/orgguide.texi
+++ b/doc/orgguide.texi
@@ -345,7 +345,11 @@ of @kbd{C-a} and @kbd{C-e} in headlines.}.  For example:
 * Another top level headline
 @end smallexample
 
-@noindent 
+@noindent Note that a headline named after @code{org-footnote-section},
+which defaults to @samp{Footnotes}, is considered as special.  A subtree
+with this headline will be silently ignored by exporting functions,
+unless the value of @code{org-footnote-section} is modified.
+
 Some people find the many stars too noisy and would prefer an
 outline that has whitespace followed by a single star as headline
 starters.  @ref{Clean view}, describes a setup to realize this.
-- 
1.8.3.1



Re: [O] Org mode for the new guy.

2015-02-21 Thread Steinar Bang
I also wrote my own howto a while back (centered around what I was using
t the time):
 http://steinar.bang.priv.no/2012/05/02/using-org-mode/




[O] Bug: Drawers question [8.2.10 (8.2.10-30-gca21b7-elpa @ c:/USR/FJM/APP/.emacs.d/elpa/org-20150126/)]

2015-02-21 Thread Francis J. Monari, Esquire

To: emacs-orgmode@gnu.org
Subject: Bug: Drawers question [8.2.10 (8.2.10-30-gca21b7-elpa @ 
c:/USR/FJM/APP/.emacs.d/elpa/org-20150126/)]

From: monarif...@verizon.net (F. J. Monari)
--text follows this line--
The following questions are not bugs, but more policy / file structure
questions that arisen during my use of org mode.  I have not seen these
topics specifically address in the online manual or on the web.  To my
mind they are all part and parcel of properly structuring my file.  If
you need the questions broken out or restated, I can do that as well.


Questions about Drawers:
* Is it wise to have drawers with duplicate names under the same
heading?
e.g. several “:NOTEBOOK:” drawers that reflect notes taken from different
perspectives of the topic specified in the heading.
* I have noticed that in some respects list items identified by “- [ ] "
are second class citizens (they have some aspects of headings, but not
all).  Is it wise or recommended (in terms of the the development of org
mode) to place draws under these list items?
* Is it possible to specify a “canonical” order for drawers?
e.g. PROPERTIES first, LOGBOOK second, etc.
When org mode changes the file (I have noticed this with adding notes to
the LOGBOOK drawer), sometimes the LOGBOOK drawer “jumps” ahead of the
PROPERTIES drawer.
* Sometimes, when org mode changes the file (I have not noticed a
pattern), spaces are added after the “:END:” for the drawer.  Is this
normal or expected?

Personal information has been redacted from all the attached or included
files.

Thank you.

Frank.


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

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


Emacs  : GNU Emacs 24.4.1 (i686-pc-mingw32)
 of 2014-10-24 on LEG570
Package: Org-mode version 8.2.10 (8.2.10-30-gca21b7-elpa @ 
c:/USR/FJM/APP/.emacs.d/elpa/org-20150126/)


current state:
==
(setq
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)

 org-src-fontify-natively t
 org-reverse-note-order t
 org-agenda-skip-scheduled-if-done t
 org-agenda-window-setup 'current-window
 org-tags-match-list-sublevels 'indented
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe

  org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-agenda-exporter-settings '((org-agenda-with-colors nil) 
(ps-print-color-p t)

(ps-landscape-mode t) (ps-number-of-columns 1)
(ps-paper-type (quote legal)) (ps-print-header 
t)
(htmlize-output-type (quote css)))
 org-refile-targets '((nil :level . 3) (org-agenda-files :maxlevel . 3))
 org-modules '(org-checklist org-crypt org-contacts org-docview 
org-expiry org-gnus

   org-habit org-id org-info org-mouse org-protocol)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-agenda-custom-commands '(("lm" "Matters"
   ((agenda ""
 ((org-agenda-files
   (quote

("C:/ESQ/FIRM/USR/ESQ/FJM/DAT/DBF/ORG/fjm-esq-emacs.org")
)
   )
  )
 )
(alltodo ""
 ((org-agenda-files
   (quote

("C:/ESQ/FIRM/USR/ESQ/FJM/DAT/DBF/ORG/fjm-esq-emacs.org")
)
   )
  )
 )
)
   nil nil)
  ("z" "Hierarchical" agenda ""
   ((org-show-entry-below t)
(org-show-hierarchy-above t)
(org-show-following-heading t))
   )
  ("n" "Agenda and all TODO's"
   ((agenda "" nil) (alltodo "" nil)) nil)
  )
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-show-following-heading '((default . t))
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org

Re: [O] Org mode for the new guy.

2015-02-21 Thread Tory S. Anderson
I think you might like the orgmode reference cards (pick your format):

http://orgmode.org/worg/orgcard.html
http://orgmode.org/orgcard.pdf
http://orgmode.org/orgcard.txt

 You might also be interested in my screencast/blog series, 
"NOn-Programmer's Emacs"
https://www.youtube.com/watch?v=Q8AqHdZTgNI&index=1&list=PLGSBMyq5kLRZOPH4GlMqwskuyQ8AHmUwL

Welcome to Emacs for study; for university, I've lived on it.
- Tory

Garrett Fuller  writes:

> I am still learning how to use emacs. When I was learned about org
> mode, I was really excited. I found it very difficult to extract the
> basic usage of org mode from the resources available on the website.
> The resources available are both plentiful and VERY thorough, but all
> I wanted was a rundown of basic use commands so I could play with it
> and get comfortable.
>
> I eventually got there, and wrote myself a little ,org cheat sheet of
> controls and commands. I wanted to share what I worked out with other
> beginners somehow, but I have absolutely no idea how to go about
> that.
>
> So, I figured I would share it with you guys. Maybe you can make it
> available for beginners? 
>
> Org mode is cooler than sliced bread, btw. Love it. I am now taking
> notes in all of my classes with it. Thanks alot!
>
> --
> The more I learn, the more I know I don't know.
> Garrett Fuller



Re: [O] Org mode for the new guy.

2015-02-21 Thread Gour
Garrett Fuller  writes:

> So, I figured I would share it with you guys. Maybe you can make it
> available for beginners?

I find the Compact guide pretty nice: http://orgmode.org/guide/


Sincerely,
Gour

-- 
Whatever action a great man performs, common men follow. And 
whatever standards he sets by exemplary acts, all the world pursues.





Re: [O] [ox, patch] external compilation

2015-02-21 Thread Rasmus
Nicolas Goaziou  writes:

> Rasmus  writes:
>
>> That's more or less what I do cf. the first post, namely
>>
>> # Local Variables:
>> # eval:  (unless noninteractive (load-file "org-conf.el"))
>> # End:
>>
>> [Which gives me the annoying prompt].
>
> The solution I gave you doesn't prompt anything.

You are right.  So yours (slightly) better.

>> With the dependency specified in an #+INIT or #+PREAMBLE or #+LISP-SETUP
>> or whatever. For the sake of making ox export for arbitrary $1 " as easy
>> as latex".  (Even better would be a dedicated binary: "ox --latex $1").
>>
>> I don't know if it's a security issue, and if you don't see a benefit from
>> the above, I won't push further.
>
> I don't see the point of adding a feature that will _only_ benefit to
> other editors than Emacs.

It also makes it easier for Emacs users.  I compile org with a Makefile
sometimes.

> Also, I have trouble understanding why you would need to switch init
> file per document, instead of using, e.g., #+SETUPFILE.

The document is shared between a couple of people.  My init.el is
opinionated and > 3000 lines and only assumes Emacs-git.  It would be a
distraction to circulate it for this purpose.

By having a separate init file I ensure stability and coherency, hopefully
also across time.  For the same reason, I copy bib entries from my
"global" lit.bib to a project lit.bib.

Why not #+SETUP: 'Cause I also define filters, links,
org-latex-package-alist etc.  I even use a separate "org-cite" library.

> To solve a portability issue, which is a related problem, then you don't
> want to change init file for a give Org document, but instead attach it
> to fixed set-up. 

Even better.  And more ambitious!

> We could work it out by defining a new file format ".borg" (for Bundled
> Org) containing both the init file and the document, in a compressed
> directory (created, e.g., with `org-assimilate').

Hmm, I guess that would be nice.  Do you have like a tar in mind?  Would
.borg be tar since it contains both "libraries" and a document?

Unless we can somehow sandbox execution I guess it holds the same security
issues as a #+INIT?

BTW: If it can hold libraries, this could solve another pity: manually
copying ox-koma-letter.el to vanilla Emacs setups.

—Rasmus

-- 
Enough with the bla bla!



Re: [O] [ox, patch] external compilation

2015-02-21 Thread Nicolas Goaziou
Rasmus  writes:

> That's more or less what I do cf. the first post, namely
>
> # Local Variables:
> # eval:  (unless noninteractive (load-file "org-conf.el"))
> # End:
>
> [Which gives me the annoying prompt].

The solution I gave you doesn't prompt anything.

> With the dependency specified in an #+INIT or #+PREAMBLE or #+LISP-SETUP
> or whatever. For the sake of making ox export for arbitrary $1 " as easy
> as latex".  (Even better would be a dedicated binary: "ox --latex $1").
>
> I don't know if it's a security issue, and if you don't see a benefit from
> the above, I won't push further.

I don't see the point of adding a feature that will _only_ benefit to
other editors than Emacs.

Also, I have trouble understanding why you would need to switch init
file per document, instead of using, e.g., #+SETUPFILE.

To solve a portability issue, which is a related problem, then you don't
want to change init file for a give Org document, but instead attach it
to fixed set-up. We could work it out by defining a new file format
".borg" (for Bundled Org) containing both the init file and the
document, in a compressed directory (created, e.g., with
`org-assimilate').

Regards,



[O] Org mode for the new guy.

2015-02-21 Thread Garrett Fuller
I am still learning how to use emacs. When I was learned about org mode, I
was really excited. I found it very difficult to extract the basic usage of
org mode from the resources available on the website. The resources
available are both plentiful and VERY thorough, but all I wanted was a
rundown of basic use commands so I could play with it and get comfortable.

I eventually got there, and wrote myself a little ,org cheat sheet of
controls and commands. I wanted to share what I worked out with other
beginners somehow, but I have absolutely no idea how to go about that.

So, I figured I would share it with you guys. Maybe you can make it
available for beginners?

Org mode is cooler than sliced bread, btw. Love it. I am now taking notes
in all of my classes with it. Thanks alot!

-- 
The more I learn, the more I know I don't know.
Garrett Fuller


neworg.org
Description: Binary data


Re: [O] Citation syntax: a revised proposal

2015-02-21 Thread Rasmus
Richard Lawrence  writes:

> You're right that consistency in that syntax would be a good thing.
> Moreover, Org already has syntax that looks a lot like plists in
> #+ATTR_BACKEND lines and in Babel source block headers, so it seems
> natural to adopt something like it for other sorts of objects.

Org also already has [fn:·:·] that already is supported inline and looks
an awful lot like [cite:·:·]. . .

—Rasmus

-- 
Hooray!




Re: [O] Citation syntax: a revised proposal

2015-02-21 Thread Rasmus
Hi Samuel,

Samuel Wales  writes:

> On 2/20/15, Rasmus  wrote:
>> I think everybody is thinking along the lines, but some people want to not
>> have another link-morass :) In particular, I think we are trying hard to
>> avoid this situation:
>>
>> i just think the syntax we design should, if possible, be so general
>> that it can be used for future features, *including 100% unrelated
>> features*, and also for future subfeatures of any feature, including
>> citations.
>
> this means that we are not thinking along the same lines.
>
> what i am describing is what i described years ago in several posts.
> it was mentioned recently [and on john's blog], then discussion went
> back to citation-specific syntax.

As I said an arbitrary [fun: arg :key val] is great.  It might solve what
I (perhaps unfairly) dubbed the "link-morass", since it has no
description.

> i am not proposing hijacking existing syntax; i am proposing the
> opposite.  i am proposing a single, new, unambiguous syntax.  e.g.
>
>   $[feature args... :key value ...]
> ...
>   $[color-start "red"]red$[color-end "red"]

^^^ This is already supported via a macros (for export at least):

{{{color-start red, red}}}
#+MACRO: color-start @@html:$2 [i am just making this up as i go along to give you the general idea.]
>
> notice how we did not need to invent new syntax!

I sympathize with the idea.  Surely (some years ago I *wanted* to write
the generalized "link", but lacked time and skillz).

But citations is a different beast and fixed syntax is what is needed.

>>> to me, that means plist or similar.
>>
>> A lambda (that is a cite-subtype) is ∞ more customizable than a plist.
>
> i don't think i'd favor anything that must eval.  security issues,
> among other things.

I too worry about the NSA backdoors in self-insert-command. . .

If you don't allow a generalized link to follow a user-specified λs then
you don't have a flexible syntax that you expressed desire for above.
You'd still have to wait for somebody "upstream" to develop
[color-start:⋯].

>> A generalization of, say macros and link which look like [FUN: :key value]
>> or [FUN: arg]{:key value} may be appropriate, but it's something
>> different from the discussion at hand.
>
> i'm not sure i am explaining my point well here.

You are.  I just don't agree citation support should be generalized to a
more abstract level at this point.  What Org desperately needs in terms of
reproducible, scientific writing is a rigorous, standard syntax.

—Rasmus

-- 
Dung makes an excellent fertilizer



Re: [O] [ox, patch] external compilation

2015-02-21 Thread Rasmus
Hi,

>> That it hardcodes conf.el.  So it doesn't toexport1.org which depends on
>> config/conf.el.  I want to specify the dependency in in toexport.org
>> explicitly so that
>>
>>  emacs --batch -Q --visit toexport.org -f org-latex-export-to-pdf
>>
>> generally works with custom-config files.  Again, think about supporting a
>> Org from a editor where you just have "one button".
>
> Then
>
>   # Local Variables:
>   # org-export-async-init-file: "config/config.el"
>   # End:
>
> at the end of your file and
>
>   emacs --batch -Q --eval="(setq enable-local-variables :all)" --visit
> toexport.org --eval="(org-export-latex-to-pdf t)"

That's more or less what I do cf. the first post, namely

# Local Variables:
# eval:  (unless noninteractive (load-file "org-conf.el"))
# End:

[Which gives me the annoying prompt].

I call Emacsfor like this. For some reason I had to explicitly require
'ox, maybe just me doing a mistake.

emacs --batch --no-init-file --eval="(progn (setq enable-local-eval t) (require 
'ox-latex))" $1 --funcall=org-latex-export-to-pdf

The whole point is that I would like to cut it down to:

emacs --batch --no-init-file $1 --funcall=org-latex-export-to-pdf

With the dependency specified in an #+INIT or #+PREAMBLE or #+LISP-SETUP
or whatever. For the sake of making ox export for arbitrary $1 " as easy
as latex".  (Even better would be a dedicated binary: "ox --latex $1").

I don't know if it's a security issue, and if you don't see a benefit from
the above, I won't push further.

—Rasmus

-- 
Slowly unravels in a ball of yarn and the devil collects it



Re: [O] Embedding diagrams in Org

2015-02-21 Thread Andreas Leha
Hi,

Sebastien Vauban  writes:
> Hello Andreas,
>
> Andreas Leha wrote:
>> I also use tikz in my org files.  I just include a slightly more
>> involved version of Eric's example to show some of the beauty of org.
>>
>> This includes a caption for the diagram, and different output formats
>> for different export routes.
>>
>> #+LATEX_HEADER: \usepackage{tikz}
>>
>> * tikz example
>>
>> #+name: tikz_example
>> #+header: :packages '(("" "tikz"))
>> #+header: :file (by-backend (latex "example_diagram.tikz") (html 
>> "example_diagram.svg") (t "example_diagram.png"))
>
> Where is the `by-backend' function defined?
>

Sorry, I thought the by-backend function was 'common wisdom' by now.
It's been proposed by Eric Schulte and there has been a short discussion
about including it in org proper.  Here it is:

--8<---cut here---start->8---
(defmacro by-backend (&rest body)
  `(case (if (boundp 'backend) (org-export-backend-name backend) nil) ,@body))
--8<---cut here---end--->8---


And I forgot to add:  For the SVG export in html you might need to set

--8<---cut here---start->8---
(setq org-babel-latex-htlatex "htlatex")
--8<---cut here---end--->8---



>> #+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 
>> 800
>> #+header: :results file raw
>> #+header: :fit yes
>> #+begin_src latex
>>   \begin{tikzpicture}
>> \node[red!50!black] (a) {A};
>> \node (b) [right of=a] {B};
>> \draw[->] (a) -- (b);
>>   \end{tikzpicture}
>> #+end_src
>>
>> #+caption: A tikz example diagram with a caption
>> #+results: tikz_example
>> [[file:example_diagram.png]]
>
> What'd be nice is that you could say (in a *file* property) that the
> extension for LaTeX always has to be .tikz, for HTML .svg and .png in
> all the other cases.

I agree.  Especially if that setup should be applied to every figure in
the document, the header repetitions are tedious.  I do not have a
solution, I am afraid.

>
> Then, you could simply give the base name of the figure where
> appropriate, in a "DRY" configuration.

I'd love to see that, too.

Best,
Andreas




Re: [O] [ox, patch] external compilation

2015-02-21 Thread Nicolas Goaziou
Rasmus  writes:

> That it hardcodes conf.el.  So it doesn't toexport1.org which depends on
> config/conf.el.  I want to specify the dependency in in toexport.org
> explicitly so that
>
>  emacs --batch -Q --visit toexport.org -f org-latex-export-to-pdf
>
> generally works with custom-config files.  Again, think about supporting a
> Org from a editor where you just have "one button".

Then

  # Local Variables:
  # org-export-async-init-file: "config/config.el"
  # End:

at the end of your file and

  emacs --batch -Q --eval="(setq enable-local-variables :all)" --visit 
toexport.org --eval="(org-export-latex-to-pdf t)"

Regards,