Re: [O] Babel results in other lang code

2015-08-04 Thread Satoru KURASHIKI
hi,

On Sun, Aug 2, 2015 at 4:20 AM, Charles C. Berry ccbe...@ucsd.edu wrote:
 Not sure what you mean about 'disturbing header parameters', but using

I want this extension to avoid ocupying header area/keywords as prereq,
and leave them for user.
(For now, it presets :results raw, and user can't use other option)

... Do I make myself understood?


 :wrap src lang

 where lang is the resulting language will fontify suitably.

Thanks, I think it had better use this way instead of introducing
special keywords!

regards,
-- 
KURASHIKI Satoru



[O] eval source blocks in a subtree when opening file

2015-08-04 Thread Tamas Papp

Hi,

I have a file that looks like this (stylized):

--8---cut here---start-8--- 
* Setup :noexport:


 #+COMMENT: some code here I want to run every time I open the 
 file in SRC blocks


* Experiment 1

 #+COMMENT: code I run when necessary, not every time

* Experiment 2

 #+COMMENT: code I run when necessary, not every time

* end of file :noexport: #+COMMENT: This is just for local 
variables, not exported.   # Local Variables: # 
org-confirm-babel-evaluate: nil # org-export-babel-evaluate: 
'inline-only # End: --8---cut 
here---end---8--- 

I would like to do the following: whenever I open the file in 
Emacs, I would like to eval all the source blocks under the 
heading Setup.


I have found org-babel-execute-subtree, but I cannot figure out 
how to call it on the subtree Setup from a local eval.


Best,

Tamas



Re: [O] controlling how htmlize fontifies code

2015-08-04 Thread Rasmus
Hi Eric,

Thanks for looking into this.

Eric S Fraga e.fr...@ucl.ac.uk writes:

 Trying to fix this is definitely beyond my ability unfortunately.  I may
 need to see how onerous it is to set the output type to css globally.

Here's a simple fix, though I suspect Nicolas will have a more through
solution up his sleeve.

Of course, in org-html--build-head the mysterious :html-htmlized-css-url
is required so you won't actually get any default colors, which is a bit
boring in my opinion.  I don't know if I'm misunderstanding
:html-htmlized-css-url, a bug or something supposed to be set via a
publish project.

Rasmus

-- 
This is the kind of tedious nonsense up with which I will not put
From dcf2ba74fcfe68c4590f7f71ed8029c72a3c10ac Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Tue, 4 Aug 2015 15:52:47 +0200
Subject: [PATCH 4/4] ox-html: Respect local values when formatting code

* ox-html.el (org-html-fontify-code): Use local value of
  org-html-htmlize-output-type parent and org-html-htmlize-font-prefix
  parent.

Reported-by: Eric S Fraga e.fr...@ucl.ac.uk
http://permalink.gmane.org/gmane.emacs.orgmode/99450
---
 lisp/ox-html.el | 44 +---
 1 file changed, 25 insertions(+), 19 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index d454fab..87351a8 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2041,25 +2041,31 @@ is the language used for CODE, as a string, or nil.
 	 ;; Case 2: Default.  Fontify code.
 	 (t
 	  ;; htmlize
-	  (setq code (with-temp-buffer
-		   ;; Switch to language-specific mode.
-		   (funcall lang-mode)
-		   (insert code)
-		   ;; Fontify buffer.
-		   (font-lock-ensure)
-		   ;; Remove formatting on newline characters.
-		   (save-excursion
-			 (let ((beg (point-min))
-			   (end (point-max)))
-			   (goto-char beg)
-			   (while (progn (end-of-line) ( (point) end))
-			 (put-text-property (point) (1+ (point)) 'face nil)
-			 (forward-char 1
-		   (org-src-mode)
-		   (set-buffer-modified-p nil)
-		   ;; Htmlize region.
-		   (org-html-htmlize-region-for-paste
-			(point-min) (point-max
+	  (setq code
+		(let ((parent (current-buffer)))
+		  (with-temp-buffer
+		;; Switch to language-specific mode.
+		(funcall lang-mode)
+		(insert code)
+		;; Fontify buffer.
+		(font-lock-ensure)
+		;; Remove formatting on newline characters.
+		(save-excursion
+		  (let ((beg (point-min))
+			(end (point-max)))
+			(goto-char beg)
+			(while (progn (end-of-line) ( (point) end))
+			  (put-text-property (point) (1+ (point)) 'face nil)
+			  (forward-char 1
+		(org-src-mode)
+		(set-buffer-modified-p nil)
+		;; Htmlize region.
+		(let ((org-html-htmlize-output-type
+			   (buffer-local-value 'org-html-htmlize-output-type parent))
+			  (org-html-htmlize-font-prefix
+			   (buffer-local-value 'org-html-htmlize-font-prefix parent)))
+		  (org-html-htmlize-region-for-paste
+		   (point-min) (point-max))
 	  ;; Strip any enclosing pre/pre tags.
 	  (let* ((beg (and (string-match \\`pre[^]*\n* code) (match-end 0)))
 		 (end (and beg (string-match /pre\\' code
-- 
2.5.0



Re: [O] Trouble with autofill mode

2015-08-04 Thread Eric S Fraga
On Tuesday,  4 Aug 2015 at 09:52, Vikas Rawal wrote:

[...]

 Yes, I have been thinking about this too. visual-line-mode with each
 sentence in a separate line would have many other advantages too. It
 would perhaps be better for git-like version control of documents
 written in orgmode. Isn’t it?

 Do others have an experience to share about this?

For org documents, I switched to visual-line-mode and org-indent mode a
while back now after *years* using auto-fill.  Visual-line-mode without
org-indent is less æsthetically pleasing, I find.

I typically have one paragraph per line and this works well.  It may be
less efficient with respect to revision control, e.g. git, but the
efficiency loss is minimal in my opinion.

For LaTeX directives that I used to always put in #+latex: lines when I
needed these within a paragraph, I now increasingly use @@latex:...@@.

The only issue is working with wide tables.  For this, I do have a key
binding to toggle visual-line-mode on and off to make it easier to work
with tables.  It would be nice if somehow org knew not to allow
visual-line-mode to wrap tables but I would imagine this would be
difficult if not impossible.

For emails, I continue to use auto-fill-mode however.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-1315-ga3b2b7



Re: [O] Trouble with autofill mode

2015-08-04 Thread John Kitchin
I would have thought something like this would work:
(defun nobreak-p ()
  (interactive)
  (let ((result (if (and (looking-at  )
 (save-excursion
   (re-search-forward [^{]*} (line-end-position) 
'end))
 (save-excursion
   (re-search-backward [^}]*index{ 
(line-beginning-position) 'end)))
t
  nil)))
(message %s result)
result))

(add-hook 'fill-nobreak-predicate #'nobreak-p)

at least, from what I can see it returns true everywhere it should not
break, but I still get breaks where I do not want them. maybe it could
give you an idea though.

Vikas Rawal writes:


 Hello,
 This StackExchange question might help you out:
 https://emacs.stackexchange.com/questions/12392/prevent-fill-paragraph-from-breaking-latex-citations-in-org-mode
 (Only if I got your question right...)

 Thanks very much. This should work. Let me try to modify it to my use case.

 Much appreciated.


 This is turning out to be non-trivial for my limited knowledge of regex. We 
 need a regex that would return true for all white spaces between  \index{ 
 and “} in a string like

 \index{this is an index} and then some text \index(and then another index}

 And then add-hook it to 'fill-nobreak-predicate.

 Various things that I have tried since yesterday did not get me anywhere.

 Vikas

--
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] controlling how htmlize fontifies code

2015-08-04 Thread Eric S Fraga
On Monday,  3 Aug 2015 at 17:08, Rick Frankel wrote:

[...]

 Both should work. Are you sure you have `org-export-allow-bind-keywords' set?
 Why wouldn't you expect local variables to work?

Okay, I have tracked the problem down.  Took some effort and boy did
this test my not very extensive emacs lisp knowledge!  I do need to
learn how to use the Emacs debugger.  Task for a rainy day...

In any case, the problem is that the fontification happens
(org-html-htmlize-output-type not nil) in org-html-fontify-code using
with-temp-buffer which resets org-html-htmlize-output-type back to
inline-css or whatever the global setting for that variable happens to
be.

So, basically, one can have code fontified with inline-css or not at all
unless the output type is set to css globally.

I hope this makes sense.

Trying to fix this is definitely beyond my ability unfortunately.  I may
need to see how onerous it is to set the output type to css globally.

Thanks again,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-1315-ga3b2b7



[O] org-html-use-unicode-chars breaks source code blocks

2015-08-04 Thread Vladimir Alexiev
Hi! 
I've set org-html-use-unicode-chars since I want ox-html to leave IRIs as IRIs.
But this has another undesired effect: it breaks URL references in code,
since it doesn't escape the brackets.

Eg this:

#+BEGIN_SRC Turtle
@prefix aat:   http://vocab.getty.edu/aat/.
#+END_SRC

results in the URL being invisible in the exported HTML.
The fault is here:

(defun org-html-final-function (contents backend info)
  ...
(when org-html-use-unicode-chars
  (require 'mm-url)
  (mm-url-decode-entities))

previous code carefully escaped the entities in org-html-protect-char-alist, 
only for mm-url-decode-entities to unescape them.

http://article.gmane.org/gmane.emacs.orgmode/94742 is somewhat related.




Re: [O] controlling how htmlize fontifies code

2015-08-04 Thread Eric S Fraga
On Monday,  3 Aug 2015 at 17:08, Rick Frankel wrote:

[...]

 I have tried both setting a local variable and also using #+bind: but
 neither approach works for some reason.  I did not expect the local
 variable setting to work, of course.


 Both should work. Are you sure you have `org-export-allow-bind-keywords' set?

I do allow bind keywords.  Strange.  I'll investigate further with emacs
-Q etc.  I may post an ECM later.

 Why wouldn't you expect local variables to work?

Because, if I understand correctly, the exporter processes the file into
a different buffer which is then exported and locally set variables
don't transfer to the new buffer.  This is why I have used binding in
the past.  Maybe the new exporter is different?

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-1315-ga3b2b7



Re: [O] Trouble with autofill mode

2015-08-04 Thread John Kitchin
I turned off auto-fill everywhere many years ago (it messed up my code
blocks in org-mode too much. I usually write them in org-mode, not the
programming mode). I use (global-visual-line-mode 1)

I cannot think of any issues that causes. I even have an
unfill-paragraph to fix what my students do ;) I cannot say I seen many
advantages with git with this, but we usually have one paragraph on a
line.  One day I just need to learn how to do word-based diffs/merge for
text, instead of line-based.

The only exception to auto-fill i can think of is in mu4e, where emails to get 
filled
so they fit in about an 80 character field.

Vikas Rawal writes:



 On 2015-08-03 at 23:11, Vikas Rawal vikasli...@agrarianresearch.org wrote:
 But I guess one has to have some compromise somewhere :)

 Another compromise would be to stop using autofill mode and use 
 visual-line-mode or something else. I recently made the switch after many 
 years of auto-fill. It takes a bit of getting used to, but it works well.



 Yes, I have been thinking about this too. visual-line-mode with each sentence 
 in a separate line would have many other advantages too. It would perhaps be 
 better for git-like version control of documents written in orgmode. Isn’t it?

 Do others have an experience to share about this?

 Vikas

--
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] controlling how htmlize fontifies code

2015-08-04 Thread Rasmus
Hi,

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Not really, although I would write it like the following instead:

   (let ((output-type org-html-htmlize-output-type)
 (font-prefix org-html-htmlize-font-prefix))
 (with-temp-buffer
   ...
   ;; Htmlize region.
   (let ((org-html-htmlize-output-type output-type)
 (org-html-htmlize-font-prefix font-prefix))
 (org-html-htmlize-region-for-paste
  (point-min) (point-max)

That might be ascetically nicer.

 Of course, in org-html--build-head the mysterious :html-htmlized-css-url
 is required so you won't actually get any default colors, which is a bit
 boring in my opinion.  I don't know if I'm misunderstanding
 :html-htmlized-css-url, a bug or something supposed to be set via a
 publish project.

 I think there's a bug. `org-org-htmlized-css-url' is defined in
 ox-org.el, but not attached to any info property. So, at the
 moment, :html-htmlized-css-url is bogus.

Do we have a function that can generate a candidate css file for
org-org-htmlized-css-url or :html-htmlize-css-url?

Rasmus

-- 
Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio




Re: [O] controlling how htmlize fontifies code

2015-08-04 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 Here's a simple fix, 

Thank you.

 though I suspect Nicolas will have a more through solution up his
 sleeve.

Not really, although I would write it like the following instead:

  (let ((output-type org-html-htmlize-output-type)
(font-prefix org-html-htmlize-font-prefix))
(with-temp-buffer
  ...
  ;; Htmlize region.
  (let ((org-html-htmlize-output-type output-type)
(org-html-htmlize-font-prefix font-prefix))
(org-html-htmlize-region-for-paste
 (point-min) (point-max)

 Of course, in org-html--build-head the mysterious :html-htmlized-css-url
 is required so you won't actually get any default colors, which is a bit
 boring in my opinion.  I don't know if I'm misunderstanding
 :html-htmlized-css-url, a bug or something supposed to be set via a
 publish project.

I think there's a bug. `org-org-htmlized-css-url' is defined in
ox-org.el, but not attached to any info property. So, at the
moment, :html-htmlized-css-url is bogus.


Regards,

-- 
Nicolas Goaziou



Re: [O] [ANN] Release 8.3

2015-08-04 Thread Achim Gratz
Bastien Guerry writes:
 Org 8.3 is now out.  Here is the list of changes:

Yay!

 http://orgmode.org/Changes.html

Just a few statistics: these are 2936 commits since the 8.2 release 23
months ago, 2390 commits on top of 8.2.10 and 1361 of those after the
8.3beta release 13 months ago.

 Thanks to Nicolas who has been the de facto maintainer for
 more than I could wish.

+1


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

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra




[O] Exporting to beamerposter

2015-08-04 Thread Titus von der Malsburg

I’d like to use org-mode to create an academic poster like this one
(random example found using Google):

  http://robjhyndman.com/images/PosterInterests_beamer-723x1023.png

As the LaTeX target, I use beamerposter which is basically just a skin
for Beamer:

  https://github.com/deselaers/latex-beamerposter
  https://www.ctan.org/pkg/beamerposter?lang=en

Such a poster typically consists of two columns (or more when landscape
format is used) and blocks stacked inside these columns.  Sometimes, I
also need something more fancy like a block in a column and more columns
inside that block but that’s rare.

What I would like to write in org is something like the following:

#+BEGIN_SRC org
#+BEAMER: \begin{columns}
#+BEAMER: \begin{column}{0.48\columnwidth}

* Introduction
:PROPERTIES:
:BEAMER_ENV: block
:END:
This poster is about …

* Design
:PROPERTIES:
:BEAMER_ENV: block
:END:
To test A we did B.

#+BEAMER: \end{column}
#+BEAMER: \begin{column}{0.48\columnwidth}

* Discussion
:PROPERTIES:
:BEAMER_ENV: block
:END:
Our ground-breaking results show …

#+BEAMER: \end{column}
#+BEAMER: \end{columns}
#+END_SRC

However, this doesn’t work for two reasons:

1.) Org mode ignores that I want blocks and instead uses frame
environments.

2.) The closing \end{frame} macros are misplaced, e.g:

#+BEGIN_SRC latex
…
\begin{frame}[label={sec:orgheadline3}]{Discussion}
Our ground-breaking results show …

\end{column}
\end{columns}
\end{frame}
…
#+END_SRC

My question: What do I have to do in org to get the desired structure in
Latex?  This structure would be something like the following:

#+BEGIN_SRC latex
\begin{columns}
\begin{column}{0.48\columnwidth}

\begin{block}{Introduction}
This poster is about
\end{block}

\begin{block}{Design}
To test A we did B.
\end{block}

\end{column}
…
#+END_SRC

Posters really are the only type of document that has consistently
resisted being taken over by org-mode.  So I would be great to have a
solution for this.
  
  Titus







signature.asc
Description: PGP signature


Re: [O] org-src-fontify-natively stops working in 8.3

2015-08-04 Thread Kyle Meyer
Kaushal kaushal.m...@gmail.com wrote:
 Hi,

 The source code block fontification stops working in all my org files in
 version 8.3.

Sorry, this was broken by my backport (d81e6b5) and the following merge
to master.  I should have caught this because 99f (org-src.el
(org-src-font-lock-fontify-block): Do not use `font-lock-ensure',
2014-07-27) was already in response to an earlier attempt to use
font-lock-ensure here (although I've been unable to find the original ML
post).

I'll restore the use of font-lock-fontify-buffer and leave a comment to
make sure it isn't reverted again.

--
Kyle



[O] [ANN] Release 8.3

2015-08-04 Thread Bastien Guerry
Dear all,

Org 8.3 is now out.  Here is the list of changes:

http://orgmode.org/Changes.html

Thanks to Nicolas who has been the de facto maintainer for
more than I could wish.

I'm off for two weeks but I'll be back.

Enjoy!

-- 
 Bastien




Re: [O] Org-pomodoro showing number of pomodoros

2015-08-04 Thread Bastien Guerry
Hi Renger,

Renger van Nieuwkoop ren...@vannieuwkoop.ch writes:

 I just started using org-pomodoro and have one question: How can I
 see the number of pomodoros I finished during the day?

Did you find an answer to this?  If so, can you share it here?

Thanks!

-- 
 Bastien



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

2015-08-04 Thread Bastien Guerry
Rasmus ras...@gmx.us writes:

 Did you/will you add it to contrib?

Yes, that would help discovering it.

Thanks!

-- 
 Bastien



Re: [O] [ANN] orgtbl-join

2015-08-04 Thread Bastien Guerry
Hi Thierry,

Thierry Banel tbanelweb...@free.fr writes:

 I am glad to announce the orgtbl-join package.

this is really nice.

Would you be okay to add this to Org's core feature for Org  8.3?

-- 
 Bastien



Re: [O] Separate Org file from Subtree

2015-08-04 Thread Bastien Guerry
Hi Simon,

with a recent Org (8.0) :

- load ox-org.el (require 'ox-org)
- go to your heading
- trigger the export menu with C-c C-e
- restrict to the subtree with C-s
- export as an Org file with O o

HTH,

-- 
 Bastien



Re: [O] #+TOC: figures in ox-html?

2015-08-04 Thread Bastien Guerry
Hi Melanie,

Melanie Bacou m...@mbacou.com writes:

 The `#+TOC: tables` construct does export nicely to HTML. Just
 wondering if `#+TOC: figures` and maybe `#+TOC: equations` is on the
 roadmap, or could anyone provide a hook to make this work in the
 meantime?

It would be useful to have, yes, I noted this down.

Thanks,

-- 
 Bastien



Re: [O] Publishing orgmode files

2015-08-04 Thread Bastien Guerry
Hi Xavier,

Xavier Maillard xav...@maillard.im writes:

 I am trying to publish my org project but I am lost in the way I can
 tweak my projects.

 Is there some good tutorial I can follow step by step in order to
 publish several files at once ?

Did you end up with good guidelines?  Either from someone else or from
your own experience?

Thanks in advance for sharing!

-- 
 Bastien



Re: [O] fontenc makes pdf non-searchable

2015-08-04 Thread Bastien Guerry
Hi Martin,

Martin Leduc mart...@hotmail.com writes:

 However, when opening the experted pdf (with evince or okular) and
 searching for a word, the output from the search function is a list
 of words with apparently incorrect character encoding.

 I get the same result when compiling directly the exported tex file.
 However, if I remove the line:

 \usepackage[T1]{fontenc}

 the compiled pdf becomes correctly interpreted by the search
 function. According to the documentation of the org-article latex
 class, There is no facility to disable loading fontenc.

 What should I do to make the pdf searchable with the org exporter ?

I would try to remove the relevant entry from
`org-latex-default-packages-alist'.  Did you try this?

-- 
 Bastien



Re: [O] [BUG] org-collector.el broken by 8.3 beta

2015-08-04 Thread Bastien Guerry
Hi Charles,

Charles Millar mill...@verizon.net writes:

 org-collector works as expected using

 GNU Emacs 24.4.1 (i586-pc-linux-gnu, GTK+ Version 3.14.5)
 of 2015-03-07 on binet, modified by Debian
 Org: 8.2.10 release_8.2.10

 but fails if

 GNU Emacs 24.4.1 (i586-pc-linux-gnu, GTK+ Version 3.14.5)
 of 2015-03-07 on binet, modified by Debian
 Org: 8.3beta release_8.3beta-1030-g65bbb1

Can you be more specific on the kind of failure do you have?

-- 
 Bastien



Re: [O] radio targets, a bug?

2015-08-04 Thread Bastien Guerry
Hi Thomas,

thomas kalbe thomas.ka...@googlemail.com writes:

 (after that comes a number of weird symbols that I cannot even copy
 into the email...)

What version of Org are you using?

M-x org-version RET

Thanks,

-- 
 Bastien



Re: [O] library-of-babel location

2015-08-04 Thread Bastien Guerry
Hi Charles,

Charles Millar mill...@verizon.net writes:

 From the org manual

 14.6 Library of Babel
 * * * *
 The central repository of code blocks in the “Library of Babel” is
 housed in an Org mode
 file located in the ‘contrib’ directory of Org mode.

 However (at least in my case, Org-mode version 8.2.10 and also
 Org-mode version 8.3beta (release_8.3beta-1316-ga70604)

 the lob is located in the 'doc' directory

 /path/to/org-mode/doc/library-of-babel.org

 So should the does the manual need updating or correction?

Done, thanks.

-- 
 Bastien



Re: [O] [ANN] Table optimizations

2015-08-04 Thread Bastien Guerry
Hi Nicolas,

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 I committed some changes to org-table.el in order to make them slightly
 more responsive in large buffers. I also refreshed some old code so as
 to prepare for lexical binding switching.

Great, thanks!

-- 
 Bastien



Re: [O] Offline until July, 18

2015-08-04 Thread Bastien Guerry
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 I'll be offline for an extended week. Let it not prevent anyone from
 releasing Org 8.3 meanwhile...

I'm late but done!  :)

-- 
 Bastien



Re: [O] Can org-info.js fold top level only?

2015-08-04 Thread Bastien Guerry
Hi Tom,

Tom adatgyu...@gmail.com writes:

 I tried javscript folding of exported web pages following
 the instructions here:

 http://orgmode.org/manual/JavaScript-support.html

 It works nicely, the top level headlines are initially collapsed and 
 they can be opened with a click, however a click exposes all
 the lower level headlines under the top level headline and ther contents
 recursively.

 Can org-info.js open only one level of headlines (the ones immediately
 under the header clicked) without opening all the headlines and contens
 under them?

AFAIK, we don't have a maintainer for org-info.js -- which is a pity,
given how useful it is.

Anyone with some good HTML/JS knowledge?

Or are we all affected by the javascript frameworks fatigue syndrome?
http://www.allenpike.com/2015/javascript-framework-fatigue/

Thanks in advance for those who want to put some magic on Org through
a web browser.

-- 
 Bastien



Re: [O] Org open link in new window

2015-08-04 Thread Bastien Guerry
Hi Tory,

torys.ander...@gmail.com (Tory S. Anderson) writes:

 Navigating through the labyrinth of org commands and wrappers, I've
 not been able to find out if there's already a way to open a link
 (particularly a footnote link) in a new window, so that I could retain
 my in-line location and context while reading the linked/footnoted
 text. I realize this functionality is probably out there, but I'm not
 seeing it in the manual section on links. How can I open links in new
 window (splitting my screen)?

Did you find `org-link-frame-setup'?

HTH,

-- 
 Bastien



Re: [O] org-20150629 fails to install if gpg is not present (emacs 24.5.1)

2015-08-04 Thread Bastien Guerry
Hi Vitaly,

Vitaly Lugovskiy vslugov...@gmail.com writes:

 E.g., if installing on cygwin.

What error does the installation process raise?

How did you find out?

Is installing gpg enough?

-- 
 Bastien



Re: [O] [bug] ox-md and ox-man use same shortcut

2015-08-04 Thread Bastien Guerry
Hi Brice,

Brice Waegenire brice@gmail.com writes:

 Both ox-man and ox-md use m as their menu-entry shortcut. Witch make
 them merge as one in the org-export-dispatch if they are both loaded
 at the same time.
 Maybe ox-man should use M instead of m.

This is now the case (confirming now as I don't see any confirmation
on the list).

Thanks,

-- 
 Bastien



Re: [O] org-tag-alist - more tags in one keystroke

2015-08-04 Thread Bastien Guerry
Hi David,

David Belohrad da...@belohrad.ch writes:

 ^^^ the above does not work. Is there any way how to make it
 working?

This can't be done the way you tried, but I'd use registers for this:

(set-register ?a :adam:alice:joe:bill)

Then call C-x r i a to insert it.

Or maybe some other mechanism.

HTH,

-- 
 Bastien



Re: [O] Testers / Feedback wanted: Gantt charts via org-gantt.el

2015-08-04 Thread Bastien Guerry
Hi Bernhard,

this is really nice!  Would you like to have this library
added to the contrib/ directory of org-mode?

Thanks for your work on this,

-- 
 Bastien



Re: [O] Is it possible to remove org-completing-read and org-completing-read-no-i?

2015-08-04 Thread Bastien Guerry
Hi,

Rasmus ras...@gmx.us writes:

 I think we had a discussion following another thread on this topic
 (probably a thread you started), and I believe switching to
 `completing-read' is on the table after 8.3 has been released...

Yes.  Can someone take this?

-- 
 Bastien



Re: [O] [PATCH] contrib: rip out org-jira

2015-08-04 Thread Bastien Guerry
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Could you provide patch with a proper commit message, using
 format-patch?

I pushed this patch.  Mitchel, thanks for adding a changelog
for your next patch.

-- 
 Bastien



Re: [O] Backports from Emacs repo

2015-08-04 Thread Bastien Guerry
Hi Kyle,

Kyle Meyer k...@kyleam.com writes:

 I've backported changes touching Org files in the main Emacs repo
 (lisp/org/*.el, doc/misc/org.texi, and etc/refcards/orgcard.tex) since
 the last Org mode sync with Emacs.  These changes are in the temporary
 branch 'backport-master'.  I'll wait to perform the actual merge to
 master until after Nicolas returns.  In the meantime, feel free to let
 me know if you have any comments or issues with the backports or with
 how the conflicts are resolved.

I just merged the branch.  I ran the tests with no problem on your
branch and on the merged master.

Thanks *a lot* for maintaining this branch!

-- 
 Bastien



Re: [O] [ANN] org-dial

2015-08-04 Thread Bastien Guerry
Hi Michael,

Michael Strey mst...@strey.biz writes:

 ~org-dial~ --- softphone support for Emacs Org mode

 is published on Github now.

 https://github.com/mistrey/org-dial

Oh, nice, thanks.

Now we should consider opening a hotline for Org users.

:)

-- 
 Bastien



Re: [O] eval source blocks in a subtree when opening file

2015-08-04 Thread Charles C. Berry

On Tue, 4 Aug 2015, Tamas Papp wrote:


Hi,



[mock file deleted]

I would like to do the following: whenever I open the file in Emacs, I would 
like to eval all the source blocks under the heading Setup.


I have found org-babel-execute-subtree, but I cannot figure out how to call 
it on the subtree Setup from a local eval.



Name the first block in the subtree start setup (say).

Then

# Local Variables:
# eval: (org-babel-goto-named-src-block start setup)
# eval: (org-babel-execute-subtree)
# End:


should do it.

HTH,

Chuck



Re: [O] org-html-use-unicode-chars breaks source code blocks

2015-08-04 Thread Rasmus
Hi,

Vladimir Alexiev vladimir.alex...@ontotext.com writes:

 I've set org-html-use-unicode-chars since I want ox-html to leave IRIs as 
 IRIs.
 But this has another undesired effect: it breaks URL references in code,
 since it doesn't escape the brackets.

I think this should only apply to entities.  Any reason to do it on the
whole output?  Nicolas?

This patch makes that change.

Rasmus

-- 
This message is brought to you by the department of redundant departments
From 535366ec1e1819c73bb038712a19f5e1be0a51b7 Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Tue, 4 Aug 2015 19:12:00 +0200
Subject: [PATCH 1/4] ox-html: Only translate entities to UTF-8

* ox-html.el (org-html-final-function): Do not check
 :html-use-unicode-chars.
 (org-html-entity): Check :html-use-unicode-chars
 (org-html-use-unicode-chars): Update docstring.

Reported-by: Vladimir Alexiev vladimir.alex...@ontotext.com
http://permalink.gmane.org/gmane.emacs.orgmode/99451
---
 lisp/ox-html.el | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 2c13bf6..c329b72 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -609,10 +609,10 @@ Warning: non-nil may break indentation of source code blocks.
   :type 'boolean)
 
 (defcustom org-html-use-unicode-chars nil
-  Non-nil means to use unicode characters instead of HTML entities.
+  Non-nil means to use unicode characters for org-entities instead of HTML codes.
   :group 'org-export-html
-  :version 24.4
-  :package-version '(Org . 8.0)
+  :version 25.1
+  :package-version '(Org . 8.3)
   :type 'boolean)
 
  Drawers
@@ -2359,7 +2359,9 @@ holding contextual information.  See `org-export-data'.
   Transcode an ENTITY object from Org to HTML.
 CONTENTS are the definition itself.  INFO is a plist holding
 contextual information.
-  (org-element-property :html entity))
+  (if (plist-get info :html-use-unicode-chars)
+  (org-element-property :utf-8 entity)
+(org-element-property :html entity)))
 
  Example Block
 
@@ -3500,9 +3502,6 @@ contextual information.
 (set-auto-mode t)
 (if (plist-get info :html-indent)
 	(indent-region (point-min) (point-max)))
-(when (plist-get info :html-use-unicode-chars)
-  (require 'mm-url)
-  (mm-url-decode-entities))
 (buffer-substring-no-properties (point-min) (point-max
 
 
-- 
2.5.0



Re: [O] controlling how htmlize fontifies code

2015-08-04 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 Do we have a function that can generate a candidate css file for
 org-org-htmlized-css-url or :html-htmlize-css-url?

There is `org-html-htmlize-generate-css'.

Regards,



[O] library-of-babel location

2015-08-04 Thread Charles Millar

From the org manual

14.6 Library of Babel
* * * *
The central repository of code blocks in the “Library of Babel” is 
housed in an Org mode

file located in the ‘contrib’ directory of Org mode.

However (at least in my case, Org-mode version 8.2.10 and also Org-mode 
version 8.3beta (release_8.3beta-1316-ga70604)


the lob is located in the 'doc' directory

/path/to/org-mode/doc/library-of-babel.org

So should the does the manual need updating or correction?

Charlie Millar






Re: [O] controlling how htmlize fontifies code

2015-08-04 Thread Eric S Fraga
On Tuesday,  4 Aug 2015 at 17:09, Nicolas Goaziou wrote:

[...]

 Not really, although I would write it like the following instead:

   (let ((output-type org-html-htmlize-output-type)
 (font-prefix org-html-htmlize-font-prefix))
 (with-temp-buffer
   ...
   ;; Htmlize region.
   (let ((org-html-htmlize-output-type output-type)
 (org-html-htmlize-font-prefix font-prefix))
 (org-html-htmlize-region-for-paste
  (point-min) (point-max)

Thanks Nicolas.  This works!  (diffs attached) At least with the output
type set as a local variable but not with #+bind which is perfectly fine
as local variable use is what I would prefer.

And thank you to Rasmus as well as I would imagine the suggested code
changes would work as well.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-1315-ga3b2b7
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index d454fab..82e3b76 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2041,25 +2041,29 @@ is the language used for CODE, as a string, or nil.
 	 ;; Case 2: Default.  Fontify code.
 	 (t
 	  ;; htmlize
-	  (setq code (with-temp-buffer
-		   ;; Switch to language-specific mode.
-		   (funcall lang-mode)
-		   (insert code)
-		   ;; Fontify buffer.
-		   (font-lock-ensure)
-		   ;; Remove formatting on newline characters.
-		   (save-excursion
-			 (let ((beg (point-min))
-			   (end (point-max)))
-			   (goto-char beg)
-			   (while (progn (end-of-line) ( (point) end))
-			 (put-text-property (point) (1+ (point)) 'face nil)
-			 (forward-char 1
-		   (org-src-mode)
-		   (set-buffer-modified-p nil)
-		   ;; Htmlize region.
-		   (org-html-htmlize-region-for-paste
-			(point-min) (point-max
+	  (let ((output-type org-html-htmlize-output-type)
+		(font-prefix org-html-htmlize-font-prefix))
+	(setq code (with-temp-buffer
+			 ;; Switch to language-specific mode.
+			 (funcall lang-mode)
+			 (insert code)
+			 ;; Fontify buffer.
+			 (font-lock-ensure)
+			 ;; Remove formatting on newline characters.
+			 (save-excursion
+			   (let ((beg (point-min))
+ (end (point-max)))
+			 (goto-char beg)
+			 (while (progn (end-of-line) ( (point) end))
+			   (put-text-property (point) (1+ (point)) 'face nil)
+			   (forward-char 1
+			 (org-src-mode)
+			 (set-buffer-modified-p nil)
+			 ;; Htmlize region.
+			 (let ((org-html-htmlize-output-type output-type)
+			   (org-html-htmlize-font-prefix font-prefix))
+			   (org-html-htmlize-region-for-paste
+			(point-min) (point-max))
 	  ;; Strip any enclosing pre/pre tags.
 	  (let* ((beg (and (string-match \\`pre[^]*\n* code) (match-end 0)))
 		 (end (and beg (string-match /pre\\' code


Re: [O] How to make a non-GPL Org-mode exporter?

2015-08-04 Thread Phillip Lord


Marcin Borkowski mb...@mbork.pl writes:

 Hi all,

 after a short discussion in a recent thread, I have a serious technical
 question.

 Assume that (for some reason) I want to write an Org-mode exporter which
 won't be GPL'd.  (Use-case: having written a few custom exporters, I'm
 writing a tutorial on them, and I consider publishing a *tutorial* with
 GPL'd code a Bad Thing™.  (The idea of a programming tutorial is that
 other people can or even should reuse the code in the tutorial, right?
 And I see no reason to impose GPL on them.))

 How do I do that?  Is that even possible?  Also, is it possible to get
 an actual answer to this question without spending money on lawyers?


I hesitate to answer this, as the thread has already been long and I am
very late, but it seems to me that the thread has been wrong headed.

Yes, you can do this. To do it, well, you just do it.

My evidence for these statements are as follows:

;;; emerge.el --- merge diffs under Emacs control

;;; The author has placed this file in the public domain.

;; This file is part of GNU Emacs.

This is the header of emerge.el which is PART OF emacs, and yet under
public domain, explicitly.

However, you have to consider carefully what rights this gives you. The
combined work can only be released GPL. You can combine GPL and public
domain because public domain section does not add any further
restrictions than the GPL already does. However, because you include GPL
code, you can *only* release the derivative work under GPL.

However, your public domain code can be used without GPL.

My evidence for this statement is from the GPL faq


If a program combines public-domain code with GPL-covered code, can I
take the public-domain part and use it as public domain code?
(#CombinePublicDomainWithGPL)

You can do that, if you can figure out which part is the public
domain part and separate it from the rest. If code was put in the
public domain by its developer, it is in the public domain no matter
where it has been.


My interpretation is, therefore, that theoretically, if someone re-wrote
Emacs, and org-mode with no shared code but the same function names
public domain, therefore, they could use your exporter. In practice this
is never going to happen.

However, say you wrote an exporter which included a general purpose
piece of code (say a quick sort), someone else *could* take that piece
of code and use it, for example, on another lisp as they chose, even in
a closed source product because your exporter is only under PD, and
there are no restrictions on it use. Possible but unlikely, I think, as
an org-mode exporter is a pretty specific piece of code.

You might, however, want to do this because for a blog post, it avoids
issues of how to interpret the GPL, including linking and all that
entails within the context of what is, after all, documentation.

That is my interpretation, with evidence. I think my position largely
disagrees with what others have said. My apologies to everyone who sees
my start this as a zombie thread who says oh know, no that again.

Phil




Re: [O] controlling how htmlize fontifies code

2015-08-04 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Rasmus ras...@gmx.us writes:

 Do we have a function that can generate a candidate css file for
 org-org-htmlized-css-url or :html-htmlize-css-url?

 There is `org-html-htmlize-generate-css'.

The next question is thus, shouldn't the output of this automatically be
inserted when css instead of inline-css is used?

Rasmus

-- 
I almost cut my hair, it happened just the other day




Re: [O] org-html-use-unicode-chars breaks source code blocks

2015-08-04 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 Vladimir Alexiev vladimir.alex...@ontotext.com writes:

 I've set org-html-use-unicode-chars since I want ox-html to leave IRIs as 
 IRIs.
 But this has another undesired effect: it breaks URL references in code,
 since it doesn't escape the brackets.

 I think this should only apply to entities.  Any reason to do it on the
 whole output?  Nicolas?

It was introduced in e8742b78e0a982a7fca0bf25b4f3551be58660ef. I'm not
sure about the intent of this variable but I tend to think it is about
beautification of the output. As a consequence, it isn't meant to apply
to Org entities specifically.

However, as you noticed, it is not subtle enough to apply
`mm-url-decode-entities' on the full output. It needs to be applied
piece-wise wherever that makes sense. `org-html-entity' is one case.
Maybe `org-html-plain-text' for another one.


Regards,

-- 
Nicolas Goaziou



Re: [O] controlling how htmlize fontifies code

2015-08-04 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Rasmus ras...@gmx.us writes:

 Do we have a function that can generate a candidate css file for
 org-org-htmlized-css-url or :html-htmlize-css-url?

 There is `org-html-htmlize-generate-css'.

 The next question is thus, shouldn't the output of this automatically be
 inserted when css instead of inline-css is used?

IIUC, the very existence of `org-org-htmlized-css-url' is because this
function is not reliable when using batch mode or when different authors
use different Emacs themes.

Regards,



[O] How can I make mdframed+minted work for multi-page source code blocks?

2015-08-04 Thread Kaushal
I am using org-mode version 8.3 and the latest build of emacs from git
master.

I am trying to make mdframed+minted work with source code blocks having
captions.

Here is  a minimum working example:
https://gist.githubusercontent.com/kaushalmodi/a9d05fe94d5641d0084f/raw/0ff356e8cfafbec53d91fa3b73a59226e5cd9825/minted-multiple-pages.org

The example is short; just the source code block is big so that it spans
multiple pages.

I am trying to get the code block parts on each page to be completely boxed
(borders on all 4 sides).

Currently only the code blocks in in-between pages gets borders only on the
sides. The first part of code block on the first page gets borders on top
and sides. And the last part of the code block on the last page gets
borders on bottom and on sides.

Here is the generated pdf:
https://dl.dropboxusercontent.com/u/10985/minted-multiple-pages.pdf (You
can ignore the lines crossing the borders as I will work on fixing those
once I gets the borders right).

Please let me know if there is any other way to get the following using
*minted*:
- Split code blocks on each page be completely boxed.
- The code block be captioned.
- The code block be properly listed in List of Listings
- Be able to customize the border lines, code background and line numbers.

--
Kaushal Modi


Re: [O] Why not push?

2015-08-04 Thread Bastien Guerry
Hi Marcin,

Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 I don't want to be nitpicking, but I'm just curious.  I'm looking at the
 function `org-split-string'.  It uses (two times) the following
 construction:

 (setq list (cons (something) list))

 Is there any particular reason for not using `push' there?

I pushed a tiny clean up here.  Next question is: why not using

(split-string STRING SEPARATORS t)

?

-- 
 Bastien



Re: [O] Emacs-Orgmode Archive search fails

2015-08-04 Thread Bastien Guerry
Hi Charles,

Charles Millar mill...@verizon.net writes:

 It has been a while since I searched the mailing list archives. Did I
 miss an announcement or is the search engine broken?

Did you get any answer by Lars on this?

Thanks,

-- 
 Bastien



Re: [O] Bug: org-clock-sum filter infinite loop [8.2.10 (8.2.10-34-gc41bbc-elpa @ /home/me/.emacs.d/elpa/org-20150223/)]

2015-08-04 Thread Bastien Guerry
Hi Stephen y...@groks.org writes:

 I want to sum clock times for items which are in state TODO in the
 agenda.

Does this still happen?  Did you find the roots of the problem?

Thanks,

-- 
 Bastien



Re: [O] Bleeding edge in elpa

2015-08-04 Thread Bastien Guerry
I believe GNU ELPA should contain the stable release.

Of course, this means we need to have a stable release cycle,
and we should put efforts into that, obviously.

-- 
 Bastien



Re: [O] [PATCH] org-timer.el: Use hh:mm:ss format instead of minutes

2015-08-04 Thread Bastien Guerry
Hi Brice,

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Brice Waegenire brice@gmail.com writes:

 Following is ORG-NEWS entry:

 * Incompatible changes
 ** org-timer-default-timer type changed from number to string
 If you have, in your configuration, something like =(setq
 org-timer-default-timer 10)= replace it with =(setq
 org-timer-default-timer 10)=.
 * New features
 ** Countdown timer support hh:mm:ss format
 In addition to setting countdown timers in minutes, they can also be
 set using the hh:mm:ss format.

 Added. Thank you.

Thanks for this feature.

FWIW, I added a ad hoc mechanism to tolerate numbers as the value of
`org-timer-default-timer'.

-- 
 Bastien



Re: [O] Bug: Typo in manual [8.2.10 (release_8.2.10 @ /usr/share/emacs/24.4/lisp/org/)]

2015-08-04 Thread Bastien Guerry
Hi Reuben,

Reuben Thomas r...@sc3d.org writes:

 The
 default @LaTeX{} output is designed for processing with @code{pdftex} or
 @LaTeX{}

 The last “@LaTeX{}” should presumably be “@code{latex}”.

Yes, this has been fixed, thanks,

-- 
 Bastien



[O] org-src-fontify-natively stops working in 8.3

2015-08-04 Thread Kaushal
Hi,

The source code block fontification stops working in all my org files in
version 8.3.

When I evaluated org-src.el from version 8.2.10, the fontification started
working again.

Is anyone able to replicate this issue?

I have org-src-fontify-natively set to t. Do I need to set anything else in
8.3?

Thanks.



--
Kaushal Modi


Re: [O] org-src-fontify-natively stops working in 8.3

2015-08-04 Thread Kaushal
Using (font-lock-fontify-buffer) as in version 8.2.10 instead of
(font-lock-ensure) in org-src-font-lock-fontify-block fixes this.

But the documentation in font-lock.el suggests using font-lock-ensure
instead of font-lock-fontify-buffer.


--
Kaushal Modi

On Tue, Aug 4, 2015 at 10:38 PM, Kaushal kaushal.m...@gmail.com wrote:

 Hi,

 The source code block fontification stops working in all my org files in
 version 8.3.

 When I evaluated org-src.el from version 8.2.10, the fontification started
 working again.

 Is anyone able to replicate this issue?

 I have org-src-fontify-natively set to t. Do I need to set anything else
 in 8.3?

 Thanks.



 --
 Kaushal Modi