Re: [O] How to do proper folding and semantic markup

2016-04-03 Thread Adam Porter
Hi Eduardo,

Just a note, you mentioned that you find the folding very useful, so you
might want to try out the org-tree-to-indirect-buffer command.  It's very
helpful when you're working on a large Org file and only want to work on
certain parts of it.  I don't see it mentioned often, so I'm not sure many
people are aware of it (there's always something else to learn about Org!).




[O] Update to org-protocol-capture-html

2016-04-03 Thread Adam Porter
Hi,

Just a note to let you all know that I've updated org-protocol-capture-html:

https://github.com/alphapapa/org-protocol-capture-html

I've improved the instructions, and I added support for python-readability,
which extracts articles from web pages.  This makes it easy to quickly
capture a web page into Emacs as org-mode content.




Re: [O] org-ref, abstracts

2016-04-03 Thread Julien Cubizolles
John Kitchin  writes:


> If the data exists, then arxiv-add-bibtex-entry could probably add the
> abstract if it existed. I am not too familiar with arxiv so I am not
> sure.

Just noticed that arxiv-get-pdf-add-bibtex-entry now includes the
abstract. Thanks a lot for implementing it.

Julien.




Re: [O] [PATCH] ox-koma-letter.el: Add support for 'location' koma variable

2016-04-03 Thread Myles English
>From 2d9b513e14f6d34fe81a5970fd4cee24fc253a31 Mon Sep 17 00:00:00 2001
From: Myles English 
Date: Mon, 4 Apr 2016 01:11:19 +0100
Subject: [PATCH] ox-koma-letter: Fixed bug in filling 'location' field

* contrib/lisp/ox-koma-letter.el: Fix code apparently introduced
  in 3ee3663
---
 contrib/lisp/ox-koma-letter.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el
index d36e817..2ef9025 100644
--- a/contrib/lisp/ox-koma-letter.el
+++ b/contrib/lisp/ox-koma-letter.el
@@ -797,12 +797,12 @@ a communication channel."
 	   (location-set (funcall check-scope 'location))
 	   (location (plist-get info :location)))
(when (or (and with-location-set (or location-set heading-val))
-		 (and (eq scope 'buffer) (or with-location-set location-set heading-val))
-		 (format "\\setkomavar{location}{%s}\n"
-			 (if (plist-get info :with-location)
-			 (if (plist-get info :special-headings) (or heading-val location "")
-			   (or option location ""))
-			   "")
+		 (and (eq scope 'buffer) (or with-location-set location-set heading-val)))
+	 (format "\\setkomavar{location}{%s}\n"
+		 (if (plist-get info :with-location)
+		 (if (plist-get info :special-headings) (or heading-val location "")
+		   (or heading-val location ""))
+		   ""
  ;; Folding marks.
  (and (funcall check-scope 'with-foldmarks)
   (let ((foldmarks (plist-get info :with-foldmarks)))
-- 
2.7.4


Rasmus,

A patch is attached that fixes some naughty brackets in the recent commit.

Myles

Rasmus writes:

> Myles English  writes:
>
>> Thanks for looking at this again.
>
> I'm just sorry about the delay, but I hope you can appreciate that
> sometimes time is at a premium.
>
>>> Is :with-location something you feel strongly about?  I'm not sure I find
>>> that it makes sense...
>>>
>>> I would like to apply the following patch on top of yours.
>>
>> I think that's alright.
>>
>> Just to recap: I use the "location" field, intended as a general purpose
>> extension field, for bank details.  Those details shouldn't be in every
>> letter I write and I don't want to have to enter those details every
>> time they are used.  For those reasons I put the bank details in
>> variable in a LCO file and toggle the inclusion by setting the
>> :LOCATION: (or :EXPORT_LOCATION) property like this:
>>
>> :EXPORT_LOCATION: \usekomavar{frombank}
>
> So if something should be in ALL letters the advised method would be to
> use LCO file or set the location variable.  I’m just concerned with having
> too many variables.  ox-koma-letter is already fairly complex.
>
> It might make sense to NOT parse (i.e. interpret org syntax) the keyword
> version or location then.  Then you’d be able to add latex commands there.
> The headline version would still be parsed.
>
> Rasmus



Re: [O] [PATCH 1/3] add id attribute to example-block on html export.

2016-04-03 Thread John Kitchin
Thanks. I found this in etc/ORG-NEWS, in case any one else was looking
for it ;)

Nicolas Goaziou writes:

> Hello,
>
> John Kitchin  writes:
>
>> I am not sure what those should look like or where they go. How about:
>>
>> * New html id attributes on special, example and quote blocks
>>  If the block has a #+name: attribute assigned, then the html element
>>  will have an id attribute with that name in the html export. This
>>  enables one to create links to these elements in other places,
>>  e.g. text
>
> I added this into ORG-NEWS file, in "New features" section.
>
> Thank you.
>
> Regards,


--
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] uncommnet-region behavior in org-src blocks

2016-04-03 Thread Adam Porter
Ken, just wanted to say thanks for sharing this.  I noticed this recently
and wondered about fixing it, and this does it!




Re: [O] Multipart/Alternative reply to email?

2016-04-03 Thread Adam Porter
As a follow-up to the other replies in this thread, you might be able to use
Pandoc to convert the HTML to Org.  That's what I do in
org-protocol-capture-html, and it works very well.




Re: [O] How to rename the agenda in org-mode?

2016-04-03 Thread Adam Porter
Oops, that'll teach me to edit elisp without aggressive-indent-mode.  :) 
This should work:

(advice-add 'tabbar-buffer-tab-label :before-until
  (lambda (tab)
(with-current-buffer (buffer-name (tabbar-tab-value tab))
  (when (equal major-mode 'org-agenda-mode)
"Agenda"








Re: [O] How to rename the agenda in org-mode?

2016-04-03 Thread Adam Porter
Eric S Fraga  ucl.ac.uk> writes:

> 
> On Sunday,  3 Apr 2016 at 18:26, Sharon Kimble wrote:
> 
> [...]
> 
> > Okay, so how can I get the name shortened please? I've just measured it
> > and its actually taking up 3.5 inches! That is ridiculous and shouldn't
> > happen, so how can it be abbreviated or shortened?
> 
> Isn't this really a tabbar question?  Maybe look at providing your own
> function for displaying the tab when an agenda is displayed.  See
> tabbar-tab-label-function?  


Yes, I think this will do what you want:

(advice-add 'tabbar-buffer-tab-label :before-until
  (lambda (tab)
(with-current-buffer (buffer-name (tabbar-tab-value tab))
  (when (equal major-mode 'org-agenda-mode))
  "Agenda")))




Re: [O] Is it possible to call some function after capture?

2016-04-03 Thread Adam Porter
Marcin Borkowski  mbork.pl> writes:

> I know about `org-capture-after-finalize-hook', but is it possible for
> a function in there to know which capture template was used?

Hi Marcin,

You might be able to use the :key property of org-capture-plist, which
records the selection key of the template used (the :template property
appears to record the contents of the filled-in template).




Re: [O] first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error

2016-04-03 Thread Charles Millar

Hello,

On 04/02/2016 05:00 AM, Nicolas Goaziou wrote:

Hello,

Charles Millar  writes:

[...]

"mysetup" class is

(add-to-list 'org-latex-classes
   '("mysetup"
"\\documentclass[fontsize=11pt,letterpaper,twoside=false]{scrartcl}

[...]


\\newcommand\\foo{bar}
[NO-DEFAULT-PACKAGES]
[NO-PACKAGES]
[EXTRA]"

[...]


\newcommand\foo{bar}
  \usepackage{lastpage}

Your template includes indentation before "[EXTRA]". This indentation
appears in the output, in this case, before the first LATEX_HEADER
directive.



Thank you, Nicolas!

Charlie Millar



[O] Is it possible to call some function after capture?

2016-04-03 Thread Marcin Borkowski
Hi list,

I know about `org-capture-after-finalize-hook', but is it possible for
a function in there to know which capture template was used?

TIA,

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



Re: [O] How to rename the agenda in org-mode?

2016-04-03 Thread Eric S Fraga
On Sunday,  3 Apr 2016 at 18:26, Sharon Kimble wrote:

[...]

> Okay, so how can I get the name shortened please? I've just measured it
> and its actually taking up 3.5 inches! That is ridiculous and shouldn't
> happen, so how can it be abbreviated or shortened?

Isn't this really a tabbar question?  Maybe look at providing your own
function for displaying the tab when an agenda is displayed.  See
tabbar-tab-label-function?  
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-668-g809a83




Re: [O] How to rename the agenda in org-mode?

2016-04-03 Thread Sharon Kimble
Nicolas Goaziou  writes:

> Hello,
>
> Sharon Kimble  writes:
>
>> Currently my org-mode agenda is showing in tabbar as "Org-Agenda 21 days
>> Diary Ddl Habit", how can I get it just showing as 'Org-Agenda'
>> please?
>
> IIRC, some mechanisms in "org-agenda.el" rely on a specific agenda name.
> So I suggest not to do that.
>

Okay, so how can I get the name shortened please? I've just measured it
and its actually taking up 3.5 inches! That is ridiculous and shouldn't
happen, so how can it be abbreviated or shortened?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.3, fluxbox 1.3.7, emacs 25.0.92


signature.asc
Description: PGP signature


Re: [O] How to rename the agenda in org-mode?

2016-04-03 Thread Nicolas Goaziou
Hello,

Sharon Kimble  writes:

> Currently my org-mode agenda is showing in tabbar as "Org-Agenda 21 days
> Diary Ddl Habit", how can I get it just showing as 'Org-Agenda'
> please?

IIRC, some mechanisms in "org-agenda.el" rely on a specific agenda name.
So I suggest not to do that.

Regards,

-- 
Nicolas Goaziou



Re: [O] Ignoring all org-mode headings to export beamer slides with no titles

2016-04-03 Thread Nicolas Goaziou
Hello,

Rob Stewart  writes:

> I like presentation zen, where less is more. I would like to export my
> org-mode files as beamer slides, but have the heading title ignored so
> as not to position a title at the top left of the each slide.
>
> I can do it on a per-slide basis with:
>
> ** My slide title
> :PROPERTIES:
> :BEAMER_ENV: fullframe
> :END:
>
> Is there a way of applying this rule to every slide, without having to
> add this :PROPERTIES: section beneath every heading in my org file?

You can use #+PROPERTY beamer_env fullframe, if beamer_env allows
inheritance. See (info "(org) Property inheritance").

Regards,

-- 
Nicolas Goaziou



[O] How to rename the agenda in org-mode?

2016-04-03 Thread Sharon Kimble
Currently my org-mode agenda is showing in tabbar as "Org-Agenda 21 days
Diary Ddl Habit", how can I get it just showing as 'Org-Agenda' please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.3, fluxbox 1.3.7, emacs 25.0.92


signature.asc
Description: PGP signature


Re: [O] Ignoring all org-mode headings to export beamer slides with no titles

2016-04-03 Thread Eric S Fraga
On Sunday,  3 Apr 2016 at 11:30, Rob Stewart wrote:
> Hi,
>
> I like presentation zen, where less is more. I would like to export my

Alternatively, there is a good more general LaTeX solution for minimal
styling at

https://www.quora.com/Presentations-What-are-the-best-beamer-themes

which you can incorporate into org by specifying

#+beamer_theme:

(i.e. no theme at all) and then a LaTeX block with the code given on
that page, inserted before the first slide.

Very zen... :-)
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-668-g809a83



Re: [O] Ignoring all org-mode headings to export beamer slides with no titles

2016-04-03 Thread Rob Stewart
Hi Rasmus,

Thanks for the tip. In the absence of an org mode solution to this,
adding the following to the top of my org file is a solution:

#+LATEX_HEADER: \setbeamertemplate{frametitle}{}

--
Rob

On 3 April 2016 at 12:36, Rasmus  wrote:
> Rob Stewart  writes:
>
>> Hi,
>>
>> I like presentation zen, where less is more. I would like to export my
>> org-mode files as beamer slides, but have the heading title ignored so
>> as not to position a title at the top left of the each slide.
>>
>> I can do it on a per-slide basis with:
>>
>> ** My slide title
>> :PROPERTIES:
>> :BEAMER_ENV: fullframe
>> :END:
>>
>> Is there a way of applying this rule to every slide, without having to
>> add this :PROPERTIES: section beneath every heading in my org file?
>
> You could add a filter that adds this property to every headline of the
> correct level.
>
> Or hack it on the latex side
>
> #+latex_header: \let\oldframe\frame
> #+latex_header: \renewcommand\frame[1][fullframe]{\oldframe[#1]}
>
> Hope it helps,
> Rasmus
>
> --
> When the facts change, I change my mind. What do you do, sir?
>
>



Re: [O] Ignoring all org-mode headings to export beamer slides with no titles

2016-04-03 Thread Eric S Fraga
On Sunday,  3 Apr 2016 at 11:30, Rob Stewart wrote:
> Hi,
>
> I like presentation zen, where less is more. I would like to export my
> org-mode files as beamer slides, but have the heading title ignored so
> as not to position a title at the top left of the each slide.

I don't know if there is an org way of achieving what you want (others
will hopefully answer).  The alternative is to create your own beamer
style which ignores the frame title.  What beamer style are you using?
Or maybe one already exists out in the wild...

Depending on the beamer style you are using, the following line, added
to your org file just before the first slide *might* do the trick...

#+latex: \renewcommand<>{\frametitle}[1]{\gdef\insertframetitle{}}
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-668-g809a83



Re: [O] Ignoring all org-mode headings to export beamer slides with no titles

2016-04-03 Thread Rasmus
Rob Stewart  writes:

> Hi,
>
> I like presentation zen, where less is more. I would like to export my
> org-mode files as beamer slides, but have the heading title ignored so
> as not to position a title at the top left of the each slide.
>
> I can do it on a per-slide basis with:
>
> ** My slide title
> :PROPERTIES:
> :BEAMER_ENV: fullframe
> :END:
>
> Is there a way of applying this rule to every slide, without having to
> add this :PROPERTIES: section beneath every heading in my org file?

You could add a filter that adds this property to every headline of the
correct level.

Or hack it on the latex side

#+latex_header: \let\oldframe\frame
#+latex_header: \renewcommand\frame[1][fullframe]{\oldframe[#1]}

Hope it helps,
Rasmus

-- 
When the facts change, I change my mind. What do you do, sir?




Re: [O] [PATCH] ox-koma-letter.el: Add support for 'location' koma variable

2016-04-03 Thread Rasmus
Myles English  writes:

> Thanks for looking at this again.

I'm just sorry about the delay, but I hope you can appreciate that
sometimes time is at a premium.

>> Is :with-location something you feel strongly about?  I'm not sure I find
>> that it makes sense...
>>
>> I would like to apply the following patch on top of yours.
>
> I think that's alright.
>
> Just to recap: I use the "location" field, intended as a general purpose
> extension field, for bank details.  Those details shouldn't be in every
> letter I write and I don't want to have to enter those details every
> time they are used.  For those reasons I put the bank details in
> variable in a LCO file and toggle the inclusion by setting the
> :LOCATION: (or :EXPORT_LOCATION) property like this:
>
> :EXPORT_LOCATION: \usekomavar{frombank}

So if something should be in ALL letters the advised method would be to
use LCO file or set the location variable.  I’m just concerned with having
too many variables.  ox-koma-letter is already fairly complex.

It might make sense to NOT parse (i.e. interpret org syntax) the keyword
version or location then.  Then you’d be able to add latex commands there.
The headline version would still be parsed.

Rasmus

-- 
Nothing's wrong with an email that ends in a minor key



[O] Ignoring all org-mode headings to export beamer slides with no titles

2016-04-03 Thread Rob Stewart
Hi,

I like presentation zen, where less is more. I would like to export my
org-mode files as beamer slides, but have the heading title ignored so
as not to position a title at the top left of the each slide.

I can do it on a per-slide basis with:

** My slide title
:PROPERTIES:
:BEAMER_ENV: fullframe
:END:

Is there a way of applying this rule to every slide, without having to
add this :PROPERTIES: section beneath every heading in my org file?

Thanks,

--
Rob



[O] orgmode & pdf-tools

2016-04-03 Thread AW
Hi!

Linux, Orgmode 8.3.4, org-file with many links. Recently I discovered pdf-
tools, which can display PDFs inside Emacs, just like docview, but much 
faster. 

I'd like to 

1. open via a given link from inside the org-file using C-c C-o 

2. the PDF with pdf-tools 

3. on a given page. 

Result: PDF is being opened, but always on p. 1 instead of e.g. page 5!

.emacs:

(eval-after-load 'org '(require 'org-pdfview))
(delete '("\\.pdf\\'" . default) org-file-apps)
(add-to-list 'org-file-apps '("\\.pdf\\'" . org-pdfview-open))
(add-to-list 'org-file-apps '("\\.pdf::\\([[:digit:]]+\\)\\'" . org-pdfview-
open))

link in org-file:

[[./localfile.pdf::5]]


Same setup works under windows with other viewer. So probably there is an 
error in those lines above. Any hints? -- Thank you!

Regards,

Alexander



Re: [O] Bug: CALL misbehavior with :results verbatim [8.3.4 (8.3.4-5-gdc68d2-elpaplus @ /Users/rossdonaldson/.emacs.d/elpa/org-plus-contrib-20160229/)]

2016-04-03 Thread Nicolas Goaziou
Hello,

Ross Donaldson  writes:

> Nicolas --
>
>> Isn't it the point of the "verbatim" parameter?
>
> I didn't think so, no. Certainly, it doesn't behave this way in any other 
> context, nor does the documentation make me think it should.
>
>> What did you expect instead?
>
> I expect the results of a call block to be the same as from evaluating the 
> named src block directly. Why would I expect anything else?

I don't know. I am not sure about the meaning of "verbatim". I was
hoping for an explanation.

Anyway, I investigated a bit. see
 for some more 
information.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Using CALL to evaluate elisp blocks does not show table headers [8.3.4 (release_8.3.4-686-g18b766 @ ~/org-mode/org-mode/lisp/)]

2016-04-03 Thread Nicolas Goaziou
Hello,

Shlomi Vaknin  writes:

> I have an elisp source block that builds a table from some computation.
> When trying to #+CALL that block, the table header (before the 'hline) is
> simply not shown. Here is a simple reproduce on my system:
>
> --
> #+name: test
> #+BEGIN_SRC elisp
> (list (list 'a 'b 'c 'd) 'hline (list 1 2 3 4) (list 3 4 5 6))
> #+END_SRC
>
> #+RESULTS: test
> | a | b | c | d |
> |---+---+---+---| 1 | 2 | 3 | 4 | 3 | 4 | 5 | 6 |
>
>
> #+CALL: test()
> #+RESULTS:
> | 1 | 2 | 3 | 4 | 3 | 4 | 5 | 6 |
>
> #+CALL: test() :results raw
> #+RESULTS:
> ((1 2 3 4) (3 4 5 6))
> --
>
> What am I doing wrong? ;)

Nothing.

Actually, CALL lines do not work as one would expect.

At first, the CALL line evaluates the called block with the provided
arguments and stores the result. So far so good. But then, it evaluates
the result as emacs-lisp data. So the final output inherits all the
idiosyncrasies from Babel Emacs lisp. E.g., quoting the manual (info
"(org) rownames"),

  Note that Emacs Lisp code blocks ignore the ‘:rownames’ header
  argument entirely given the ease with which tables with row names may
  be handled directly in Emacs Lisp.

Unless I'm missing something obvious, the last step of the process
should be omitted. I will look into it in the next days.

Regards,

-- 
Nicolas Goaziou