[O] refontifying links

2015-11-24 Thread John Kitchin
Hi,

I am trying to find a nice way to change the color of some links. So far
the only solution I have found is to create a new face, and use
highlight-regexp to do it.

I would prefer to just use font-lock to change the color of the link. so
far I have not found a way to do that.

I have found the org-activate-plain-links, and org-font-lock-keywords
and the org-font-lock-hook, but so far have not figured out how to
overwrite the org-link face.

I am kind of looking for a general approach to fontifying here, but the
specific problem I want to solve is to be able to write:

[[color:Orangered1][Some text I want colored]] and have it show in my
buffer in Orangered1.

Any thoughts?


--
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] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps

2015-11-24 Thread sgeorgii .
Dear Gustav, Eric,


I was referred to your subject discussion in respect to my problem:

With new version of org-mode I am now unable to filter agenda to show
only non-tagged items:


> "sgeorgii ."  writes:
>
>> Hello!
>>
>> Having installed latest org 8.3.2 I am now having the subject problem:
>>
>> M-x org-agenda
>>
>> When in agenda:
>>
>> / (filter)
>>
>> TAB (filter by tag)
>>
>>  (without entering any tags for "Tag:" question)
>>
>> Before this gave me agenda view filtered to show only non-tagged items.
>> I believe this was right and just fine.
>>
>> Now I have error:
>>
>> Debugger entered--Lisp error: (args-out-of-range "" 0 1)
>>   org-agenda-filter-make-matcher-tag-exp(("+") 43)
>>   org-agenda-filter-make-matcher(("+") tag t)
>>   org-agenda-filter-apply(("+") tag t)
>>   org-agenda-filter-by-tag(nil)
>>   call-interactively(org-agenda-filter-by-tag nil nil)
>>   command-execute(org-agenda-filter-by-tag)

>
> I believe 6c6ae99 (org-agenda: Filtering in the agenda on grouptags,
> 2015-01-24) changed this behavior.  The discussion about these changes
> is here (sorry, the gmane web interface is down for me):
> https://lists.gnu.org/archive/html/emacs-orgmode/2015-01/msg00618.html
>
> org-agenda-filter-by-tag should be fixed to handle the empty tag case
> that causes the error above, either by behaving as before or by giving a
> clear error.  I haven't looked closely enough at the changes or the
> discussion to guess whether that commit intended to preserve the empty
> tag behavior you were relying on.  Is that behavior documented anywhere?
>
> --
> Kyle


Any help?



Re: [O] Unable to filter agenda to show only non-tagged items

2015-11-24 Thread sgeorgii .
Thank you Kyle. I wrote to that tread - hope they might be able to help me.
Regarding the above behavior being documented - I believe not. The
reason I believe it does not require specific documentation. Because
this is default behavior to filter by empty tag. How else would one
filter to get only non-tagged items in agenda? This way came to me
naturally and I used it ever since until it stopped working in recent
version of Org. Hope someone could get this use case incorporated or
advice on another way of filtering only non-tagged items in agenda.

On 24 November 2015 at 19:39, Kyle Meyer  wrote:
> Hello,
>
> "sgeorgii ."  writes:
>
>> Hello!
>>
>> Having installed latest org 8.3.2 I am now having the subject problem:
>>
>> M-x org-agenda
>>
>> When in agenda:
>>
>> / (filter)
>>
>> TAB (filter by tag)
>>
>>  (without entering any tags for "Tag:" question)
>>
>> Before this gave me agenda view filtered to show only non-tagged items.
>> I believe this was right and just fine.
>>
>> Now I have error:
>>
>> Debugger entered--Lisp error: (args-out-of-range "" 0 1)
>>   org-agenda-filter-make-matcher-tag-exp(("+") 43)
>>   org-agenda-filter-make-matcher(("+") tag t)
>>   org-agenda-filter-apply(("+") tag t)
>>   org-agenda-filter-by-tag(nil)
>>   call-interactively(org-agenda-filter-by-tag nil nil)
>>   command-execute(org-agenda-filter-by-tag)
>
> I believe 6c6ae99 (org-agenda: Filtering in the agenda on grouptags,
> 2015-01-24) changed this behavior.  The discussion about these changes
> is here (sorry, the gmane web interface is down for me):
> https://lists.gnu.org/archive/html/emacs-orgmode/2015-01/msg00618.html
>
> org-agenda-filter-by-tag should be fixed to handle the empty tag case
> that causes the error above, either by behaving as before or by giving a
> clear error.  I haven't looked closely enough at the changes or the
> discussion to guess whether that commit intended to preserve the empty
> tag behavior you were relying on.  Is that behavior documented anywhere?
>
> --
> Kyle



Re: [O] Table formula bug? (TBLFM line populated, but C-c = prompt is empty)

2015-11-24 Thread Cook, Malcolm
> > I just noticed that upon editing a table formula, C-u C-c C-c was updating 
> > all
 > but the first instance of formula (all but the first row).
 > >
 > > Org-mode version 8.3.2
 > >
 > > Could this be related issue?
 > 
 > If it was, I can't reproduce it with the latest pull that fixed my
 > reported issue (I'm now on Org-mode version 8.3.2
 > (release_8.3.2-342-g50359f @ /home/jwhendy/.elisp/org.git/lisp/)).
 > 
 > In my test, I used =$-1 + 2 for a column formula in row 1, populated
 > the column with C-u C-c C-c, and then changed row 3's entry to =$-1 +
 > 3. Issuing C-u C-c C-c properly updated all rows.

Hi John - thanks - must be finger trouble on my end - I can no longer reproduce 
it (but have updated org just for good measure anyway).

~Malcolm

 > 
 > 
 > John
 > 
 > >
 > >
 > >  > -Original Message-
 > >  > From: emacs-orgmode-bounces+mec=stowers@gnu.org
 > [mailto:emacs-
 > >  > orgmode-bounces+mec=stowers@gnu.org] On Behalf Of John Hendy
 > >  > Sent: Monday, November 23, 2015 5:57 PM
 > >  > To: John Hendy ; emacs-orgmode  >  > orgm...@gnu.org>
 > >  > Subject: Re: [O] Table formula bug? (TBLFM line populated, but C-c =
 > prompt
 > >  > is empty)
 > >  >
 > >  > Confirmed fixed -- thanks!
 > >  >
 > >  > John
 > >  >
 > >  > On Mon, Nov 23, 2015 at 4:24 PM, Nicolas Goaziou
 > 
 > >  > wrote:
 > >  > > Hello,
 > >  > >
 > >  > > John Hendy  writes:
 > >  > >
 > >  > >> I was just creating a table and using a formula, finding that C-c =
 > >  > >> did not bring up the formula, but acted like I was inputting one for
 > >  > >> the first time. I created a min-config and test file to see if this
 > >  > >> was something related to my setup, but it seems I can reproduce.
 > >  > >>
 > >  > >> Org-mode version 8.3.2 (release_8.3.2-338-g522ec9 @
 > >  > >> /home/jwhendy/.elisp/org.git/lisp/)
 > >  > >>
 > >  > >> #+begin_src min-config
 > >  > >> ;; set load paths
 > >  > >> ;; set load dirs and global config options
 > >  > >> (add-to-list 'load-path "~/.elisp/org.git/lisp/")
 > >  > >> (add-to-list 'load-path "~/.elisp/org.git/contrib/lisp")
 > >  > >> #+end_src
 > >  > >>
 > >  > >> Emacs started with =emacs -Q=, followed by =M-x load-file RET
 > >  > >> ~/Desktop/min-config RET=
 > >  > >>
 > >  > >> #+begin_src table-test.org
 > >  > >>
 > >  > >> * Headline
 > >  > >>
 > >  > >> | something | something else |
 > >  > >> |---+|
 > >  > >> | 1 |  3 |
 > >  > >> | 2 ||
 > >  > >> | 3 ||
 > >  > >> | 4 ||
 > >  > >> #+TBLFM: $2=1+2
 > >  > >>
 > >  > >> #+end_src
 > >  > >>
 > >  > >> I created the contents in row 1 col 2 by entering "=1+2 RET". With
 > >  > >> cursor in row 2 col 2, I press C-c = and see the attached (empty
 > >  > >> prompt for a column 2 formula). If I type in 1+2 and press return, 
 > > the
 > >  > >> TBLFM line changes to:
 > >  > >>
 > >  > >> #+TBLFM: $2=1+2::$$2=1+2
 > >  > >>
 > >  > >> If I go to row 3 and C-c = again, pressing RET to accept the default
 > >  > >> (maybe the formula is "stored" but just not displayed?), it changes 
 > > to
 > >  > >> (and nothing is put in row 3 col 2):
 > >  > >>
 > >  > >> #+TBLFM: $$2=1+2
 > >  > >>
 > >  > >> If I go to row 4 and do this one more time, pressing RET with empty
 > >  > >> formula, it leaves an empty TBLFM line under the table.
 > >  > >
 > >  > > Fixed. Thank you.
 > >  > >
 > >  > >
 > >  > > Regards,
 > >  > >
 > >  > > --
 > >  > > Nicolas Goaziou
 > >


Re: [O] Unable to filter agenda to show only non-tagged items

2015-11-24 Thread Kyle Meyer
Hello,

"sgeorgii ."  writes:

> Hello!
>
> Having installed latest org 8.3.2 I am now having the subject problem:
>
> M-x org-agenda
>
> When in agenda:
>
> / (filter)
>
> TAB (filter by tag)
>
>  (without entering any tags for "Tag:" question)
>
> Before this gave me agenda view filtered to show only non-tagged items.
> I believe this was right and just fine.
>
> Now I have error:
>
> Debugger entered--Lisp error: (args-out-of-range "" 0 1)
>   org-agenda-filter-make-matcher-tag-exp(("+") 43)
>   org-agenda-filter-make-matcher(("+") tag t)
>   org-agenda-filter-apply(("+") tag t)
>   org-agenda-filter-by-tag(nil)
>   call-interactively(org-agenda-filter-by-tag nil nil)
>   command-execute(org-agenda-filter-by-tag)

I believe 6c6ae99 (org-agenda: Filtering in the agenda on grouptags,
2015-01-24) changed this behavior.  The discussion about these changes
is here (sorry, the gmane web interface is down for me):
https://lists.gnu.org/archive/html/emacs-orgmode/2015-01/msg00618.html

org-agenda-filter-by-tag should be fixed to handle the empty tag case
that causes the error above, either by behaving as before or by giving a
clear error.  I haven't looked closely enough at the changes or the
discussion to guess whether that commit intended to preserve the empty
tag behavior you were relying on.  Is that behavior documented anywhere?

-- 
Kyle



Re: [O] add publish option :with-setupfile

2015-11-24 Thread Nicolas Goaziou
Hello,

Manuel Koell  writes:

> I would like to see such option so someone can create a setupfile with
> macros/options per project or target (component). The setupfiles can be
> located in the project directory then. I dont know how to set macros in
> publishing components. Otherwise, you'd have to insert the #+SETUPFILE
> option in each file manually.

I don't think there is a need for that. 

You can write a function prepending the SETUPFILE line you want to any
given Org document and add it to :publishing-function property.


Regards,

-- 
Nicolas Goaziou



Re: [O] interaction between org-latex-custom-lang-environments and name when exporting to latex

2015-11-24 Thread Alan Schmitt
Hi Rasmus,

On 2015-11-23 18:54, Rasmus  writes:

> Hi Alan,
>
> Alan Schmitt  writes:
>
>> What I propose is to have either a string or a function in
>> `org-latex-custom-lang-environments'. A string would be used as it is
>> currently, whereas a function would be applied. Here is what it could
>> look like:
>
> I think a format-string is fine, though I don’t oppose allowing a function
> as well.  I don’t foresee a great necessity of the latter, though.
>
> I'd use format-spec.  E.g. here’s how hyperref is filled
>
> (let ((template (plist-get info :latex-hyperref-template)))
>(and (stringp template)
> (format-spec template (org-latex--format-spec info

I did not know about `format-spec', it's really nice!

> Then the cdr of an element in org-latex-custom-lang-environments can be
> something like:
>
>\begin{%e}[label=%l, myfunkyoption=val]
> %c
> \end{%e}

What would "%e" be bound to? Since this is a customization for a given
source block, it should be fixed, so I think we only need "%l" and "%c".

> The only downside is that you’d have to somehow discriminate between the
> "old" case where the cdr is a single word denoting an environment.
> Something like this might work:
>
>   (string-match-p "\\`\\w+\\'" "hest1")

This was the main reason why I did not want to go that route. This said,
after understanding this regexp, I see how I can explain how the two
cases are distinguished in the docstring.

>> My main design question is what the arguments to the function should be.
>> I thought the formatted source code and label would work, but I'm
>> wondering if it may be better to simply give the `src-block' and `info'
>> arguments directly.
>
> Well, functions would be user written.  In general I’d favor info and
> src-block, but I don’t think it’s very user-friendly, as it requires quite
> some knowledge about how ox works.  Also, when using such functions, the
> user would have to write a lot of boilerplate to get e.g . the label.

Yes. I'll give the template string a try and will report back.

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ (Updated November 22, 2015, Mauna Loa Obs.): 400.35 ppm


signature.asc
Description: PGP signature


Re: [O] org-preview-latex-fragment for @@latex:stuff@@?

2015-11-24 Thread Eric S Fraga
On Monday, 23 Nov 2015 at 14:42, John Kitchin wrote:
> True enough! I wasn't thinking very large when I had the question in
> mind! I end up with a lot of chemical formulas like this
> @@latex:\ce{H_{2}O}@@  in my writing because the {} inside the {} makes

OT but just wondering: shouldn't this be @@latex:\ce{H2O}@@?  And this
would work just fine without the @@ directive for LaTeX export at least.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-215-gb4af3f



[O] Unable to filter agenda to show only non-tagged items

2015-11-24 Thread sgeorgii .
Hello!

Having installed latest org 8.3.2 I am now having the subject problem:

M-x org-agenda

When in agenda:

/ (filter)

TAB (filter by tag)

 (without entering any tags for "Tag:" question)

Before this gave me agenda view filtered to show only non-tagged items.
I believe this was right and just fine.

Now I have error:

Debugger entered--Lisp error: (args-out-of-range "" 0 1)
  org-agenda-filter-make-matcher-tag-exp(("+") 43)
  org-agenda-filter-make-matcher(("+") tag t)
  org-agenda-filter-apply(("+") tag t)
  org-agenda-filter-by-tag(nil)
  call-interactively(org-agenda-filter-by-tag nil nil)
  command-execute(org-agenda-filter-by-tag)

I am using the latest org package available via package manager as of
this morning.

Any help?



Re: [O] org-preview-latex-fragment for @@latex:stuff@@?

2015-11-24 Thread John Kitchin
It can be, but a more typical one I use is \ce{Cu_{1-x}Pd_{x}} and that has
to be wrapped in @@latex:...@@.

John

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


On Tue, Nov 24, 2015 at 4:00 AM, Eric S Fraga  wrote:

> On Monday, 23 Nov 2015 at 14:42, John Kitchin wrote:
> > True enough! I wasn't thinking very large when I had the question in
> > mind! I end up with a lot of chemical formulas like this
> > @@latex:\ce{H_{2}O}@@  in my writing because the {} inside the {} makes
>
> OT but just wondering: shouldn't this be @@latex:\ce{H2O}@@?  And this
> would work just fine without the @@ directive for LaTeX export at least.
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-215-gb4af3f
>


[O] LATEX text in figure environment

2015-11-24 Thread Rainer M Krug
Hi

I want to add a todo note (from the todonotes package) in a figure
environment. What I want should look as follow, so that the to note sits
in the environment (based on [http://tex.stackexchange.com/a/256802/6941]
):

,
| \begin{figure}[htb]
| \centering
| \includegraphics[width=.9\linewidth]{fig-strategies.pdf}
| \caption{from \cite{Roura-Pascual2009_rmkc}}
| \todo[inline]{This figure needs to be redone and further info added}
| \end{figure}
`

I tried

--8<---cut here---start->8---
#+LATEX: \todo[inline]{This figure needs to be redone and further info added}
#+CAPTION: from cite:Roura-Pascual2009_rmkc
[[file:fig-strategies.pdf]]
--8<---cut here---end--->8---

but this results in the todo being outside the environment:

,
| \todo[inline]{This figure needs to be redone and further info added}
| \begin{figure}[htb]
| \centering
| \includegraphics[width=.9\linewidth]{fig-strategies.pdf}
| \caption{from \cite{Roura-Pascual2009_rmkc}}
| \end{figure}
`

--8<---cut here---start->8---
#+CAPTION: from cite:Roura-Pascual2009_rmkc
[[file:fig-strategies.pdf]]
#+LATEX: \todo[inline]{This figure needs to be redone and further info added}
--8<---cut here---end--->8---

resulting in the todo being behind the environment and

--8<---cut here---start->8---
#+CAPTION: from cite:Roura-Pascual2009_rmkc
#+LATEX: \todo[inline]{This figure needs to be redone and further info added}
[[file:fig-strategies.pdf]]
--8<---cut here---end--->8---

resulting in no environment at all (as #+CAPTION is not before the
figure).

At the moment I am using


--8<---cut here---start->8---
#+begin_figure
{{{if-latex-else([[file:fig-strategies.pdf]], [[file:fig-strategies.png]])}}}
#+LATEX: \caption{from \cite{Roura-Pascual2009_rmkc}}
#+LATEX: \todo[inline]{This figure needs to be redone and further info added}
#+end_figure
--8<---cut here---end--->8---

which gives me what I want:


,
| \begin{figure}
| \includegraphics[width=.9\linewidth]{fig-strategies.pdf}
| \caption{from \cite{Roura-Pascual2009_rmkc}}
| \todo[inline]{This figure needs to be redone and further info added}
| \end{figure}
`

But it is really not org-ish (caption specified as LaTeX, citation as
latex, environment specified).

Is there a way to achieve this more org like? Am I missing some #+?

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] LATEX text in figure environment

2015-11-24 Thread Andreas Leha
Hi Rainer,

Rainer M Krug  writes:
> Hi
>
> I want to add a todo note (from the todonotes package) in a figure
> environment. What I want should look as follow, so that the to note sits
> in the environment (based on [http://tex.stackexchange.com/a/256802/6941]
> ):
>
> ,
> | \begin{figure}[htb]
> | \centering
> | \includegraphics[width=.9\linewidth]{fig-strategies.pdf}
> | \caption{from \cite{Roura-Pascual2009_rmkc}}
> | \todo[inline]{This figure needs to be redone and further info added}
> | \end{figure}
> `
>
> I tried
>
> #+LATEX: \todo[inline]{This figure needs to be redone and further info added}
> #+CAPTION: from cite:Roura-Pascual2009_rmkc
> [[file:fig-strategies.pdf]]
>
>
> but this results in the todo being outside the environment:
>
> ,
> | \todo[inline]{This figure needs to be redone and further info added}
> | \begin{figure}[htb]
> | \centering
> | \includegraphics[width=.9\linewidth]{fig-strategies.pdf}
> | \caption{from \cite{Roura-Pascual2009_rmkc}}
> | \end{figure}
> `
>
> #+CAPTION: from cite:Roura-Pascual2009_rmkc
> [[file:fig-strategies.pdf]]
> #+LATEX: \todo[inline]{This figure needs to be redone and further info added}
>
>
> resulting in the todo being behind the environment and
>
> #+CAPTION: from cite:Roura-Pascual2009_rmkc
> #+LATEX: \todo[inline]{This figure needs to be redone and further info added}
> [[file:fig-strategies.pdf]]
>
>
> resulting in no environment at all (as #+CAPTION is not before the
> figure).
>
> At the moment I am using
>
> #+begin_figure
> {{{if-latex-else([[file:fig-strategies.pdf]], [[file:fig-strategies.png]])}}}
> #+LATEX: \caption{from \cite{Roura-Pascual2009_rmkc}}
> #+LATEX: \todo[inline]{This figure needs to be redone and further info added}
> #+end_figure
>
> which gives me what I want:
>
>
> ,
> | \begin{figure}
> | \includegraphics[width=.9\linewidth]{fig-strategies.pdf}
> | \caption{from \cite{Roura-Pascual2009_rmkc}}
> | \todo[inline]{This figure needs to be redone and further info added}
> | \end{figure}
> `
>
> But it is really not org-ish (caption specified as LaTeX, citation as
> latex, environment specified).
>
> Is there a way to achieve this more org like? Am I missing some #+?
>

Does this do what you want?

#+ATTR_LATEX: :caption \caption{from 
cite:Roura-Pascual2009_rmkc}\todo[inline]{This figure needs to be redone and 
further info added}
[[file:fig-strategies.pdf]]

Best,
Andreas




Re: [O] LATEX text in figure environment

2015-11-24 Thread Andreas Leha
Rainer M Krug  writes:
> Rasmus  writes:
>
>> Rainer M Krug  writes:
>>
>>> Hi
>>>
>>> I want to add a todo note (from the todonotes package) in a figure
>>> environment. What I want should look as follow, so that the to note sits
>>> in the environment (based on [http://tex.stackexchange.com/a/256802/6941]
>>> ):
>>>
>>> ,
>>> | \begin{figure}[htb]
>>> | \centering
>>> | \includegraphics[width=.9\linewidth]{fig-strategies.pdf}
>>> | \caption{from \cite{Roura-Pascual2009_rmkc}}
>>> | \todo[inline]{This figure needs to be redone and further info added}
>>> | \end{figure}
>>> `
>>
>> This works up to the order of caption and the todo macro.
>>
>> #+caption: from \cite{Roura-Pascual2009_rmkc}
>> #+begin_figure
>> [[file:fig-strategies.pdf]]
>> #+latex: \todo[inline]{This figure needs to be redone and further info added}
>> #+end_figure
>
> Thanks,
>
> Rainer

Hi Rainer,

And if you do not mind the todonote in the caption (should work, I
guess) this might work as well:

#+CAPTION: from cite:Roura-Pascual2009_rmkc @@latex:\todo[inline]{This figure 
needs to be redone and further info added}@@
[[file:fig-strategies.pdf]]

Best,
Andreas





[O] Problems with org publish cache checking

2015-11-24 Thread Matt Lundin
I've been doing some testing of org-publish functions and have found a
few problems with org-publish-cache-file-needs-publishing. They arise
from the fact that it attempts to take included files into account.

The logic is simple enough: while a file may not have changed, the files
it includes may have. So during the publishing process the function
scans every file in a project for #+INCLUDE keywords, comparing the last
modified time of those included files against the timestamps of the
included files stored in the cache. However, there are several
limitations:

1. Unlike org-export-expand-include-keyword,
   org-publish-cache-file-needs-publishing takes no account of recursive
   includes: i.e., included files within included files.

2. It does not cache timestamps for included files that are not also
   project files (i.e.,, files stored outside of the project or excluded
   via the :exclude plist option). Since org-publish caches the
   timestamps of only those files that are published directly (i.e., not
   as includes), the result is that files that files that include files
   outside of a publishing project are always republished. 
   
3. It is slow!!! The function visits every file in a project to check
   for #+INCLUDE declarations, thus offsetting much of the benefit of
   caching timestamps. To test this, I created a dummy project with over
   1000 pages (not typical usage, of course, but possible for someone
   writing a blog over several years or creating a large interlinked
   wiki).

   During the first publishing run on an old (2007) duo-core machine,
   org-mode generated the entire site in 3 minutes (not bad). However,
   over 40 seconds of that time was spent by
   org-publish-cache-file-needs-publishing (something that is entirely
   redundant on the first publishing run).

--8<---cut here---start->8---
 org-publish-all  1   180.82396367  180.82396367
 org-publish-projects 1   180.82375580  180.82375580
 org-publish-file 1008180.41644274  0.1789845662
 org-publish-org-to   1000138.45729874  0.1384572987
 org-publish-needed-p 100841.538426420  0.0412087563
 org-publish-cache-file-needs-publishing  100841.210540305  0.040883472
--8<---cut here---end--->8---

  During subsequent runs, publishing still took over 40 seconds, despite
  the existence of the cache. This is chiefly because
  org-publishing-cache-file-needs-publishing checks every file for includes:

--8<---cut here---start->8---
 org-publish-all  1   41.335711491  41.335711491
 org-publish-projects 1   41.335444938  41.335444938
 org-publish-file 100840.918752137  0.0405940001
 org-publish-needed-p 100840.669991543  0.0403472138
 org-publish-cache-file-needs-publishing  100840.566117665  0.040244164
--8<---cut here---end--->8---

Perhaps the simplest solution to all this would be to give users an
option to turn off checking for #+INCLUDE declarations. This would
reduce subsequent publishing runs to a mere second, so long as one does
not use included files.

A more complex solution would be to cache the names of included files
and to store timestamps for the included files if they are outside of
the project (optionally including recursive logic). I am still trying to
figure out the best way to do this.

Advice on how to proceed would be greatly appreciated.

Thanks,
Matt




[O] @@latex:...@@ syntax - where can I find info on it?

2015-11-24 Thread Rainer M Krug
Hi

I read at tha moment a lot of mails here regarding the @@latex:...@@ (or
@@html:...@@) syntax. I understand d=that these fragments are only
inserted when the corresponding backend is used - correct?

Where can I find further information on this? i in the org-info file
does not give anything (except C-@ which is something completely
different) and googling also nothing?

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] @@latex:...@@ syntax - where can I find info on it?

2015-11-24 Thread Rainer M Krug
Andreas Leha  writes:

> Hi Rainer,
>
> Rainer M Krug  writes:
>> Hi
>>
>> I read at tha moment a lot of mails here regarding the @@latex:...@@ (or
>> @@html:...@@) syntax. I understand d=that these fragments are only
>> inserted when the corresponding backend is used - correct?
>>
>> Where can I find further information on this? i in the org-info file
>> does not give anything (except C-@ which is something completely
>> different) and googling also nothing?
>>
>
> I am not aware of a central place for this.  But it is mentioned in
> the backend specific manual pages of section 12.  For instance
> [[http://orgmode.org/manual/Quoting-LaTeX-code.html#Quoting-LaTeX-code][Section
> 12.7.4 Quoting LaTeX code]] for the latex case.

Thanks - They should be somewhere listed, as they seem to be a very
useful construct. 

I assume, replacing "latex" with any export backend name (e.g. html or odt), 
will do the
same for the other backend?

Thanks a lot,

Rainer

>
> Best,
> Andreas
>
>

-- 
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] @@latex:...@@ syntax - where can I find info on it?

2015-11-24 Thread Andreas Leha
Hi Rainer,

Rainer M Krug  writes:
> Hi
>
> I read at tha moment a lot of mails here regarding the @@latex:...@@ (or
> @@html:...@@) syntax. I understand d=that these fragments are only
> inserted when the corresponding backend is used - correct?
>
> Where can I find further information on this? i in the org-info file
> does not give anything (except C-@ which is something completely
> different) and googling also nothing?
>

I am not aware of a central place for this.  But it is mentioned in
the backend specific manual pages of section 12.  For instance
[[http://orgmode.org/manual/Quoting-LaTeX-code.html#Quoting-LaTeX-code][Section
12.7.4 Quoting LaTeX code]] for the latex case.

Best,
Andreas




Re: [O] org-preview-latex-fragment for @@latex:stuff@@?

2015-11-24 Thread Eric S Fraga
On Tuesday, 24 Nov 2015 at 05:57, John Kitchin wrote:
> It can be, but a more typical one I use is \ce{Cu_{1-x}Pd_{x}} and that has
> to be wrapped in @@latex:...@@.

Ah, of course!  Sorry for the noise.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3beta-1229-ge900eb



Re: [O] LATEX text in figure environment

2015-11-24 Thread Rainer M Krug
Andreas Leha  writes:

> Hi Rainer,
>
> Rainer M Krug  writes:
>> Hi
>>
>> I want to add a todo note (from the todonotes package) in a figure
>> environment. What I want should look as follow, so that the to note sits
>> in the environment (based on [http://tex.stackexchange.com/a/256802/6941]
>> ):
>>
>> ,
>> | \begin{figure}[htb]
>> | \centering
>> | \includegraphics[width=.9\linewidth]{fig-strategies.pdf}
>> | \caption{from \cite{Roura-Pascual2009_rmkc}}
>> | \todo[inline]{This figure needs to be redone and further info added}
>> | \end{figure}
>> `
>>
>> I tried
>>
>> #+LATEX: \todo[inline]{This figure needs to be redone and further info added}
>> #+CAPTION: from cite:Roura-Pascual2009_rmkc
>> [[file:fig-strategies.pdf]]
>>
>>
>> but this results in the todo being outside the environment:
>>
>> ,
>> | \todo[inline]{This figure needs to be redone and further info added}
>> | \begin{figure}[htb]
>> | \centering
>> | \includegraphics[width=.9\linewidth]{fig-strategies.pdf}
>> | \caption{from \cite{Roura-Pascual2009_rmkc}}
>> | \end{figure}
>> `
>>
>> #+CAPTION: from cite:Roura-Pascual2009_rmkc
>> [[file:fig-strategies.pdf]]
>> #+LATEX: \todo[inline]{This figure needs to be redone and further info added}
>>
>>
>> resulting in the todo being behind the environment and
>>
>> #+CAPTION: from cite:Roura-Pascual2009_rmkc
>> #+LATEX: \todo[inline]{This figure needs to be redone and further info added}
>> [[file:fig-strategies.pdf]]
>>
>>
>> resulting in no environment at all (as #+CAPTION is not before the
>> figure).
>>
>> At the moment I am using
>>
>> #+begin_figure
>> {{{if-latex-else([[file:fig-strategies.pdf]], [[file:fig-strategies.png]])}}}
>> #+LATEX: \caption{from \cite{Roura-Pascual2009_rmkc}}
>> #+LATEX: \todo[inline]{This figure needs to be redone and further info added}
>> #+end_figure
>>
>> which gives me what I want:
>>
>>
>> ,
>> | \begin{figure}
>> | \includegraphics[width=.9\linewidth]{fig-strategies.pdf}
>> | \caption{from \cite{Roura-Pascual2009_rmkc}}
>> | \todo[inline]{This figure needs to be redone and further info added}
>> | \end{figure}
>> `
>>
>> But it is really not org-ish (caption specified as LaTeX, citation as
>> latex, environment specified).
>>
>> Is there a way to achieve this more org like? Am I missing some #+?
>>
>
> Does this do what you want?
>
> #+ATTR_LATEX: :caption \caption{from
> cite:Roura-Pascual2009_rmkc}\todo[inline]{This figure needs to be
> redone and further info added}
> [[file:fig-strategies.pdf]]


Yup - partly after removing the line breaks:

,
| \begin{figure}[htb]
| \centering
| \includegraphics[width=.9\linewidth]{fig-strategies.pdf}
| \caption{from cite:Roura-Pascual2009_rmkc} \todo[inline]{This figure needs to 
be redone and further info added}
| \end{figure}
`

The problem is, if I use the org-ref syntax in a latex fragment, it does
not get expanded properly, and the underscore is interpreted as a math symbol.

I now use

--8<---cut here---start->8---
From \protect\cite{Roura-Pascual2009_rmkc
--8<---cut here---end--->8---

as my caption. This works, but is still really LaTeXish (the reference)

Thanks,

Rainer

>
> Best,
> Andreas
>
>

-- 
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] @@latex:...@@ syntax - where can I find info on it?

2015-11-24 Thread Rasmus
Rainer M Krug  writes:

> Andreas Leha  writes:
>
>> Hi Rainer,
>>
>> Rainer M Krug  writes:
>>> Hi
>>>
>>> I read at tha moment a lot of mails here regarding the @@latex:...@@ (or
>>> @@html:...@@) syntax. I understand d=that these fragments are only
>>> inserted when the corresponding backend is used - correct?
>>>
>>> Where can I find further information on this? i in the org-info file
>>> does not give anything (except C-@ which is something completely
>>> different) and googling also nothing?
>>>
>>
>> I am not aware of a central place for this.  But it is mentioned in
>> the backend specific manual pages of section 12.  For instance
>> [[http://orgmode.org/manual/Quoting-LaTeX-code.html#Quoting-LaTeX-code][Section
>> 12.7.4 Quoting LaTeX code]] for the latex case.
>
> Thanks - They should be somewhere listed, as they seem to be a very
> useful construct. 
>
> I assume, replacing "latex" with any export backend name (e.g. html or odt), 
> will do the
> same for the other backend?

Yes.  They are called export snippet and typically handled by
org-BACKEND-export-snippet, e.g. org-html-export-snippet.

If you find that documentation in this area should be expanded, you could
provide a patch to org.texi :)

Rasmus

-- 
Even a three-legged dog has three good legs to lose




Re: [O] LATEX text in figure environment

2015-11-24 Thread Rasmus
Rainer M Krug  writes:

> Hi
>
> I want to add a todo note (from the todonotes package) in a figure
> environment. What I want should look as follow, so that the to note sits
> in the environment (based on [http://tex.stackexchange.com/a/256802/6941]
> ):
>
> ,
> | \begin{figure}[htb]
> | \centering
> | \includegraphics[width=.9\linewidth]{fig-strategies.pdf}
> | \caption{from \cite{Roura-Pascual2009_rmkc}}
> | \todo[inline]{This figure needs to be redone and further info added}
> | \end{figure}
> `

This works up to the order of caption and the todo macro.

#+caption: from \cite{Roura-Pascual2009_rmkc}
#+begin_figure
[[file:fig-strategies.pdf]]
#+latex: \todo[inline]{This figure needs to be redone and further info added}
#+end_figure

Rasmus

-- 
9000!




Re: [O] LATEX text in figure environment

2015-11-24 Thread Rainer M Krug
Rasmus  writes:

> Rainer M Krug  writes:
>
>> Hi
>>
>> I want to add a todo note (from the todonotes package) in a figure
>> environment. What I want should look as follow, so that the to note sits
>> in the environment (based on [http://tex.stackexchange.com/a/256802/6941]
>> ):
>>
>> ,
>> | \begin{figure}[htb]
>> | \centering
>> | \includegraphics[width=.9\linewidth]{fig-strategies.pdf}
>> | \caption{from \cite{Roura-Pascual2009_rmkc}}
>> | \todo[inline]{This figure needs to be redone and further info added}
>> | \end{figure}
>> `
>
> This works up to the order of caption and the todo macro.
>
> #+caption: from \cite{Roura-Pascual2009_rmkc}
> #+begin_figure
> [[file:fig-strategies.pdf]]
> #+latex: \todo[inline]{This figure needs to be redone and further info added}
> #+end_figure

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] interaction between org-latex-custom-lang-environments and name when exporting to latex

2015-11-24 Thread Rasmus
Hi,

Alan Schmitt  writes:

>> Then the cdr of an element in org-latex-custom-lang-environments can be
>> something like:
>>
>>\begin{%e}[label=%l, myfunkyoption=val]
>> %c
>> \end{%e}
>
> What would "%e" be bound to? Since this is a customization for a given
> source block, it should be fixed, so I think we only need "%l" and "%c".

You are right on the %e of course.  You should check the things we bind in
the top let-binding.  The useful ones should be accessible.  A quick
guess (you’ll have to decide):

- lang
- caption
- label
- float
- perhaps more from attributes?


>> The only downside is that you’d have to somehow discriminate between the
>> "old" case where the cdr is a single word denoting an environment.
>> Something like this might work:
>>
>>   (string-match-p "\\`\\w+\\'" "hest1")
>
> This was the main reason why I did not want to go that route. This said,
> after understanding this regexp, I see how I can explain how the two
> cases are distinguished in the docstring.

Perhaps it’s safer to use [[:alnum:]] or even [a-zA-Z0-9].  \w follows the
syntax table which might go weird, though I’m not sure how.

>> Well, functions would be user written.  In general I’d favor info and
>> src-block, but I don’t think it’s very user-friendly, as it requires quite
>> some knowledge about how ox works.  Also, when using such functions, the
>> user would have to write a lot of boilerplate to get e.g . the label.
>
> Yes. I'll give the template string a try and will report back.

Thanks Alan!

Rasmus

-- 
Warning: Everything saved will be lost