Re: [O] A book produced using Org

2015-09-21 Thread Grant Rettke
Thank you Vikas and Suvayu.
Grant Rettke
--
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
“All creativity is an extended form of a joke.” --Kay
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Mon, Sep 21, 2015 at 6:43 PM, Vikas Rawal
 wrote:
>
>> Where is your Emacs+OrgMode configuration file?
>>
>
> Have added details of my emacs setup to README.md in the repo.
>
> Vikas
>
>
>



Re: [O] A book produced using Org

2015-09-21 Thread Vikas Rawal

> Where is your Emacs+OrgMode configuration file?
> 

Have added details of my emacs setup to README.md in the repo.

Vikas






Re: [O] A book produced using Org

2015-09-21 Thread Suvayu Ali
On Mon, Sep 21, 2015 at 02:51:13PM -0500, Grant Rettke wrote:
> Where is your Emacs+OrgMode configuration file?
> 
> I want to see what it takes to compile using xelatex; utf8 support
> seems like a great idea.

Until recently, it used be just this:

;; remove "inputenc" from default packages as it clashes with xelatex
(setf org-latex-default-packages-alist
  (remove '("AUTO" "inputenc" t) org-latex-default-packages-alist))

;; replace fontenc, with fontspec
(let ((pos (position '("T1" "fontenc" t) ; T1 -> utf8 for pdflatex
 org-latex-default-packages-alist
 :test 'equal)))
  (if pos
  (setf (nth pos org-latex-default-packages-alist)
'("" "fontspec" t

(setq org-latex-pdf-process ; -shell-escape needed for minted
  '("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"xelatex -shell-escape -interaction nonstopmode -output-directory %o 
%f")
  ;; org-latex-pdf-process '("sh -v -x texi2dvi -p -b -c -V %f") ; 
historical
  ;; TODO: maybe use arara, that probably requires export changes
  )

After this patch from Rasmus:

  

it's as simple as adding a

  #+latex_program: xelatex

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [PATCH] ox-latex: Add scrartcl LaTeX class

2015-09-21 Thread Suvayu Ali
On Mon, Sep 21, 2015 at 11:45:08PM +0200, Rasmus wrote:
> Nicolas Goaziou  writes:
> 
> > Sebastian Boehm  writes:
> >
> >> I would like to propose adding the KOMA-script scrartcl class to the
> >> list of supported ox-latex classes. scrartcl is one of the most
> >> popular "article" alternatives out there and it would be great to be
> >> able to pass org files using scrartcl to other Org mode users without
> >> having to explain ox-latex custom settings.
> >>
> >> The attached patch changes ox-latex.el to include scrartcl in
> >> org-latex-classes.
> >
> > Thank you. But can't users needing a non-default class customize their
> > own `org-latex-classes? Or is there an entitling reason to offer it out
> > of the box?
> 
> It's absolutely a much more pleasant experience than article, at least if
> you agree with the KOMA-guys' margin opinion (e.g. top:bottom margin is
> fixed at 1:2).  [I've been using the KOMA-bundle for years and years].
> 
> The patch is also subjective, e.g. it does not feature \minisec[.]{.}.
> 
> ox-koma-article.el would be awesome but until then, there's no point in
> adding it.

I use scrartcl, but I think this should be left up to the end user.
ox-koma-article.el would be great though :).

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [PATCH] ox-latex: Add scrartcl LaTeX class

2015-09-21 Thread Rasmus
Nicolas Goaziou  writes:

> Hello,
>
> Sebastian Boehm  writes:
>
>> I would like to propose adding the KOMA-script scrartcl class to the
>> list of supported ox-latex classes. scrartcl is one of the most
>> popular "article" alternatives out there and it would be great to be
>> able to pass org files using scrartcl to other Org mode users without
>> having to explain ox-latex custom settings.
>>
>> The attached patch changes ox-latex.el to include scrartcl in
>> org-latex-classes.
>
> Thank you. But can't users needing a non-default class customize their
> own `org-latex-classes? Or is there an entitling reason to offer it out
> of the box?

It's absolutely a much more pleasant experience than article, at least if
you agree with the KOMA-guys' margin opinion (e.g. top:bottom margin is
fixed at 1:2).  [I've been using the KOMA-bundle for years and years].

The patch is also subjective, e.g. it does not feature \minisec[.]{.}.

ox-koma-article.el would be awesome but until then, there's no point in
adding it.

Rasmus

-- 
I feel emotional landscapes they puzzle me




Re: [O] org export outcomes differ from one attempt to the next

2015-09-21 Thread Nicolas Goaziou
Hello,

Eric S Fraga  writes:

> Actually, my settings are at the end of the whole 4000+ line file so I
> am not sure what you are suggesting I try.  If I delete the whole
> settings subtree, the exports all result in the same LaTeX.  However,
> that is of no use to me, obviously.  I guess I can try to add one line
> at a time to see when the export breaks.  I may try that tomorrow.

Providing a shorter test file would be helpful, no matter how much
settings you have.

> I guess I would like some insight into how the latex_header lines are
> parsed by org, maybe in org-element?

They are collected in `org-export--get-inbuffer-options' which is called
by `org-export-get-environment'.

IIRC, Robert Klein's problem was due to an explicit call to
`org-export-get-environment' at Babel evaluation time, before the buffer
was correctly prepared for export. If you call
`org-export-get-environment' within your settings, it may be related.


Regards,

-- 
Nicolas Goaziou



[O] Bug: The headers' anchors from custom ids should be at the beginning, and not at the end, of these headers [8.3.1 (8.3.1-129-ga7c8d2-elpa @ /home/bitouze/.emacs.d/elpa/org-20150921/)]

2015-09-21 Thread Denis Bitouzé


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.


The following org file:

#+begin_src org
* Heading with custom id
:PROPERTIES:
:CUSTOM_ID: custom-id-heading
:END:

* Heading bis with custom id and very very very very very very very very very 
very very very very very very very very very very very very very very very long 
text
:PROPERTIES:
:CUSTOM_ID: custom-id-heading-bis
:END:

See [[#custom-id-heading-bis][heading bis with custom id and very long text]].
#+end_src

is exported as markdown to:

#+begin_src markdown

Table of Contents


1. Heading with custom id
2. Heading bis with custom id and very 
very very very very very very very very very very very very very very very very 
very very very very very very very long text




# Heading with custom id

# Heading bis with custom id and very very very very very very very very very 
very very very very very very very very very very very very very very very long 
text

See [heading bis with custom id and very long text](#custom-id-heading-bis).
#+end_src

As you can see, the anchor in the .md file is at the end of the header and, in
case this header contains long text, clicking on a link to this anchor would
lead us to the end, eventually not at the first line, of this header.

The expected behavior would be:

#+begin_src markdown

Table of Contents


1. Heading with custom id
2. Heading bis with custom id and very 
very very very very very very very very very very very very very very very very 
very very very very very very very long text




# Heading with custom id

# Heading bis with custom id and very very 
very very very very very very very very very very very very very very very very 
very very very very very very long text

See [heading bis with custom id and very long text](#custom-id-heading-bis).
#+end_src

I didn't look at it but, from this point of view, I guess other exports are
suboptimal as well.

Emacs  : GNU Emacs 24.5.1 (i686-pc-linux-gnu, GTK+ Version 3.14.8)
 of 2015-06-29 on drums.chezmoi.fr
Package: Org-mode version 8.3.1 (8.3.1-129-ga7c8d2-elpa @ 
/home/bitouze/.emacs.d/elpa/org-20150921/)

current state:
==
(setq
 org-entities-user '(("nok" "{\\color{red}\\ding{55}}" nil "✘" "NOK"
  "NOK" "✘")
 ("ok" "{\\color{checkmark}\\ding{51}}" nil "✔"
  "OK" "OK" "✔")
 )
 org-enforce-todo-checkbox-dependencies t
 org-inlinetask-default-state "TODO"
 org-agenda-search-view-always-boolean t
 org-agenda-log-mode-items '(clock)
 org-latex-format-headline-function 'leuven--org-latex-format-headline
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-pretty-entities t
 org-latex-packages-alist '(("" "listings") ("" "xcolor") ("french" "babel"))
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-stuck-projects '("+LEVEL=2/-DONE" ("TODO" "STRT") nil "")
 org-refile-use-cache t
 org-clock-in-resume t
 org-clock-out-when-done nil
 org-log-states-order-reversed nil
 org-odt-preferred-output-format "doc"
 org-agenda-sticky t
 org-goto-interface 'outline-path-completion
 outline-minor-mode-hook '(leuven--outline-minor-mode-hook
   (lambda nil
(if (and outline-minor-mode (derived-mode-p (quote
 
emacs-lisp-mode)))
 (progn (hide-sublevels 1000)))
)
   )
 org-agenda-skip-scheduled-if-done t
 org-ellipsis " ►"
 org-clock-persist t
 org-archive-location "::* Archive"
 org-agenda-window-setup 'current-window
 org-adapt-indentation nil
 org-agenda-entry-text-leaders "   │ "
 org-agenda-scheduled-leaders '("Scheduled  " "   ")
 org-clock-mode-line-total 'all
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-agenda-exporter-settings '((ps-number-of-columns 1) (ps-landscape-mode t)
(htmlize-output-type (quote css)))
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-refile-targets '((nil :maxlevel . 4) (nil :maxlevel . 2))
 org-html-htmlize-output-type 'css
 org-modules &#x

Re: [O] org export outcomes differ from one attempt to the next

2015-09-21 Thread Eric S Fraga
On Monday, 21 Sep 2015 at 20:21, Robert Klein wrote:
> Hi,
>
> Eric S Fraga  wrote:
>
>> Following up on my own post, I thought I would illustrate what I get.
>> 
>> I've attached three screenshots:
>> 
>> 1. a snippet from the org file where I have a number of latex_header
>> lines.
>
> two things:
>
> - if your org version is the one stated in your mail footer
>   (release_8.3.1-234-g8c85c9), then it is 11 days old :)

Hi Robert,

thanks for your response.

I run multiple instances of emacs simultaneously, one of them
specifically for email, i.e. gnus, and that emacs instance was running a
previous version of org...  the tests were done with the latest version
(-252-).  sorry for the confusion.

> - anyway, this sounds similar to my issues in thread
>   http://article.gmane.org/gmane.emacs.orgmode/98428  (resolved, but
>   it wasn't really clear, /why/ the patch worked...)

I went through that thread and I'm not entirely sure if or how it
relates to my issue.  However, I tried going back to June (well before
the patch mentioned) and that version shows the same behaviour I am
seeing now but worse (more lines changing from one export to the next)
so maybe it is related.

> Does your
>   issue also happen, when you take only the beginning of your file up
>   to the first paragraph of the first heading (not marked
>   as :noexport:)?  This is not a /minimal/ minimal example, but if
>   you can post this plus the relevant parts of your setup, there is a
>   chance to reproduce and solve the issue.

Actually, my settings are at the end of the whole 4000+ line file so I
am not sure what you are suggesting I try.  If I delete the whole
settings subtree, the exports all result in the same LaTeX.  However,
that is of no use to me, obviously.  I guess I can try to add one line
at a time to see when the export breaks.  I may try that tomorrow.

I guess I would like some insight into how the latex_header lines are
parsed by org, maybe in org-element?  There is something strange going
on because every or most evaluations of the export dispatcher to LaTeX
lead to slightly different results.

Thanks again,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-234-g8c85c9



Re: [O] [PATCH] ox-latex: Add scrartcl LaTeX class

2015-09-21 Thread Nicolas Goaziou
Hello,

Sebastian Boehm  writes:

> I would like to propose adding the KOMA-script scrartcl class to the
> list of supported ox-latex classes. scrartcl is one of the most
> popular "article" alternatives out there and it would be great to be
> able to pass org files using scrartcl to other Org mode users without
> having to explain ox-latex custom settings.
>
> The attached patch changes ox-latex.el to include scrartcl in
> org-latex-classes.

Thank you. But can't users needing a non-default class customize their
own `org-latex-classes? Or is there an entitling reason to offer it out
of the box?

Regards,

-- 
Nicolas Goaziou



Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Grant Rettke
Might be nice to have properties attached to result blocks. That is a nice idea.
Grant Rettke
--
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
“All creativity is an extended form of a joke.” --Kay
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Mon, Sep 21, 2015 at 1:43 PM, Rainer M Krug  wrote:
> John Kitchin  writes:
>
>> Here is one approach:
>>
>> #+name: update-timestamp
>> #+BEGIN_SRC emacs-lisp :var data=""
>> (concat
>>  "Last run: "
>>  (format-time-string "[%Y-%m-%d %a %H:%M:%S]" (current-time))
>>  "\n" data)
>> #+END_SRC
>>
>>
>> #+BEGIN_SRC python :post update-timestamp(data=*this*)
>> print('hello')
>> #+END_SRC
>>
>> #+RESULTS:
>> : Last run: [2015-09-21 Mon 11:09:18]
>> : hello
>
> Thanks John - that looks nice and I like the idea of using
> (current-time) and the possibility to format the time string, but this
> info will be part of the export - and I only would like tho have the
> info in the org file and not in the exported document.
>
>
> Rainer
>
>>
>>
>>
>> Rainer M Krug writes:
>>
>>> Eric S Fraga  writes:
>>>
 On Monday, 21 Sep 2015 at 14:46, Rainer M Krug wrote:

 [...]

> Is it possible to set a timestamp (ur update it when it exists already)
> when a code block has been evaluated, so that I have e record when it
> was updated?

 Could you make use of the :post header argument to invoke emacs lisp and
 execute org-time-stamp-inactive in some way?
>>>
>>> Thanks - sounds possible? But if I just use
>>>
>>> ,
>>> | :post (org-time-stamp-inactive)
>>> `
>>>
>>> 1) an input is required and
>>> 2) the time stamp is inserted before the #+begin_src and makes the block
>>> invalid.
>>>
>>> How can I put the time stamp in the line after the #+end_src or possibly
>>> even in the same line, as this does not seem to have an impact on the
>>> source block?
>>>
>>> Thanks,
>>>
>>> Rainer
>>
>> --
>> Professor John Kitchin
>> Doherty Hall A207F
>> Department of Chemical Engineering
>> Carnegie Mellon University
>> Pittsburgh, PA 15213
>> 412-268-7803
>> @johnkitchin
>> http://kitchingroup.cheme.cmu.edu
>
> --
> 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



Re: [O] A book produced using Org

2015-09-21 Thread Grant Rettke
Where is your Emacs+OrgMode configuration file?

I want to see what it takes to compile using xelatex; utf8 support
seems like a great idea.
Grant Rettke
--
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
“All creativity is an extended form of a joke.” --Kay
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Mon, Sep 21, 2015 at 9:32 AM, Vikas Rawal
 wrote:
>
>>
>> The publisher usually works with InDesign, but was willing to let me deal
>> with production of the print-ready PDF if I could meet her specifications.
>
>
> Properties of the PDF mentions both Emacs and org mode :-)
>
>
> :)
>
>
> How did you get MinionPro into LaTeX?
>
>
> I use xelatex.
>
> Vikas
>



Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread John Kitchin
so picky ;) Maybe something like this will put that stamp in a comment
that won't export.

#+BEGIN_SRC emacs-lisp
(defun j-add-ts ()
  (save-excursion
(re-search-forward "#\\+END_SRC")
(forward-line)
(beginning-of-line)
(when (looking-at "# Last run:")
  (kill-line))
(insert (concat
 "# Last run: "
 (format-time-string "[%Y-%m-%d %a %H:%M:%S]" (current-time))


(add-hook 'org-babel-after-execute-hook
  'j-add-ts)

;(remove-hook 'org-babel-after-execute-hook
; 'j-add-ts)
#+END_SRC


Rainer M Krug writes:

> John Kitchin  writes:
>
>> Here is one approach:
>>
>> #+name: update-timestamp
>> #+BEGIN_SRC emacs-lisp :var data=""
>> (concat
>>  "Last run: "
>>  (format-time-string "[%Y-%m-%d %a %H:%M:%S]" (current-time))
>>  "\n" data)
>> #+END_SRC
>>
>>
>> #+BEGIN_SRC python :post update-timestamp(data=*this*)
>> print('hello')
>> #+END_SRC
>>
>> #+RESULTS:
>> : Last run: [2015-09-21 Mon 11:09:18]
>> : hello
>
> Thanks John - that looks nice and I like the idea of using
> (current-time) and the possibility to format the time string, but this
> info will be part of the export - and I only would like tho have the
> info in the org file and not in the exported document.
>
>
> Rainer
>
>>
>>
>>
>> Rainer M Krug writes:
>>
>>> Eric S Fraga  writes:
>>>
 On Monday, 21 Sep 2015 at 14:46, Rainer M Krug wrote:

 [...]

> Is it possible to set a timestamp (ur update it when it exists already)
> when a code block has been evaluated, so that I have e record when it
> was updated?

 Could you make use of the :post header argument to invoke emacs lisp and
 execute org-time-stamp-inactive in some way?
>>>
>>> Thanks - sounds possible? But if I just use
>>>
>>> ,
>>> | :post (org-time-stamp-inactive)
>>> `
>>>
>>> 1) an input is required and
>>> 2) the time stamp is inserted before the #+begin_src and makes the block
>>> invalid.
>>>
>>> How can I put the time stamp in the line after the #+end_src or possibly
>>> even in the same line, as this does not seem to have an impact on the
>>> source block?
>>>
>>> Thanks,
>>>
>>> Rainer
>>
>> --
>> Professor John Kitchin
>> Doherty Hall A207F
>> Department of Chemical Engineering
>> Carnegie Mellon University
>> Pittsburgh, PA 15213
>> 412-268-7803
>> @johnkitchin
>> http://kitchingroup.cheme.cmu.edu

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



[O] [PATCH] ox-latex: Add scrartcl LaTeX class

2015-09-21 Thread Sebastian Boehm
Hi Org mode devs,

I would like to propose adding the KOMA-script scrartcl class to the
list of supported ox-latex classes. scrartcl is one of the most
popular "article" alternatives out there and it would be great to be
able to pass org files using scrartcl to other Org mode users without
having to explain ox-latex custom settings.

The attached patch changes ox-latex.el to include scrartcl in org-latex-classes.

Best,
Sebastian


0001-ox-latex-Add-scrartcl-LaTeX-class.patch
Description: Binary data


Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Rainer M Krug
John Kitchin  writes:

> Here is one approach:
>
> #+name: update-timestamp
> #+BEGIN_SRC emacs-lisp :var data=""
> (concat
>  "Last run: "
>  (format-time-string "[%Y-%m-%d %a %H:%M:%S]" (current-time))
>  "\n" data)
> #+END_SRC
>
>
> #+BEGIN_SRC python :post update-timestamp(data=*this*)
> print('hello')
> #+END_SRC
>
> #+RESULTS:
> : Last run: [2015-09-21 Mon 11:09:18]
> : hello

Thanks John - that looks nice and I like the idea of using
(current-time) and the possibility to format the time string, but this
info will be part of the export - and I only would like tho have the
info in the org file and not in the exported document.


Rainer

>
>
>
> Rainer M Krug writes:
>
>> Eric S Fraga  writes:
>>
>>> On Monday, 21 Sep 2015 at 14:46, Rainer M Krug wrote:
>>>
>>> [...]
>>>
 Is it possible to set a timestamp (ur update it when it exists already)
 when a code block has been evaluated, so that I have e record when it
 was updated?
>>>
>>> Could you make use of the :post header argument to invoke emacs lisp and
>>> execute org-time-stamp-inactive in some way?
>>
>> Thanks - sounds possible? But if I just use
>>
>> ,
>> | :post (org-time-stamp-inactive)
>> `
>>
>> 1) an input is required and
>> 2) the time stamp is inserted before the #+begin_src and makes the block
>> invalid.
>>
>> How can I put the time stamp in the line after the #+end_src or possibly
>> even in the same line, as this does not seem to have an impact on the
>> source block?
>>
>> Thanks,
>>
>> Rainer
>
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu

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


signature.asc
Description: PGP signature


Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Rainer M Krug
jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) writes:

> Rainer M Krug writes:
>
>> Eric S Fraga  writes: 
>>
>>> On Monday, 21 Sep 2015 at 14:46, Rainer M Krug wrote: 
>>>
>>> [...] 
>>>
 Is it possible to set a timestamp (ur update it when it exists
 already) when a code block has been evaluated, so that I have e
 record when it was updated? 
>>>
>>> Could you make use of the :post header argument to invoke emacs
>>> lisp and execute org-time-stamp-inactive in some way? 
>>
>> Thanks - sounds possible? But if I just use 
>>
>> , | :post (org-time-stamp-inactive) ` 
>>
>> 1) an input is required and 2) the time stamp is inserted before the
>> #+begin_src and makes the block invalid. 
>>
>> How can I put the time stamp in the line after the #+end_src or
>> possibly even in the same line, as this does not seem to have an
>> impact on the source block?
>
> You could use the :epilogue header argument. Since you want after the
> #+end_src this is rather hackish:
>
> :epilogue (save-excursion (re-search-forward "END_SRC" nil nil 2)
> (org-insert-time-stamp (current-time) t t "\nEvaluated: " "\n"))
>
> It does not update the results, but it will show you all the results
> and when they were evaluated.
>
> If you want to keep only one set of results and do not mind having the
> timestamp before the #+BEGIN_SRC, you could use something like:
>
> :epilogue (save-excursion (if (re-search-backward "Last evaluated: "
> nil t) (kill-line 1)) (org-insert-time-stamp (current-time) t t "Last
> evaluated: " "\n"))

The :epilogue won't work, as the source code block is in R and the
epilogue is appended to the code.

But I will look at the elisp code

Thanks,

Rainer
>
> Best,

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


signature.asc
Description: PGP signature


Re: [O] org export outcomes differ from one attempt to the next

2015-09-21 Thread Robert Klein
Hi,

Eric S Fraga  wrote:

> Following up on my own post, I thought I would illustrate what I get.
> 
> I've attached three screenshots:
> 
> 1. a snippet from the org file where I have a number of latex_header
> lines.

two things:

- if your org version is the one stated in your mail footer
  (release_8.3.1-234-g8c85c9), then it is 11 days old :)

- anyway, this sounds similar to my issues in thread
  http://article.gmane.org/gmane.emacs.orgmode/98428  (resolved, but
  it wasn't really clear, /why/ the patch worked...)  Does your
  issue also happen, when you take only the beginning of your file up
  to the first paragraph of the first heading (not marked
  as :noexport:)?  This is not a /minimal/ minimal example, but if
  you can post this plus the relevant parts of your setup, there is a
  chance to reproduce and solve the issue.

Best regards
Robert



Re: [O] Bug: Custom id taken into account with html, but not with markdown, exports [8.3.1 (8.3.1-123-g823cad-elpa @ /home/bitouze/.emacs.d/elpa/org-20150914/)]

2015-09-21 Thread Denis Bitouzé


Le 21/09/15 à 08h30, Nicolas Goaziou  a écrit :

> Hello,
>
> Denis Bitouzé  writes:
>
>> BTW, do you agree with the other issue I reported:
>>
>> #+begin_src org
>> - A [[/rootsite/somepage/][(relative) page]].
>> - A [[/rootsite/somepage][(relative) page]].
>> #+end_src
>>
>> is exported as:
>>
>> #+begin_src markdown
>> -   A [(relative) page](file:///rootsite/somepage/).
>> -   A [(relative) page](file:///rootsite/somepage).
>> #+end_src
>>
>> whereas, IMHO, the expected behavior should be:
>>
>> #+begin_src markdown
>> -   A [(relative) page](/rootsite/somepage/).
>> -   A [(relative) page](/rootsite/somepage).
>> #+end_src
>
> Not really. If a link URI starts with "/", it is assumed to be an
> absolute file name.

Is it a shared rule? Using relative file names is rather common in
CMS...

And this rule is not the same applied for image files:

#+begin_src org
[[/rootsite/somepath/file.png]]
#+end_src

leads to:

#+begin_src markdown
![img](/rootsite/somepath/file.png)
#+end_src

and not to:

#+begin_src markdown
![img](file:///rootsite/somepath/file.png)
#+end_src

> Try prepending http:// to your URL.

#+begin_src org
- A [[http:///rootsite/somepage/][(relative) page]].
#+end_src

leads to:

#+begin_src markdown
[(relative) page](http:///rootsite/somepage/)
#+end_src

which is the interpreted as is when rendered as html page as:

#+begin_src html
http:///rootsite/somepage/";>(relative) page
#+end_src

hence isn't relevant.

Regards.
-- 
Denis




Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Jorge A. Alfaro-Murillo

Rainer M Krug writes:

Eric S Fraga  writes: 

On Monday, 21 Sep 2015 at 14:46, Rainer M Krug wrote: 

[...] 

Is it possible to set a timestamp (ur update it when it exists 
already) when a code block has been evaluated, so that I have 
e record when it was updated? 


Could you make use of the :post header argument to invoke emacs 
lisp and execute org-time-stamp-inactive in some way? 


Thanks - sounds possible? But if I just use 

, | :post (org-time-stamp-inactive) ` 

1) an input is required and 2) the time stamp is inserted before 
the #+begin_src and makes the block invalid. 

How can I put the time stamp in the line after the #+end_src or 
possibly even in the same line, as this does not seem to have an 
impact on the source block?


You could use the :epilogue header argument. Since you want after 
the #+end_src this is rather hackish:


:epilogue (save-excursion (re-search-forward "END_SRC" nil nil 2) 
(org-insert-time-stamp (current-time) t t "\nEvaluated: " "\n"))


It does not update the results, but it will show you all the 
results and when they were evaluated.


If you want to keep only one set of results and do not mind having 
the timestamp before the #+BEGIN_SRC, you could use something 
like:


:epilogue (save-excursion (if (re-search-backward "Last evaluated: 
" nil t) (kill-line 1)) (org-insert-time-stamp (current-time) t t 
"Last evaluated: " "\n"))


Best,
--
Jorge.




Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Rainer M Krug
Eric S Fraga  writes:

> On Monday, 21 Sep 2015 at 15:42, Rainer M Krug wrote:
>
> [...]
>
>> How can I put the time stamp in the line after the #+end_src or possibly
>> even in the same line, as this does not seem to have an impact on the
>> source block?
>
> Above my pay grade unfortunately ;-)  Sorry.
>
> Hopefully one of the emacs lisp gurus here will be able to help!

Thanks - and hopefully your pay grade will be upgraded.

Rainer

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


signature.asc
Description: PGP signature


[O] org export outcomes differ from one attempt to the next

2015-09-21 Thread Eric S Fraga
Hello all,

I'm pulling my hair out in frustration...

I have a very large org file that comprises my lectures for a whole
course.  This org file makes extensive use of LaTeX and therefore has
quite a number of latex_header directives.

I have a very strange situation: if I start emacs, visit the file and
export to beamer LaTeX and then export again to beamer LaTeX, the result
of both exports differs. The difference is that some of the latex_header
lines do not get exported in the second attempt.

I have just verified this with "emacs -Q", loading in ox-latex and
ob-octave, then exporting, renaming the target out of the way and
exporting again.  A diff shows 3 lines in the first file that are not in
the second and 4 lines in the second that are not in the first.

What I've noticed, and which surprised me, is that the order of the
lines written out in the LaTeX preamble does not match the order of the
latex_header lines in my org file.

I cannot post a minimal example as any time I try to create one, the
problem disappears.  What I would like is some suggestion of how I can
track the problem down.  This problem has existed for quite some time
without me realising that there was a pattern to it.

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-234-g8c85c9



Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread John Kitchin
Here is one approach:

#+name: update-timestamp
#+BEGIN_SRC emacs-lisp :var data=""
(concat
 "Last run: "
 (format-time-string "[%Y-%m-%d %a %H:%M:%S]" (current-time))
 "\n" data)
#+END_SRC


#+BEGIN_SRC python :post update-timestamp(data=*this*)
print('hello')
#+END_SRC

#+RESULTS:
: Last run: [2015-09-21 Mon 11:09:18]
: hello



Rainer M Krug writes:

> Eric S Fraga  writes:
>
>> On Monday, 21 Sep 2015 at 14:46, Rainer M Krug wrote:
>>
>> [...]
>>
>>> Is it possible to set a timestamp (ur update it when it exists already)
>>> when a code block has been evaluated, so that I have e record when it
>>> was updated?
>>
>> Could you make use of the :post header argument to invoke emacs lisp and
>> execute org-time-stamp-inactive in some way?
>
> Thanks - sounds possible? But if I just use
>
> ,
> | :post (org-time-stamp-inactive)
> `
>
> 1) an input is required and
> 2) the time stamp is inserted before the #+begin_src and makes the block
> invalid.
>
> How can I put the time stamp in the line after the #+end_src or possibly
> even in the same line, as this does not seem to have an impact on the
> source block?
>
> Thanks,
>
> Rainer

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



Re: [O] A book produced using Org

2015-09-21 Thread Vikas Rawal

I have put the source files at

https://github.com/vikasrawal/endingmalnutrition 


The repository does not contain the logo files and the cover files. These were 
not created in org. But everything else is there.

Thanks everyone for all the lovely compliments.

Vikas



Re: [O] A book produced using Org

2015-09-21 Thread Vikas Rawal

> 
> The publisher usually works with InDesign, but was willing to let me deal 
> with production of the print-ready PDF if I could meet her specifications.
> 
> Properties of the PDF mentions both Emacs and org mode :-)

:)

> 
> How did you get MinionPro into LaTeX? 
> 

I use xelatex.

Vikas



Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Eric S Fraga
On Monday, 21 Sep 2015 at 15:42, Rainer M Krug wrote:

[...]

> How can I put the time stamp in the line after the #+end_src or possibly
> even in the same line, as this does not seem to have an impact on the
> source block?

Above my pay grade unfortunately ;-)  Sorry.

Hopefully one of the emacs lisp gurus here will be able to help!

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-234-g8c85c9



Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Rainer M Krug
Eric S Fraga  writes:

> On Monday, 21 Sep 2015 at 14:46, Rainer M Krug wrote:
>
> [...]
>
>> Is it possible to set a timestamp (ur update it when it exists already)
>> when a code block has been evaluated, so that I have e record when it
>> was updated?
>
> Could you make use of the :post header argument to invoke emacs lisp and
> execute org-time-stamp-inactive in some way?

Thanks - sounds possible? But if I just use

,
| :post (org-time-stamp-inactive)
`

1) an input is required and
2) the time stamp is inserted before the #+begin_src and makes the block
invalid.

How can I put the time stamp in the line after the #+end_src or possibly
even in the same line, as this does not seem to have an impact on the
source block?

Thanks,

Rainer

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


signature.asc
Description: PGP signature


Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Eric S Fraga
On Monday, 21 Sep 2015 at 14:46, Rainer M Krug wrote:

[...]

> Is it possible to set a timestamp (ur update it when it exists already)
> when a code block has been evaluated, so that I have e record when it
> was updated?

Could you make use of the :post header argument to invoke emacs lisp and
execute org-time-stamp-inactive in some way?
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-234-g8c85c9



[O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Rainer M Krug
Hi

I have some code blocks which represent an sequence of
fitting-analysis-plotting. But Sometimes I am loosing track which code
blocks I have evaluated.

Is it possible to set a timestamp (ur update it when it exists already)
when a code block has been evaluated, so that I have e record when it
was updated?

Thanks,

Rainer
-- 
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


signature.asc
Description: PGP signature


Re: [O] All TODOs are equal, but some are more equal than others...

2015-09-21 Thread Eric S Fraga
On Sunday, 20 Sep 2015 at 13:54, Marcin Borkowski wrote:

[...]

> The problem is, I have two kinds of TODO items.  Some of them are things
> I should do ASAP (but not on a particular date, so they are not
> timestamped), and some of them are just ongoing projects, or
> articles/blog posts I want to write some day (but not "some indefinite
> day in the next 30 days", rather "some day within the next two months or
> so").
>
> Do any of you have a good way to differentiate between the two?
> I already have

Well, nothing in org forces you to put dates on TODO items...  and I
would argue that you shouldn't do so generally.  I schedule TODOs that I
can schedule.  All others (the "some day" ones), I leave undated.  I can
see the full list anytime by simply "C-c a t".

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-234-g8c85c9



Re: [O] Using the file as 1st level headline

2015-09-21 Thread Eric S Fraga
On Saturday, 19 Sep 2015 at 12:25, Suvayu Ali wrote:

[...]

> If you are using latex export, you should be able to get the above
> structure to work with a custom latex-class.  Here is an example:
>
> (add-to-list 'org-latex-classes
>'("withtodos" "\\documentclass[11pt]{scrreprt}"
>  (" %s" . " %s")

cute!  Love it.  Definitely out of the box thinking.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-234-g8c85c9



[O] funny bug if shifting scheduled items

2015-09-21 Thread Detlef Steuer

Hi all!

Met this funny bug in the morning.

(orgmode version: git from today)

Given the file

* Testappointment
  SCHEDULED: <2015-09-21 Mo 23:00-23:55>

If I now shift the *starttime* using shift-uparrow
the *endtime* goes to 24:00, 24:05 etc.

If I keep shifting the *endtime* goes from
24:55 to 24:00 again.

The *starttime* correctly rolls over to 0:00 .

Have a nice week

Detlef