Re: [O] [RFC] Org version of the Org manual

2013-03-17 Thread Sebastien Vauban
Hi Carsten,

Carsten Dominik wrote:
> On 17.3.2013, at 02:19, Thomas S. Dye  wrote:
>
>> Hi Achim,
>> 
>> Achim Gratz  writes:
>> 
>>> Hi Tom,
>>> 
>>> I'm playing around with the current version, here is what I have so far:
>>> 
>>> 
>>> The arguments to #+attr_texinfo need to lose the double quotes
>>> 
>>> Index entries in description lists must be separated from their entry by
>>> at least one blank line like in the example below, otherwise the second
>>> such entry gets indented in the exported .texi file and that somehow
>>> confuses texinfo for some of them.
>>> 
>>> - {{{kbd(v d)}}} or short {{{kbd(d)}}}, ~org-agenda-day-view~ ::
>>> 
>>>  {{{kindex(v d)}}}
>>>  {{{kindex(d)}}}
>>>  {{{vindex(org-agenda-span)}}}
>>> 
>>> 
>>> With these hanges I get the manual exported correctly to all formats.
>> 
>> Done.  Thanks.
>> 
>> I brought the manual up-to-date and used @@info:@@ for the problem macro
>> characters, so it should be completely converted to Org now.
>
>
> I tried the file on github, and export to texinfo fails with the attached 
> backtrace (exports to other backends as well).
>
> I love this idea, so I really want to try.  Any ideas what might be wrong on 
> my side?
>
> - Carsten
>
> Debugger entered--Lisp error: (error "Unknown marker at 281861")

Could you try M-x goto-char 281861?

I have such a msg in old files where I had my own @ markes.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [RFC] Org syntax (draft)

2013-03-17 Thread Achim Gratz
Nicolas Goaziou writes:
> As discussed a few days ago, here is a document describing the complete
> Org syntax as read by the parser. I also added some comments. I am going
> to put the Org file on Worg, so anyone can update it and fix mistakes.

after some playing with the Org manual in Org that Tom has been working
on I am starting to think that there should be a way to define the same
macro differently for different export backends.  That would be mainly
so that you could have a macro expansion use export snippets tailored to
that backend where (after stripping the export snippets) the expansion
makes little or no sense in other backends.  What do you think?


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

DIY Stuff:
http://Synth.Stromeko.net/DIY.html




Re: [O] Publish to html issue

2013-03-17 Thread Igor Kupczyński
Hi Jay,

Changing from *org-publish-org-to-html* to *org-html-publish-to-html *does
the trick indeed. Thank you very much for this hint :-) I also missed the
8.0 document you've mentioned - it is helpful.

Cheers,
Igor


On Sun, Mar 17, 2013 at 1:42 AM, Jay Kerns  wrote:

> Dear Igor,
>
> On Sat, Mar 16, 2013 at 7:12 PM, Igor Kupczyński 
> wrote:
> > Dear List,
> >
> > I try to set up a simple org --> html publishing system.
> [snip]
>
> >
> > (setq org-publish-project-alist
> >   '(("org"
> >   :base-directory "~/tmp/org/"
> >   :publishing-directory "~/tmp/html"
> >   :section-numbers nil
> >   :table-of-contents nil
> >   :publishing-function org-publish-org-to-html
> >   :style " > href=\"../other/mystyle.css\"
> > type=\"text/css\"/>")))
>
> [snip]
>
> Would you please try keeping everything the same except for the
> following change:
>
> :publishing-function org-html-publish-to-html
>
> Then (after restart) open one of the *.org files in your ~/tmp/org
> directory and do the keybinding C-c C-e P p.  It should do some
> thinking and there should be (at least one) *.html file(s) in
> ~/tmp/html.
>
> Also, please see the following information on Worg which has lots of
> updates/changes that haven't made it to the manual yet:
>
> http://orgmode.org/worg/org-8.0.html
>
> I hope this helps,
>
> --
> Jay
>


Re: [O] [RFC] Org syntax (draft)

2013-03-17 Thread Sebastien Vauban
Hi Achim,

Achim Gratz wrote:
> Nicolas Goaziou writes:
>> As discussed a few days ago, here is a document describing the complete
>> Org syntax as read by the parser. I also added some comments. I am going
>> to put the Org file on Worg, so anyone can update it and fix mistakes.
>
> after some playing with the Org manual in Org that Tom has been working
> on I am starting to think that there should be a way to define the same
> macro differently for different export backends.  That would be mainly
> so that you could have a macro expansion use export snippets tailored to
> that backend where (after stripping the export snippets) the expansion
> makes little or no sense in other backends.  What do you think?

This is already possible, as once explained by Nicolas on this ML:

  ╭
  │ You can also have macros generating raw code geared towards LaTeX or HTML
  │ back-ends (through export-snippets). For example:
  │ 
  │ #+MACRO: my-mod @@e-latex:\something{$1}e-html:$1@@
  │ 
  │ This is an example: {{{my-mod(text)}}}.
  ╰

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] A mix of habits and effort estimates?

2013-03-17 Thread Daimrod
Marcin Borkowski  writes:

> Hi list,

Hi Marcin,

> say that I'd like to learn a new language or something.  I'd like to
> devote, say, 180 minutes to it each week.  Does anyone have an idea how
> to achieve something like that in Org-mode:
>
> * I create a task (say, "Learn Italian")
> * I clock in/out when I start/stop doing this
> * I have a few other tasks like that
> * and somehow, org-magically, I can view a weekly report summarizing
>   whether I spent too much or too little time on different projects.
>
> Is such a thing possible in Org-mode?  I suspect that it might be
> doable, maybe with effort estimates and/or column view (which I don't
> use, but I can as well start using it), but it might also require some
> elisp hacking.  Does anyone have a setup for something like this?

Not exactly what you're looking for, but, there is org-drill[1] a
« flashcards and spaced repetition » system that will "optimize" when to
review items.

[1] http://orgmode.org/worg/org-contrib/org-drill.html

-- 
Daimrod/Greg


pgp5Vm_wDduGZ.pgp
Description: PGP signature


Re: [O] exporting, too, was: Re: multiline emphasis, was: Re: latex italics in list, with quotation marks

2013-03-17 Thread Robert Klein
Hello,



> Robert Klein  writes:
> 
>> (require 'org)
>>
>> ;; change number of newlines for emphasized blocks
>> (setq org-emphasis-regexp-components
>>   '(" \t('\"{" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 10))
>>
> 
> This should probably happen before org is loaded, according to the
> docstring.
> 

Thanks a lot, this works.  I didn't find (or understand) this in the
docstring, though. :(

>> Mebbe I just forgot some setting to get it working, though I'd like the
>> exporter to recognize the org-emphasis-regexp-components settings...
> 
> The exporter relies on the parser, which relies on `org-emph-re', which
> is built from `org-emphasis-regexp-components'.
> 

Best regards
Robert




Re: [O] [RFC] Org version of the Org manual

2013-03-17 Thread Achim Gratz
Hi Tom,

I have a patch that should fix your problems with some characters in
macro expansions:

>From 27b22d17f629a50bd485a0320dac45616d7ceb7f Mon Sep 17 00:00:00 2001
From: Achim Gratz 
Date: Sun, 17 Mar 2013 10:20:10 +0100
Subject: [PATCH] fix macro expansion with separators and backslashes

* lisp/org-element.el (org-element-macro-parser): Do not try to
  "repair bad splits", only split at the correct places.
* lisp/org-macro.el (org-macro-expand): Do not try to interpret the
  macro replacement text as a regex.

Allow to write macros like {{{kbd(\\)}}} and {{{kbd(\\,)}}} and expand
them correctly.  A backslash at the end of an argument was incorrectly
trying to cons the next argument (which may not exist).
---
 lisp/org-element.el | 16 +---
 lisp/org-macro.el   |  2 +-
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index ba2461a..337cad0 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -3117,20 +3117,14 @@ (defun org-element-macro-parser ()
 	  (post-blank (progn (goto-char (match-end 0))
 			 (skip-chars-forward " \t")))
 	  (end (point))
-	  (args (let ((args (org-match-string-no-properties 3)) args2)
+	  (args (let ((args (org-match-string-no-properties 3)))
 		  (when args
 		;; Do not use `org-split-string' since empty
 		;; strings are meaningful here.
-		(setq args (split-string args ","))
-		(while args
-		  (while (string-match "\\'" (car args))
-			;; Repair bad splits, when comma is protected,
-;; and thus not a real separator.
-			(setcar (cdr args) (concat (substring (car args) 0 -1)
-		   "," (nth 1 args)))
-			(pop args))
-		  (push (pop args) args2))
-		(mapcar 'org-trim (nreverse args2))
+		(setq args (replace-regexp-in-string "," "\000" args))
+		(setq args (replace-regexp-in-string "\000" "," args))
+		(setq args (split-string args "\000"))
+		(mapcar 'org-trim args)
   (list 'macro
 	(list :key key
 		  :value value
diff --git a/lisp/org-macro.el b/lisp/org-macro.el
index 88cbdf7..3e07295 100644
--- a/lisp/org-macro.el
+++ b/lisp/org-macro.el
@@ -137,7 +137,7 @@ (defun org-macro-expand (macro templates)
(org-element-property :args macro))
   ;; No argument: remove place-holder.
   ""))
-template)))
+template nil 'literal)))
 ;; VALUE starts with "(eval": it is a s-exp, `eval' it.
 (when (string-match "\\`(eval\\>" value)
   (setq value (eval (read value
-- 
1.8.1.4


I hope Nicolas will apply it or make a better patch.  The quoting used
unfortunately is not idempotent, so you need to know how many times your
macro will get expanded, but it is a start.  You should now be able to
do this:

>From 042ad50bd06cbc5ab97c753cb5cfce8908121242 Mon Sep 17 00:00:00 2001
From: Achim Gratz 
Date: Sun, 17 Mar 2013 11:27:21 +0100
Subject: [PATCH] put back macros with "problematic characters"

---
 orgmanual.org | 30 +-
 1 file changed, 9 insertions(+), 21 deletions(-)

diff --git a/orgmanual.org b/orgmanual.org
index 6aa6b81..d50b20b 100644
--- a/orgmanual.org
+++ b/orgmanual.org
@@ -4254,13 +4254,10 @@ Priorities can be attached to any outline node; they do not need to be TODO
 items.
 
 #+attr_texinfo: :table-type table :indic @asis
-  - {{{kbd(C-c XXX)}}} ::
+  - {{{kbd(C-c \\,)}}} ::
 
-{{{kindex(C-c ,)}}}
-#+comment:{{{kindex(@kbd{C-c ,})}}}
-#+comment: Preceding line won't export to pdf
-{{{findex(org-priority)}}}
-#+comment: Should be C-c ,
+   {{{kindex(C-c \\,)}}}
+   {{{findex(org-priority)}}}
 
 Set the priority of the current headline (~org-priority~). The
 command prompts for a priority character {{{samp(A)}}}, {{{samp(B)}}}
@@ -9226,9 +9223,7 @@ the other commands, the cursor needs to be in the desired line.
 
 - ~\~ ~org-agenda-filter-by-tag-refine~ ::
 
-  #+comment: {{{kindex(XXX)}}}
-  #+comment: Should be \
-  @@info:kindex \\@@
+  {{{kindex(\)}}}
 
   Narrow the current agenda filter by an additional condition. When
   called with prefix arg, remove the entries that /do/ have the tag, or
@@ -9350,11 +9345,9 @@ the other commands, the cursor needs to be in the desired line.
   Set tags for the current headline. If there is an active region in the
   agenda, change a tag for all headings in the region.
 
-- {{{kbd(,)}}} ::
+- {{{kbd(\\,)}}} ::
 
-  #+comment: {{{kindex(XXX)}}}
-  #+comment: Should be a comma
-  @@info:kindex ,@@
+  {{{kindex(\\,)}}}
 
   Set the priority for the current item (~org-agenda-priority~). Org
   mode prompts for the priority character. If you reply with
@@ -10691,12 +10684,9 @@ If you would like to see entities displayed as UTF8 characters, use the
 following command:[fn:108]
 
 #+attr_texinfo: :table-type table :indic @asis
-- @@info:@kbd{C-c C-x XXX}@@ ::
-

Re: [O] [RFC] Org version of the Org manual

2013-03-17 Thread Carsten Dominik

On 17.3.2013, at 07:54, Achim Gratz  wrote:

> Carsten Dominik writes:
>> I tried the file on github, and export to texinfo fails with the
>> attached backtrace (exports to other backends as well).
> 
> Works for me.
> 
>> I love this idea, so I really want to try.  Any ideas what might be
>> wrong on my side?
> […]
>>  org-export-to-file(texinfo "./om.texi" nil nil nil nil)
> 
> It seems you are not using the build system?

Hi Achim, not sure what exactly you mean.  I do compile using make which I 
think is what you mean?

> You need to set at least 
> 
> (add-to-list 'org-export-snippet-translation-alist
> '("info" . "texinfo"))

Have that now, does not fix the issue.

- Carsten




Re: [O] two-way sync org agenda/ical

2013-03-17 Thread Eric S Fraga
Bastien  writes:

> Eric S Fraga  writes:
>
>> Given that I no longer use my old syncing approach, described on that
>> page, and instead use org-caldav, I would be happy to have the reference
>> to org-caldav moved to the top!
>
> It's a wiki, be *bold* :)

Actually, given the recent announcement regarding the removal of caldav
support from Google's calendar service, I think it's best to leave the
page as it is until things settle down.

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_8.0-pre-107-g91a6ca




Re: [O] [RFC] Org version of the Org manual

2013-03-17 Thread Carsten Dominik

On 17.3.2013, at 08:01, "Sebastien Vauban"  wrote:

> Hi Carsten,
> 
> Carsten Dominik wrote:
>> On 17.3.2013, at 02:19, Thomas S. Dye  wrote:
>> 
>>> Hi Achim,
>>> 
>>> Achim Gratz  writes:
>>> 
 Hi Tom,
 
 I'm playing around with the current version, here is what I have so far:
 
 
 The arguments to #+attr_texinfo need to lose the double quotes
 
 Index entries in description lists must be separated from their entry by
 at least one blank line like in the example below, otherwise the second
 such entry gets indented in the exported .texi file and that somehow
 confuses texinfo for some of them.
 
 - {{{kbd(v d)}}} or short {{{kbd(d)}}}, ~org-agenda-day-view~ ::
 
 {{{kindex(v d)}}}
 {{{kindex(d)}}}
 {{{vindex(org-agenda-span)}}}
 
 
 With these hanges I get the manual exported correctly to all formats.
>>> 
>>> Done.  Thanks.
>>> 
>>> I brought the manual up-to-date and used @@info:@@ for the problem macro
>>> characters, so it should be completely converted to Org now.
>> 
>> 
>> I tried the file on github, and export to texinfo fails with the attached 
>> backtrace (exports to other backends as well).
>> 
>> I love this idea, so I really want to try.  Any ideas what might be wrong on 
>> my side?
>> 
>> - Carsten
>> 
>> Debugger entered--Lisp error: (error "Unknown marker at 281861")
> 
> Could you try M-x goto-char 281861?

You mean in orgmanual.org?


It jumos to "see" in
-
- %:keyword ::   

  Specific information for certain link types, see below.
--

> 
> I have such a msg in old files where I had my own @ markes.
> 
> Best regards,
>  Seb
> 
> -- 
> Sebastien Vauban
> 
> 




Re: [O] Better way to customize daily/weekly agenda?

2013-03-17 Thread Eric S Fraga
Bastien  writes:

> Hi Eric,
>
> Eric S Fraga  writes:
>
>> It would be great to have some way of switching the grid on and
>> off when changing views without recourse to custom views.
>
> Maybe I miss something, but isn't what `G' is for in agenda view?
>
> HTH,

Yes but I was referring to an automated configuration so that switching
from a day view (with grid) to a week view would automatically turn off
the grid.

Anyway, it turns out that the problem is mine!   My configuration
had "today" as one of the specifications for when a grid was to be
shown, along with "daily" and "require-timed".  Simply removing the
"today" did the job.

Sorry for the noise.

thanks,
eric


-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_8.0-pre-107-g91a6ca




Re: [O] org-caldav will cease to work with Google Calendar

2013-03-17 Thread Eric S Fraga
Torsten Wagner  writes:

> Hi Eric,
>
> I can just repeat, if you have a own Server already, give SoGO a try!
> The only disadvantage yet, the webinterface is not smartphone friendly.
> However, sync works well.

Thanks.  Although I do have my own server, I am restricted to only SSH
access.  Yes, I could tunnel etc. but that just makes things more
complicated (and I'm not sure if MobileOrg would support
tunnelling).  Even if I could get SoGO to use port 22, the sys admins at
work may not like me adding more services to my server as I had to get
special permission to make my system visible from outside in the first
place!

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_8.0-pre-107-g91a6ca




Re: [O] two-way sync org agenda/ical

2013-03-17 Thread David Engster
Eric S. Fraga writes:
> Bastien  writes:
>
>> Eric S Fraga  writes:
>>
>>> Given that I no longer use my old syncing approach, described on that
>>> page, and instead use org-caldav, I would be happy to have the reference
>>> to org-caldav moved to the top!
>>
>> It's a wiki, be *bold* :)
>
> Actually, given the recent announcement regarding the removal of caldav
> support from Google's calendar service, I think it's best to leave the
> page as it is until things settle down.

FWIW, I agree.

But I think it would be good to have a page listing free alternatives
for Google Calendar (free as in speech, not necessarily free of charge
when it comes to hosting), and how to use those with Org and Android. On
such a page, org-caldav would fit very well. I currently do not have
time to write something up, though.

-David



Re: [O] Basic beamer export

2013-03-17 Thread Eric S Fraga
JBash  writes:

> Hello,
>
> I am apparently missing something very basic in the setup for beamer
> export.  I have used http://orgmode.org/worg/exporters/beamer/ox-beamer.html 
> as
> a guide and have:
>
> ;; Export to Beamer Presentation
> (require 'ox-latex)
> (add-to-list 'org-latex-classes
>  '("beamer"
>"\\documentclass\[presentation\]\{beamer\}"
>("\\section\{%s\}" . "\\section*\{%s\}")
>("\\subsection\{%s\}" . "\\subsection*\{%s\}")
>("\\subsubsection\{%s\}" . "\\subsubsection*\{%s\}")))

When I add my beamer entry (see below), I do not escape the curly
braces:

#+begin_src emacs-lisp
(add-to-list 'org-latex-classes
 '("beamer" "\\documentclass{beamer}
\[DEFAULT-PACKAGES]
\[PACKAGES]
\[EXTRA]"
   ("\\section{%s}" . "\\section*{%s}")
   ("\\subsection{%s}" . "\\subsection*{%s}")
   ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
   ("\\paragraph{%s}" . "\\paragraph*{%s}")
   ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
#+end_src

I have no idea whether that makes a difference or not but have you
looked to see what org-latex-classes is actually set to after your
customisation?

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_8.0-pre-107-g91a6ca




Re: [O] New Exporter html - latex - beamer

2013-03-17 Thread Eric S Fraga
Robert Eckl  writes:

> I have to provide weekly newsletters in the format pdf and html. Up to
> now i did this with exporting to scrartcl, known as koma-script.
> Including images is a bit booring because i handle two formats, for example

I am not sure what your latex bits are trying to accomplish so it's
difficult to advise on how to achieve what you want.  Maybe wrapfigure,
which org export supports (float option, I believe, but I am not sure),
is what you need instead of "window"?

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_8.0-pre-107-g91a6ca




Re: [O] [RFC] Org version of the Org manual

2013-03-17 Thread Achim Gratz
Carsten Dominik writes:
>> It seems you are not using the build system?

> Hi Achim, not sure what exactly you mean.  I do compile using make
> which I think is what you mean?

It seems you're not producing orgmanual.texi with make, since I can't
see how it would use "om.texi" as the target filename.  Anyway, the
latest changes from Tom are only in the orgmanual branch of the github
repo.  You'll need to complement that with the changes to Org that I
posted earlier for him to try.


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

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] A mix of habits and effort estimates?

2013-03-17 Thread Marcin Borkowski
Dnia 2013-03-16, o godz. 22:59:18
"Sebastien Vauban"  napisał(a):

> Hi Marcin,
> 
> Marcin Borkowski wrote:
> > Bastien  napisał(a):
> >> Marcin Borkowski  writes:
> >> 
> >> > Is such a thing possible in Org-mode?
> >> 
> >> Did you check (info "(Org)Tracking your habits") ?
> >
> > As I mentioned (though only in the subject), yes. This is close,
> > but my point is not "I want to do this at least once each three
> > days" or something like this, but rather "I want to spend at least
> > 180 minutes every week on this" - regardless of days. Of course, I
> > could do it with the habits module (and if there's no other
> > solution, I will do it like this), but what I'd like to have is
> > actually a mixture of habits and effort estimates/clocking.
> 
> No problem for that.
> 
> - For the sake of facility, give a unique tag to your "educational"
> task
> 
> - Clock to your task each time you work on it
> 
> - Whenever you want to check whether you did work enough or not,
> launch the agenda view for the current week (`v w' in case you say
> the current day by default)
> 
> - Ask for the display of the clock report (`C-u R')
> 
> - Filter on your educational task

Thanks, that is brilliant!  It is /almost/ what I was looking for.
(One thing that is missing might be fancy coloring, say red for things
I devoted too little time to etc.  I guess this might be actually
implemented using properties and some hooks - I'll try to look into it
some day.)  Now I only need to automate it (which should be easy with
custom agenda views, I guess.)  Thanks!

> Have fun!
> 
> Best regards,
>   Seb

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] A mix of habits and effort estimates?

2013-03-17 Thread Marcin Borkowski
Dnia 2013-03-17, o godz. 10:51:09
Daimrod  napisał(a):

> Marcin Borkowski  writes:
> 
> > Hi list,
> 
> Hi Marcin,
> 
> > say that I'd like to learn a new language or something.  I'd like to
> > devote, say, 180 minutes to it each week.  Does anyone have an idea
> > how to achieve something like that in Org-mode:
> >
> > * I create a task (say, "Learn Italian")
> > * I clock in/out when I start/stop doing this
> > * I have a few other tasks like that
> > * and somehow, org-magically, I can view a weekly report summarizing
> >   whether I spent too much or too little time on different projects.
> >
> > Is such a thing possible in Org-mode?  I suspect that it might be
> > doable, maybe with effort estimates and/or column view (which I
> > don't use, but I can as well start using it), but it might also
> > require some elisp hacking.  Does anyone have a setup for something
> > like this?
> 
> Not exactly what you're looking for, but, there is org-drill[1] a
> « flashcards and spaced repetition » system that will "optimize" when
> to review items.
> 
> [1] http://orgmode.org/worg/org-contrib/org-drill.html

Thanks.  My example was not very good - indeed, to learn Italian, your
way would be better (and I say it as a long-time SuperMemo user, now
waiting for some spare time to try out org-drill).  But for other things
(not necessarily connected with learning), I'd like just to (i)
assign /at least/ some time a week to them and (ii) limit this time so
that I don't spend /too much/ time on it.

But thanks anyway!

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] Basic beamer export

2013-03-17 Thread Suvayu Ali
On Sun, Mar 17, 2013 at 01:08:33PM +, Eric S Fraga wrote:
> 
> When I add my beamer entry (see below), I do not escape the curly
> braces:
> 
> #+begin_src emacs-lisp
> (add-to-list 'org-latex-classes
>  '("beamer" "\\documentclass{beamer}
> \[DEFAULT-PACKAGES]
> \[PACKAGES]
> \[EXTRA]"
>("\\section{%s}" . "\\section*{%s}")
>("\\subsection{%s}" . "\\subsection*{%s}")
>("\\subsubsection{%s}" . "\\subsubsection*{%s}")
>("\\paragraph{%s}" . "\\paragraph*{%s}")
>("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
> #+end_src

But I do escape them!


-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Basic beamer export

2013-03-17 Thread Suvayu Ali
On Fri, Mar 15, 2013 at 10:59:22AM -0400, JBash wrote:
> 
> M-x list-load-path-shadows output

[...]

> ~/emacs/lisp/org-mode/lisp/org-list hides
> /usr/share/emacs/23.4/lisp/org/org-list
> ~/emacs/lisp/org-mode/lisp/org-plot hides
> /usr/share/emacs/23.4/lisp/org/org-plot

[...]

Looks okay to me.  Are you sure your org directory is clean?  What does
`git status' and `git describe' say in your org directory?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [RFC] Org version of the Org manual

2013-03-17 Thread Carsten Dominik

On 17.3.2013, at 14:34, Achim Gratz  wrote:

> Carsten Dominik writes:
>>> It seems you are not using the build system?
> 
>> Hi Achim, not sure what exactly you mean.  I do compile using make
>> which I think is what you mean?
> 
> It seems you're not producing orgmanual.texi with make,

You are right, I am not, did not know that the Makefile already supports making 
the manual in this way.  Don't see how either.

> since I can't
> see how it would use "om.texi" as the target filename.  Anyway, the
> latest changes from Tom are only in the orgmanual branch of the github
> repo.  You'll need to complement that with the changes to Org that I
> posted earlier for him to try.

So these are not yet in his github repository?

I am a bit confused, so I give up for now, maybe you or Tom can send around 
some instructions once there is a version accessible that will work out of the 
box.

Thanks

- Carsten




Re: [O] A mix of habits and effort estimates?

2013-03-17 Thread Memnon Anon
Marcin Borkowski  writes:

> As I mentioned (though only in the subject), yes.  This is close, but
> my point is not "I want to do this at least once each three days" or
> something like this, but rather "I want to spend at least 180 minutes
> every week on this" - regardless of days.  Of course, I could do it
> with the habits module (and if there's no other solution, I will do it
> like this), but what I'd like to have is actually a mixture of habits
> and effort estimates/clocking.

Maybe a dedicated subtree like this:


* Learn Tasks :learn:
  :PROPERTIES:
  :COLUMNS: %10ITEM %16SCHEDULED %5Effort{+} %5CLOCKSUM{+} 
  :END:
** Learn Italian
*** W11 [2013-03-17 So]
DEADLINE: <2013-03-17 So>
:PROPERTIES:
:Effort:   3:00
:END:
 STRT Task 1
 SCHEDULED: <2013-03-11 Mo>
:LOGBOOK:
CLOCK: [2013-03-16 Sa 13:12]--[2013-03-16 Sa 14:50] =>  1:38
CLOCK: [2013-03-13 Mi 13:12]--[2013-03-13 Mi 14:12] =>  1:00
- State "STRT"   from "TODO"   [2013-03-17 So 13:11]
CLOCK: [2013-03-12 Di 13:11]--[2013-03-12 Di 13:30] =>  0:19
:END:
** Learn Elisp
*** W11 [2013-03-17 So]
DEADLINE: <2013-03-17 So>
:PROPERTIES:
:Effort:   3:00
:END:
 STRT Task 2
 SCHEDULED: <2013-03-14 Do>
:LOGBOOK:
- State "STRT"   from "TODO"   [2013-03-17 So 13:21]
CLOCK: [2013-03-16 Sa 13:12]--[2013-03-16 Sa 14:50] =>  1:38
CLOCK: [2013-03-13 Mi 13:12]--[2013-03-13 Mi 14:12] =>  1:00
- State "STRT"   from "TODO"   [2013-03-17 So 13:11]
CLOCK: [2013-03-12 Di 13:11]--[2013-03-12 Di 13:30] =>  0:19
:END:


What it does:
- We have a tree `Learn Tasks' with tag `learn' (you use inheritance,
  don't you?), plus a dedicated column view for it.
- Each subtask of that is a project like `Learn Italian'
- Each project has subtrees that represent your weekly units.
  You can deadline them to sunday (with a special warning time if
  wanted) so they will come up eventually in your agenda.
  On this level, you can also set up your weekly time budget as 
  an effort.
- You can either clock the weekly units themselves or create 
  subtasks which represent real actions like `learn about defun'
  which you can schedule (and reschedule) as you like e.g. each
  morning.

At the end of the week, you go to your `Learn Tasks' Tree, expand it 
as much as you want to and do a `C-c C-x C-c' to get an overview.
If you get rid of the `W11' part in the headlines of weekly units, you
can simply org-clone-subtree-with-timeshift the subtree for next week as
is. 

hth
Memnon




Re: [O] A mix of habits and effort estimates?

2013-03-17 Thread Sebastien Vauban
Hi Marcin,

Marcin Borkowski wrote:
> Dnia 2013-03-16, o godz. 22:59:18
> "Sebastien Vauban"  napisał(a):
>> Marcin Borkowski wrote:
>> > Bastien  napisał(a):'
>> >> Marcin Borkowski  writes:
>> >> 
>> >> > Is such a thing possible in Org-mode?
>> >> 
>> >> Did you check (info "(Org)Tracking your habits") ?
>> >
>> > As I mentioned (though only in the subject), yes. This is close,
>> > but my point is not "I want to do this at least once each three
>> > days" or something like this, but rather "I want to spend at least
>> > 180 minutes every week on this" - regardless of days. Of course, I
>> > could do it with the habits module (and if there's no other
>> > solution, I will do it like this), but what I'd like to have is
>> > actually a mixture of habits and effort estimates/clocking.
>> 
>> No problem for that.
>> 
>> - For the sake of facility, give a unique tag to your "educational"
>> task
>> 
>> - Clock to your task each time you work on it
>> 
>> - Whenever you want to check whether you did work enough or not,
>> launch the agenda view for the current week (`v w' in case you say
>> the current day by default)
>> 
>> - Ask for the display of the clock report (`C-u R')
>> 
>> - Filter on your educational task
>
> Thanks, that is brilliant!  It is /almost/ what I was looking for.
> (One thing that is missing might be fancy coloring, say red for things
> I devoted too little time to etc.  I guess this might be actually
> implemented using properties and some hooks - I'll try to look into it
> some day.)  Now I only need to automate it (which should be easy with
> custom agenda views, I guess.)  Thanks!

Automate it: yes, go for custom agenda view.

Re: colors, one way is to put an effort on the task, and you'll see your
consumption regarding that cut-off value; whenever you're above it, your
clocked time becomes red.

Limitation: the effort is supposed to represent a big total or a daily amount
(see property ":CLOCK_MODELINE_TOTAL: today"). Though, there is no such thing
for a weekly limit.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] org-babel src block generated graphics included twice if CAPTION is added

2013-03-17 Thread Li Bowen
Hi, 

If #+CAPTION is added, the figure will be included in the exported pdf
file twice. 

#+begin_src R :exports both :results graphics :file img.pdf
hist(rnorm(100))
#+end_src

#+CAPTION: Some description
#+RESULTS:
[[file:img.pdf]

Many thanks.

-- 
Sincerely,
Li Bowen.



Re: [O] Syntax of Org Babel ":results" header argument

2013-03-17 Thread Bastien


Hi Sébastien,

"Sebastien Vauban"
 writes:

> As there was no reaction to this, I'd like to bump it up. At least, to either
> have a discussion on this, or a clearly stated "no go".

I tend to agree with Jay here and I prefer the minimalist syntax,
although values for the :results parameter are heterogeneous.

Also, I think the change you proposal can be backward-compatible,
and in that case, making it after 8.0 is fine.

In any case, I'll let Eric and Nicolas advice have priority over
mine here.

Best,

-- 
 Bastien




[O] links in orgtbl-to-html

2013-03-17 Thread Luca Sabbatini
In an html file, using orgtbl-mode, I am trying to use "install/send" a 
table that has hyperlinks inside it. I've tried using org-mode syntax: 
[[www.google.com]], and I've tried using html syntax href:"www.google.com">mylink. Neither works as desired.


I'm assuming it is possible because because the documentation says 
orgtbl-to-html uses the same code as org-export-as-html, which *does* 
export links as desired in my experience.


thank you for your time.


-Luca


[O] Bug with automatic alignment of table columns in HTML export

2013-03-17 Thread Kodi Arfer

Consider an Org file with the following content:

|   a | b |
|-+---|
| 100 | 1 |
|   1 | 1 |
| | 1 |
| | 1 |
| | 1 |
| | 1 |
| | 1 |
| | 1 |

Within Emacs, Org right-aligns the left column, as it should, since most 
nonempty cells in the column are numeric. In HTML export, though 
(starting from "emacs -Q -l /tmp/minimal-org.el"), the column comes out 
left-aligned. The problem seems to be with how the exporter treats empty 
cells, since if you put numbers in all the empty cells above, the column 
comes out right-aligned in HTML export.


Emacs  : GNU Emacs 24.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.12)
 of 2012-09-22 on batsu, modified by Debian
Package: Org-mode version 7.9.4 (7.9.4-dist @ 
/usr/share/emacs/site-lisp/org/)




Re: [O] two-way sync org agenda/ical

2013-03-17 Thread Rasmus
David Engster  writes:

> Eric S. Fraga writes:
>> Bastien  writes:
>>
>>> Eric S Fraga  writes:
>>>
 Given that I no longer use my old syncing approach, described on
 that
 page, and instead use org-caldav, I would be happy to have the
 reference
 to org-caldav moved to the top!
>>>
>>> It's a wiki, be *bold* :)
>>
>> Actually, given the recent announcement regarding the removal of
>> caldav
>> support from Google's calendar service, I think it's best to leave
>> the
>> page as it is until things settle down.
>
> FWIW, I agree.
>
> But I think it would be good to have a page listing free alternatives
> for Google Calendar (free as in speech, not necessarily free of charge
> when it comes to hosting), and how to use those with Org and
> Android. On
> such a page, org-caldav would fit very well. I currently do not have
> time to write something up, though.


Here's a start:

* CalDAV
  From [[http://en.wikipedia.org/wiki/Caldav][Wikipedia]]
#+BEGIN_QUOTE
Calendaring Extensions to WebDAV, or CalDAV, is an Internet standard
allowing a client to access scheduling information on a remote server. 
#+END_QUOTE

  
** CalDAV calendars on Android
  [[https://f-droid.org/][F-Droid]], a repository of free software for
  Android phones, currently offers the
  [[http://www.acal.me/wiki/Main_Page][aCal]] application for using
  CalDAV. There also exists some proprietary clients which works with
  the calendar application shipped with Android. 

  More detailed information can be found on the
  [[http://wiki.davical.org/w/CalDAV_Clients/Android][DAViCal wiki]].

** Free CalDAV servers:
  The following free program may be used as CalDAV servers.  They will usually
 
  - [[http://radicale.org/][Radical]] :: A Simple Calendar and Contact Server
  - [[http://baikal-server.com/][Baïkal]] :: Lightweight CalDAV+CardDAV server
  - [[http://www.davical.org/][DAViCal]] :: A CalDAV Store (server).
  - OpenCloud :: Should support CalDAV and CardDAV
  - SoGo :: Should support CalDAV and CardDAV

** CalDAV providers using free software 
   ...

-- 
m-mm-mmm- bacon!



Re: [O] [RFC] Org version of the Org manual

2013-03-17 Thread Achim Gratz
Carsten Dominik writes:
> So these are not yet in his github repository?

Yes they are, but not in the master branch.  You'll want to switch to
the orgmanual branch for now.

> I am a bit confused, so I give up for now, maybe you or Tom can send
> around some instructions once there is a version accessible that will
> work out of the box.

This has been described elsewhere in this thread, it seems you missed
that part:

http://permalink.gmane.org/gmane.emacs.orgmode/68117

Now that there is an orgmanual branch already in Tom's repo on github,
simply clone that one and the patch that instantiates the Makefile is
already applied:

cd orgmanual
git checkout -b orgmanual orgmanual

You still need to branch the Org repo and add the patch there, plus
modify your local.mk, but then you'll be able to let the build system
produce the manual for you.


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] Fixing footnote HTML

2013-03-17 Thread Samuel Wales
Hi Bastien,

On 3/12/13, Bastien  wrote:
> Samuel Wales  writes:
>> For some reason, I am getting no blank lines between footnotes, and no
>> blank lines between paragraphs in multi-paragraph footnotes.  Any idea
>> why?  Tested in Firefox.
>
> This should now be fixed, thanks!

I have tested this and it looks much better.  Thank you.

It might be good to add a blank line after the Footnotes section.

Samuel

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

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  It attacks MANY body systems.  There is NO hope without
action.  This means YOU.



Re: [O] Bug: M-RET in capture buffer ignores level

2013-03-17 Thread Samuel Wales
On 3/13/13, Bastien  wrote:
> This should be fixed now, thanks.

Thanks, Bastien.

Samuel

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

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is NO hope without action.  This means YOU.



Re: [O] [RFC] Org syntax (draft)

2013-03-17 Thread Samuel Wales
On 3/9/13, Waldemar Quevedo  wrote:
> By the way, does it exist somewhere a set of examples of Emacs
> org-mode -> html conversion for all org-mode features?
> (How are changes from org-mode -> html converstion from Emacs tested
> during development?)

+1

That would be great.  I'd definitely donate any of my blog posts, but
perhaps others have more comprehensive tests.

Samuel

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

The disease DOES progress.  MANY people have died from it.  Just like
AIDS, it attacks MANY body systems.  ANYBODY can get it.  There is NO
hope without activist action.  This means YOU.



Re: [O] commenting a region does not comment out a link

2013-03-17 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> Please try commenting this region:
>
> ===
> It is possible that AIDS in the early 1980s -- a
> [[http://thekafkapandemic.blogspot.com/2012/04/misopathy.html][misopathized]]
> disease -- never needed to point this stuff
> out, but we do.
> ===
>
> The link swallows the comment characters.

This should be fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] commenting a region does not comment out a link

2013-03-17 Thread Samuel Wales
On 3/17/13, Nicolas Goaziou  wrote:
> This should be fixed. Thank you.

Thanks.

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

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is NO hope without action.  This means YOU.



Re: [O] [RFC] Org version of the Org manual

2013-03-17 Thread Carsten Dominik
Hi Achim,

thank you for the additional information.
On 17.3.2013, at 18:36, Achim Gratz  wrote:

> Carsten Dominik writes:
>> So these are not yet in his github repository?
> 
> Yes they are, but not in the master branch.  You'll want to switch to
> the orgmanual branch for now.
> 
>> I am a bit confused, so I give up for now, maybe you or Tom can send
>> around some instructions once there is a version accessible that will
>> work out of the box.
> 
> This has been described elsewhere in this thread, it seems you missed
> that part:

Quite likely, I only spontaneously tried to compile the new manual and wanted 
to go the route with C-c C-e i t or something like this.  Inclusion in the 
built system is great, if this project succeeds.

I think I am doing everything right, but I still get the marker error.  So I 
fear something in my config might be acting up - there are several people who 
have reported now that they have produced the manual successfully.  Will try to 
isolate my issue.

Thanks!

- Carsten

> 
> http://permalink.gmane.org/gmane.emacs.orgmode/68117
> 
> Now that there is an orgmanual branch already in Tom's repo on github,
> simply clone that one and the patch that instantiates the Makefile is
> already applied:
> 
> cd orgmanual
> git checkout -b orgmanual orgmanual
> 
> You still need to branch the Org repo and add the patch there, plus
> modify your local.mk, but then you'll be able to let the build system
> produce the manual for you.
> 
> 
> 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] [dev] New version of org-favtable.el -- Lookup table of favorite references and links

2013-03-17 Thread Marc-Oliver Ihm

Hi,

org-favtable now has its own documentation at worg:

  http://orgmode.org/worg/org-contrib/org-favtable.html

Its table of contents reads like this:

  * Introduction and Overview
  * Three scenarios of typical usage
  * Some concepts of org-favtable
  * Installation and setup
  * A working example
  * The commands of org-favtable
  * Further Reading, Version, Contact

Hoping, this makes a good read.

best regards, Marc




[O] LaTeX with embedded in-line code blocks and AucTeX

2013-03-17 Thread Liam Healy
I am writing LaTeX in my org file with embedded code evaluation using
src_lang in-line code blocks (in my case, lang=lisp). This works fine
when using bare LaTeX for export, but I would like AUCTeX editing and
highlighting which are not available with bare LaTeX in the org file.
The only way I can see to get AUCTeX is to use a LaTeX source code
block; this does what I want, but now the inline code blocks are not
expanded; instead, they are exported literally to the LaTeX. Is there
a way to have an exportable LaTeX source code block that expands
in-line code blocks on export, or somehow have the AuCTeX editing
features with in-line src_lang code blocks that get expanded?

Example:

* This is an example
#+BEGIN_SRC latex :exports code :file example.pdf
This is an example.  The sum of 2 and 2 is $src_lisp{(+ 2 2)}$.
#+END_SRC

produces (removing a lot of preamble for clarity)

\begin{document}
\maketitle
\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}
\section{This is an example}
\label{sec-1}

This is an example.  The sum of 2 and 2 is $src_lisp{(+ 2 2)}$.

\end{document}

whereas

* This is an example
This is an example.  The sum of 2 and 2 is $src_lisp{(+ 2 2)}$.

produces

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}
\section{This is an example}
\label{sec-1}

This is an example.  The sum of 2 and 2 is $=4=$.

\end{document}

Is this a bug in org-mode, or is there some configuration I need to change?
Org-mode version 8.0-pre (release_8.0-pre-111-g7b3601)

Thanks,
Liam



Re: [O] org-babel src block generated graphics included twice if CAPTION is added

2013-03-17 Thread Jay Kerns
Greetings Li,

On Sun, Mar 17, 2013 at 9:10 AM, Li Bowen  wrote:
> Hi,
>
> If #+CAPTION is added, the figure will be included in the exported pdf
> file twice.
>
> #+begin_src R :exports both :results graphics :file img.pdf
> hist(rnorm(100))
> #+end_src
>
> #+CAPTION: Some description
> #+RESULTS:
> [[file:img.pdf]
>


For that particular example maybe the quickest way to get rid of the
extra figure (that is caption-less) would be to use ":exports code"
instead of ":exports both".

I hope this helps,

-- 
Jay



Re: [O] Confusion about attr_latex and new exporter

2013-03-17 Thread John Hendy
On Sun, Mar 17, 2013 at 4:57 PM, John Hendy  wrote:
> Just making the transition to the new exporter, finally, today. Just
> some notes regarding the documentation that I wanted to pass along. I
> think there's some possibly conflicting information (or at least
> ambiguous) out there.
>
> - From the Worg page on transitioning to the new exporter
> (http://orgmode.org/worg/org-8.0.html):
> #+begin_quote
>
> Attribute lines now take plists:
> #+attr_latex :width "5cm"
> #+attr_beamer :options "width=5cm"
>
> #+end_quote
>
> However, from a previous email, I think a caveat should be added, as I
> found the above misleading in trying my first test drive of the new
> exporter. I recalled an earlier response on the mailing list to an
> inquiry I had about the old exporter, which evolved into some
> discussion about the new one:
> - http://lists.gnu.org/archive/html/emacs-orgmode/2013-02/msg00850.html
>
> So, as this pertains to the transitioning guide: using =:width= as an
> example of the new syntax is perhaps a bad idea since it's heavily
> associated with #+attr_latex: width=Xcm for images and yet is
> incorrect for image attributes. At the very least, some further
> specification of the :width option should probably be referenced right
> then and there.
>
> Another fantastic quote one might consider adding, which really helped
> make things "click" for me is from the same thread a bit later:
> - http://lists.gnu.org/archive/html/emacs-orgmode/2013-02/msg00882.html
>
> #+begin_quote Nicolas
>
> An argument within curly brackets gets its own keyword. Optional arguments
> are stuffed within an `:options' keyword.
>
> #+end_quote
>
> That's quite helpful!
> - \begin{tabular}{align=blah} --> :align "blah" (curly gets :keyword)
> - \includegraphics[width=blah]{file.jpg} --> :options "width=blah"
> (optional gets :options)
>
> Now, even having digested some of this a bit better, using any syntax
> option (at least that I can tell is correct from the above) with
> quotes yields quotes in the resulting .tex file and a resultant fail
> of pdflatex compilation.
>
> In other words:
>
> - Org:
> attr_latex: :options "width=5cm"
> [[file.jpg]]
>
> - LaTeX:
> \includegraphics["width=5cm"]{file.jpg}
>
> - Org
> attr_latex: :align "lp{4cm}"
> | column 1 | column 2 |
>
> - LaTeX:
> \begin{tabular}{"lp{4cm}"}
>
> I also tried =:width "5cm"= for images. Despite this being options and
> sounding like it needs to be in the :options string instead of :width,
> it still works but quoted parts still get quotes =[width="5cm"]= in
> the resultant .tex file. If I remove quotes, it works. That's fine,
> but not sure if I'll ever run into any multi-word option occurrences
> where I'll possibly need quotes to differentiate one set of option
> values from another (don't think I've run into this before, but just
> thinking out loud).
>
> Am I doing something wrong if this is the behavior I'm getting, or is
> the documentation incorrect and I shouldn't be quoting these options?
>
>
> Thanks,
> John

Sigh. Just when I thought I'd done my due diligence, I [re]found this:
- http://comments.gmane.org/gmane.emacs.orgmode/68256

Which points to this:
- http://comments.gmane.org/gmane.emacs.orgmode/68011

Talk about a fairly massive amount of time to discover that it's
simply using the babel syntax =:width value= (no quotes). I'll state
that the announcement (second link above) is still confusing to me, as
Nicolas has stated:

#+begin_quote
>From the user POV, it removes necessity to quote or escape characters.
For example, these are now valid:

  #+attr_latex: :font \footnotesize :align |l|c|c|
  #+attr_foo: :prop var="value" :another-prop nil

#+end_quote

Thus, I would have expected =#+attr_latex :options width="value"= to
work, but it doesn't. Seems like :width is being treated specially, or
did I just not parse =:prop var="value"= correctly?


Thanks,
John



Re: [O] org-babel src block generated graphics included twice if CAPTION is added

2013-03-17 Thread Nick Dokos
Li Bowen  wrote:

> Hi, 
> 
> If #+CAPTION is added, the figure will be included in the exported pdf
> file twice. 
> 
> #+begin_src R :exports both :results graphics :file img.pdf
> hist(rnorm(100))
> #+end_src
> 
> #+CAPTION: Some description
> #+RESULTS:
> [[file:img.pdf]
> 
> Many thanks.
> 

I think the problem is that the code block does not "see" the previously
produced #RESULTS: (because of the intervening #CAPTION:), so when run
again it adds another #RESULTS: section.

I think the best way to deal with problems like this is to name your code blocks
(and results blocks).

Try the following:

--8<---cut here---start->8---
#+name: foo
#+begin_src R :exports both :results graphics :file img.pdf
hist(rnorm(100))
#+end_src

#+CAPTION: Some description
#+RESULTS: foo
[[file:img.pdf]]
--8<---cut here---end--->8---

Does it solve the problem?

Nick



Re: [O] Confusion about attr_latex and new exporter

2013-03-17 Thread Thomas S. Dye
Hi John,

John Hendy  writes:

>
> Am I doing something wrong if this is the behavior I'm getting, or is
> the documentation incorrect and I shouldn't be quoting these options?

Nicolas cleaned up the attribute syntax recently.  Previously, quotes
were needed and backslashes were escaped.  Now, quotes are not used and
backslashes don't need to be escaped.  Multi-word options are fine
without quotes.

hth,
Tom

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



Re: [O] Syntax of Org Babel ":results" header argument

2013-03-17 Thread Eric Schulte


Bastien  writes:

> Hi Sébastien,
>
> "Sebastien Vauban"
>  writes:
>
>> As there was no reaction to this, I'd like to bump it up. At least, to either
>> have a discussion on this, or a clearly stated "no go".
>
> I tend to agree with Jay here and I prefer the minimalist syntax,
> although values for the :results parameter are heterogeneous.
>

+1 for maintaining the existing concise syntax.

-- 
Eric Schulte
http://cs.unm.edu/~eschulte




Re: [O] org-babel src block generated graphics included twice if CAPTION is added

2013-03-17 Thread Jay Kerns
On Sun, Mar 17, 2013 at 6:21 PM, Nick Dokos  wrote:

[snip]

> I think the best way to deal with problems like this is to name your code 
> blocks (and results blocks).
>

[snip]

I can't speak for Li, but it works on my system and I like Nick's
solution better than mine.

Cheers,

-- 
Jay



Re: [O] Confusion about attr_latex and new exporter

2013-03-17 Thread John Hendy
On Sun, Mar 17, 2013 at 5:22 PM, Thomas S. Dye  wrote:
> Hi John,
>
> John Hendy  writes:
>
>>
>> Am I doing something wrong if this is the behavior I'm getting, or is
>> the documentation incorrect and I shouldn't be quoting these options?
>
> Nicolas cleaned up the attribute syntax recently.  Previously, quotes
> were needed and backslashes were escaped.  Now, quotes are not used and
> backslashes don't need to be escaped.  Multi-word options are fine
> without quotes.
>

Thanks, Tom. Having an issue, though. From what I've read/heard...
=:width= is used for all backends now? This seems to be indicated by
this pretty recent post as well:
- http://permalink.gmane.org/gmane.emacs.orgmode/68306

#+begin_quote Aaron Ecay

Eliminating subtleties is precisely the point of this change.  All(-ish)*
backends now use :width.

* As far as I’ve checked, HTML(+ derived backends) and LaTeX(+derived
backends).  If there are any that don’t, they should probably be patched
to do so as well.

#+end_quote

Using #+attr_html :width 200px results in  for me.

Why isn't :width for html being parsed into width="200px" ?

:options width="200px" works properly... but then again, I thought we
did away with :options var="value" syntax.

Just trying to keep up!


Thanks,
John

> hth,
> Tom
>
> --
> Thomas S. Dye
> http://www.tsdye.com



Re: [O] org-babel src block generated graphics included twice if CAPTION is added

2013-03-17 Thread John Hendy
On Sun, Mar 17, 2013 at 6:20 PM, Jay Kerns  wrote:
> On Sun, Mar 17, 2013 at 6:21 PM, Nick Dokos  wrote:
>
> [snip]
>
>> I think the best way to deal with problems like this is to name your code 
>> blocks (and results blocks).
>>
>
> [snip]
>
> I can't speak for Li, but it works on my system and I like Nick's
> solution better than mine.

This is my preferred syntax as well. This has come up before on the
list; essentially any #+options syntax before an un-named #+results
block will cause the results to be re-inserted. #+begin_center or any
#+attr_backend options result in the same duplicate insertion of
results.


Also, just in case it's not known, you don't have to manually name the
#+results block. Just create your babel block with a #+name: attribute
and when you run it with C-c C-c, a named #+result will automatically
be created.

John

>
> Cheers,
>
> --
> Jay
>



Re: [O] Confusion about attr_latex and new exporter

2013-03-17 Thread Thomas S. Dye
John Hendy  writes:

> Thanks, Tom. Having an issue, though. From what I've read/heard...
> =:width= is used for all backends now? This seems to be indicated by
> this pretty recent post as well:
> - http://permalink.gmane.org/gmane.emacs.orgmode/68306
>
> #+begin_quote Aaron Ecay
>
> Eliminating subtleties is precisely the point of this change.  All(-ish)*
> backends now use :width.
>
> * As far as I.ve checked, HTML(+ derived backends) and LaTeX(+derived
> backends).  If there are any that don.t, they should probably be patched
> to do so as well.
>
> #+end_quote
>
> Using #+attr_html :width 200px results in  alt="" /> for me.
>
> Why isn't :width for html being parsed into width="200px" ?
>
> :options width="200px" works properly... but then again, I thought we
> did away with :options var="value" syntax.
>
> Just trying to keep up!

You're ahead of me, John.  So far, I've used the latex and texinfo
exporters, but haven't looked at the others, so don't have a sense of
how uniform things might be across the backends.  I'm in awe of the
texinfo exporter, though.  It does a terrific job, AFAICT.

All the best,
Tom

-- 
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



Re: [O] org-babel src block generated graphics included twice if CAPTION is added

2013-03-17 Thread Eric Schulte
I just pushed up a patch which should allow code blocks to find un-named
results even when there are comment lines (such as #+options or
#+attr_backend) between the code block and the results.

Hope this helps,

John Hendy  writes:

> On Sun, Mar 17, 2013 at 6:20 PM, Jay Kerns  wrote:
>> On Sun, Mar 17, 2013 at 6:21 PM, Nick Dokos  wrote:
>>
>> [snip]
>>
>>> I think the best way to deal with problems like this is to name your code 
>>> blocks (and results blocks).
>>>
>>
>> [snip]
>>
>> I can't speak for Li, but it works on my system and I like Nick's
>> solution better than mine.
>
> This is my preferred syntax as well. This has come up before on the
> list; essentially any #+options syntax before an un-named #+results
> block will cause the results to be re-inserted. #+begin_center or any
> #+attr_backend options result in the same duplicate insertion of
> results.
>
>
> Also, just in case it's not known, you don't have to manually name the
> #+results block. Just create your babel block with a #+name: attribute
> and when you run it with C-c C-c, a named #+result will automatically
> be created.
>
> John
>
>>
>> Cheers,
>>
>> --
>> Jay
>>
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] Syntax of Org Babel ":results" header argument

2013-03-17 Thread Thomas S. Dye


Eric Schulte  writes:

> Bastien  writes:
>
>> Hi Sébastien,
>>
>> "Sebastien Vauban"
>>  writes:
>>
>>> As there was no reaction to this, I'd like to bump it up. At least, to 
>>> either
>>> have a discussion on this, or a clearly stated "no go".
>>
>> I tend to agree with Jay here and I prefer the minimalist syntax,
>> although values for the :results parameter are heterogeneous.
>>
>
> +1 for maintaining the existing concise syntax.

+1 for stable syntax.

Tom

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




Re: [O] [Out-of-Thread] Re: [RFC] Org syntax (draft)

2013-03-17 Thread zeltak
Hi all

i just finished a great conversation on #org-mode with some great people.
they told me about this thread and the planned changes that may or may not
occur to the syntax and id like to just raise the newbee perspective.

I find the ability to add custom emphasise with custom faces invaluable. i
find it very easy to add and very useful for me since i use ALOT of color
highlights in my academic work.

i really hope that there is some way to leave the current mphasise with
custom faces options as is


thx alot guys

Z


Re: [O] org-babel src block generated graphics included twice if CAPTION is added

2013-03-17 Thread John Hendy
On Sun, Mar 17, 2013 at 8:15 PM, Li Bowen  wrote:
> Thanks, John.
>
> I also noticed that #+options can lead to re-insertion.
>
> Your piece of instruction should go to the online documentation. It will
> save people hours of time from trouble-shooting. I suppose any one who
writes a report with figures using org-babel will face the same problem.

I've got some other changes to make to Worg... I'll look for a place to put
this as well, though Eric's patch probably makes this obsolete now! At
least your post, the nth inquiry about it to the mailing list, has gotten
us a patch! That counts for something!

By the way, I've run into this very thing before as well :)
- http://osdir.com/ml/emacs-orgmode-gnu/2012-07/msg00230.html

John

>
> John Hendy  writes:
>
>> On Sun, Mar 17, 2013 at 6:20 PM, Jay Kerns  wrote:
>>> On Sun, Mar 17, 2013 at 6:21 PM, Nick Dokos 
wrote:
>>>
>>> [snip]
>>>
 I think the best way to deal with problems like this is to name your
code blocks (and results blocks).

>>>
>>> [snip]
>>>
>>> I can't speak for Li, but it works on my system and I like Nick's
>>> solution better than mine.
>>
>> This is my preferred syntax as well. This has come up before on the
>> list; essentially any #+options syntax before an un-named #+results
>> block will cause the results to be re-inserted. #+begin_center or any
>> #+attr_backend options result in the same duplicate insertion of
>> results.
>>
>>
>> Also, just in case it's not known, you don't have to manually name the
>> #+results block. Just create your babel block with a #+name: attribute
>> and when you run it with C-c C-c, a named #+result will automatically
>> be created.
>>
>> John
>>
>>>
>>> Cheers,
>>>
>>> --
>>> Jay
>>>
>
> --
> Sincerely,
> Li Bowen.


Re: [O] org-babel src block generated graphics included twice if CAPTION is added

2013-03-17 Thread Achim Gratz
Eric Schulte writes:
> I just pushed up a patch which should allow code blocks to find
> un-named results even when there are comment lines (such as #+options
> or #+attr_backend) between the code block and the results.

Shouldn't babel use org-element for things like this?


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

DIY Stuff:
http://Synth.Stromeko.net/DIY.html