[O] M-S-up/down on plain lists containing text (or multilevel lists)

2014-11-02 Thread James Harkins
In plain lists, if there is indented text underneath a list item, is it 
considered to belong to the list item, or is it just freestanding text?

I'm asking because M-S-up/down doesn't take indented text into account. These 
commands only move the line marked with a list-item indicator (- etc.).

* Heading
  - List item 1
  - List item 2
Indented text
  - List item 3

Position the point on List item 2 and hit M-S-down. You'll get this, which 
seems wrong to me:

* Heading
  - List item 1
Indented text
  - List item 2
  - List item 3

I expected:

* Heading
  - List item 1
  - List item 3
  - List item 2
Indented text

My opinion is that this is a bug, but it's also possible that I don't fully 
understand how org interprets plain lists. It does seem that org has a concept 
of indented text belonging to the list item, because you can use TAB to 
collapse a list item containing indented text, but you can't use it on a list 
item followed by non-indented text.

* Heading
  - List item 1: TAB can fold this item
Indented text
  - List item 2: TAB displays a message in the minibuffer EMPTY ENTRY
Non-indented text
  - List item 3

I also see the same bizarre behavior of M-S-up/down if a list item has a 
sub-list under it.

My org is up-to-date as of 10/15/2014.

hjh



Re: [O] [PATCH] org.el (org-adapt-indentation): Fix typo

2014-11-02 Thread Nicolas Goaziou
Hello,

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

 A patch for a minor docstring typo is attached.

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] M-S-up/down on plain lists containing text (or multilevel lists)

2014-11-02 Thread Nicolas Goaziou
Hello,

James Harkins jamshar...@qq.com writes:

 In plain lists, if there is indented text underneath a list item, is
 it considered to belong to the list item, or is it just freestanding
 text?

The former.

 I'm asking because M-S-up/down doesn't take indented text into
 account. These commands only move the line marked with a list-item
 indicator (- etc.).

 * Heading
   - List item 1
   - List item 2
 Indented text
   - List item 3

 Position the point on List item 2 and hit M-S-down. You'll get this,
 which seems wrong to me:

 * Heading
   - List item 1
 Indented text
   - List item 2
   - List item 3

 I expected:

 * Heading
   - List item 1
   - List item 3
   - List item 2
 Indented text

 My opinion is that this is a bug

Actually, it isn't. This is a feature.

Both `M-S-up' and `M-S-down' work line wise and ignore any structure
around point. OTOH, `M-up' and `M-down' should do what you want.


Regards,

-- 
Nicolas Goaziou



Re: [O] M-S-up/down on plain lists containing text (or multilevel lists)

2014-11-02 Thread James Harkins

On November 2, 2014 4:25:53 PM Nicolas Goaziou m...@nicolasgoaziou.fr wrote:


Actually, it isn't. This is a feature.

Both `M-S-up' and `M-S-down' work line wise and ignore any structure
around point. OTOH, `M-up' and `M-down' should do what you want.


Ah, OK... It would be a bug if there were no function to move a list item 
with its contents. Since there is such a function, just on a different key 
binding, no bug. Thanks.


hjh

Sent with AquaMail for Android
http://www.aqua-mail.com







Re: [O] Patch org-capure-fill-template

2014-11-02 Thread Nicolas Goaziou
Roberto Huelga rhue...@gmail.com writes:

 Suppose you want to write the parent directory name in your capture so write a
 template like

 * %(file-name-nondirectory (directory-file-name (file-name-directory 
 \%F\)))

 Without the patch, file-name-directory get the useless string %F
 instead of a string
 with the full path name of the file.

 The orgmode manual template expansion page describe

  %(sexp) Evaluate Elisp sexp and replace with the result.
For convenience, %:keyword (see below) placeholders
within the expression will be expanded prior to this.
The sexp must return a string.

 But without the patch is not true, first is expanded %(sexp) and after
 that the %OneLetter and later the %:keyword

Understood. Applied, thank you.

Regards,



[O] Function to look-up a certain property

2014-11-02 Thread Alexander Baier
Hello,

I am looking for a function that starts at point and walks up the
outline-tree searching for property P. If P is defined the function
returns P's value, otherwise nil. If The top level headline does not
have a property P, the function looks for #+P between the first headline
and bob.

Is there something in org's code base that does this?

Regards,
-- 
Alexander Baier



Re: [O] Function to look-up a certain property

2014-11-02 Thread Nicolas Goaziou
Hello,

Alexander Baier alexander.ba...@mailbox.org writes:

 I am looking for a function that starts at point and walks up the
 outline-tree searching for property P. If P is defined the function
 returns P's value, otherwise nil. If The top level headline does not
 have a property P, the function looks for #+P between the first headline
 and bob.

 Is there something in org's code base that does this?

  (org-entry-get (point) P t)

However, it will look for #+PROPERTY: P val instead, and it isn't
limited to data before first headline.


Regards,

-- 
Nicolas Goaziou



Re: [O] Contribution to org-mode, Eldoc support

2014-11-02 Thread Aaron Ecay
Hi Lukasz,

Thanks for your contribution.

2014ko azaroak 1an, Łukasz Gruner-ek idatzi zuen:
 
 Hi
 
 I would like to contribute Eldoc support.
 I've already changed license, but dont quite get that pgp part, I have
 generated my pgp and now what?

There’s a couple of issues.

1. Write access to the org repository.  For that you need an SSH (not
   PGP) key.  This tutorial from GitHub
   https://help.github.com/articles/generating-ssh-keys/ goes over
   what is needed.  When you get to step 3, instead of entering the key
   file in GitHub’s website, you email it to Jason Dunsmore or Bastien
   Guerry.

2. Copyright assignment.  For code in org’s core, you need to have a
   copyright assignment on file with the FSF (because any code in org
   will eventually become part of emacs).  The process is documented
   here: http://orgmode.org/worg/org-contribute.html#unnumbered-2.
   The org mode repo has a contrib directory, where it is OK to put code
   without a copyright assignment.  This is bundled into
   org-plus-contrib packages that many people install, but cannot be put
   into emacs releases.

   So org-eldoc can be added to contrib immediately, and then moved to
   the core (i.e. out of contrib) when the copyright assignment is
   complete (if you decide that copyright assignment is something you
   want to do, and also subject to the judgment of the org maintainers).

Does that make sense?

Thanks again,

-- 
Aaron Ecay



[O] Previewing chemfig

2014-11-02 Thread Garreau, Alexandre
Hello, I’d like to being able to preview chemfig, like lines beginning
with \chemfig{.

But (a) they’re not detected as LaTeX fragments by the previewer (and it
seems only some matchers are accepted by default, I can’t say, for
instance, “^{\\[a-zA-Z]*[a-zA-Z0-9 ].*}$”), and (b) when previewing I
don’t see any way to include packages, like “\usepackage{chemfig}”, so
that even “\begin{flushleft}\n\chemfig{O=O}\n\end{flushleft}”, for
instance, doesn’t work.

Is there any way to do this? Otherwise, how could I fix it? Which part
of org-mode to hack? Could this be improved for next release?


pgp0mtLjH0PoM.pgp
Description: PGP signature


Re: [O] Contribution to org-mode, Eldoc support

2014-11-02 Thread Rasmus
Hi Łukasz,

Thanks for the patch.

I tested your package briefly, but I did not look into the code.

Łukasz Gruner luk...@gruner.lu writes:

 I would like to contribute Eldoc support.

It works nice for source blocks.  However, I don't get any feedback in
header-lines:

 #+header:
 #+begin_src emacs-lisp
 ...
 #+end_src

On headlines, I'm a bit surprised that it shows breadcrumbs.  Normally,
eldoc provides feedback for what arguments are possible I think.  Would
it not make more sense — in terms of what I expect when I turn eldoc on
— if it showed what can be a each location.  E.g. right after ^* there
is an optional TODO keyword/state. 

Also, I think it should somehow just work when I turn on eldoc in Org,
i.e. not the extra steps needed with the hook or the other way to load
it.

 I've already changed license, but dont quite get that pgp part, I have
 generated my pgp and now what?

I'm not sure about this.  Have you signed the FSF paperwork?  I did not
find a Gruner here:

 http://orgmode.org/worg/org-contribute.html

—Rasmus

-- 
What will be next?





Re: [O] Previewing chemfig

2014-11-02 Thread Nicolas Goaziou
Hello,

Garreau, Alexandre galex-...@galex-713.eu writes:

 Hello, I’d like to being able to preview chemfig, like lines beginning
 with \chemfig{.

 But (a) they’re not detected as LaTeX fragments by the previewer (and it
 seems only some matchers are accepted by default, I can’t say, for
 instance, “^{\\[a-zA-Z]*[a-zA-Z0-9 ].*}$”), and (b) when previewing I
 don’t see any way to include packages, like “\usepackage{chemfig}”, so
 that even “\begin{flushleft}\n\chemfig{O=O}\n\end{flushleft}”, for
 instance, doesn’t work.

Have you tried

  #+LATEX_HEADER: \usepackage{chemfig}


Regards,

-- 
Nicolas Goaziou



Re: [O] Function to look-up a certain property

2014-11-02 Thread Alexander Baier
On 2014-11-02 18:08 Nicolas Goaziou wrote:
 Hello,

 Alexander Baier alexander.ba...@mailbox.org writes:

 I am looking for a function that starts at point and walks up the
 outline-tree searching for property P. If P is defined the function
 returns P's value, otherwise nil. If The top level headline does not
 have a property P, the function looks for #+P between the first headline
 and bob.

 Is there something in org's code base that does this?

   (org-entry-get (point) P t)

 However, it will look for #+PROPERTY: P val instead, and it isn't
 limited to data before first headline.

This is perfect, thank you!

Regards,
-- 
Alexander Baier



Re: [O] Patch org-capure-fill-template

2014-11-02 Thread Roberto Huelga
I founded a section in the org-contribute.html with the names of the
tiny change contributors,
Do you know how could I get my name there? This is my second
tinychange patch. And
get my name in the list will make my day.

Thanks

2014-11-02 10:44 GMT+01:00 Nicolas Goaziou m...@nicolasgoaziou.fr:
 Roberto Huelga rhue...@gmail.com writes:

 Suppose you want to write the parent directory name in your capture so write 
 a
 template like

 * %(file-name-nondirectory (directory-file-name (file-name-directory 
 \%F\)))

 Without the patch, file-name-directory get the useless string %F
 instead of a string
 with the full path name of the file.

 The orgmode manual template expansion page describe

  %(sexp) Evaluate Elisp sexp and replace with the result.
For convenience, %:keyword (see below) placeholders
within the expression will be expanded prior to this.
The sexp must return a string.

 But without the patch is not true, first is expanded %(sexp) and after
 that the %OneLetter and later the %:keyword

 Understood. Applied, thank you.

 Regards,



Re: [O] Previewing chemfig

2014-11-02 Thread Garreau, Alexandre
Le 02/11/2014 à 20h45, Nicolas Goaziou a écrit :
 Hello,

 Garreau, Alexandre galex-...@galex-713.eu writes:

 Hello, I’d like to being able to preview chemfig, like lines beginning
 with \chemfig{.

 But (a) they’re not detected as LaTeX fragments by the previewer (and it
 seems only some matchers are accepted by default, I can’t say, for
 instance, “^{\\[a-zA-Z]*[a-zA-Z0-9 ].*}$”), and (b) when previewing I
 don’t see any way to include packages, like “\usepackage{chemfig}”, so
 that even “\begin{flushleft}\n\chemfig{O=O}\n\end{flushleft}”, for
 instance, doesn’t work.

 Have you tried

   #+LATEX_HEADER: \usepackage{chemfig}

Yes. I think it doesn’t influence the preview system.


pgpipbwEYfOGI.pgp
Description: PGP signature


Re: [O] Beamer export of columns should use \columnwidth

2014-11-02 Thread Julien Cubizolles
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Julien Cubizolles j.cubizol...@free.fr writes:

 I don't think there would be any inconvenients to changing \textwidth to
 \columnwidth for regular beamer files (it's fine with my beamer files so
 far).

 I agree. Done in master. Thank you for suggesting it.

The latest org-plus-contrib (20141027) from org/melpa seems to have
reverted to using \textwidth instead of \columnwidth. Why is that ? The
master branch from git is ok though (meaning it uses \columnwidth).

Julien.




[O] better interaction with gnuplot-mode

2014-11-02 Thread Mario Frasca
a couple of weeks ago I decided I would use emacs for my spreadsheets. I
first tried with `ses`, then I was pointed at the spreadsheet
capabilities of org-mode. but I also needed to see a graph
representation of the data.

http://stackoverflow.com/questions/26614536/

tables in org-mode work really nice, but I wanted the resulting graph in
an emacs buffer, and in svg format. so I first ask the developer of
gnuplot-mode about it and we (well, actually _he_) came with a couple of
small edits that permit this.

https://github.com/bruceravel/gnuplot-mode/issues/20

during the process we found two spots in org-plot/gnuplot that we think
are in need of editing.

one is relative to the cleaning up of the temporary files.
the other is relative to killing (or not) the gnuplot process.

the patches are attached.

the discussion is in the issue:20 of
https://github.com/bruceravel/gnuplot-mode/

MF

From be72bf875a9abd64869f1c0bd1c6ad50fa93e514 Mon Sep 17 00:00:00 2001
From: Mario Frasca mrgsfra...@gmail.com
Date: Sun, 2 Nov 2014 08:53:27 -0500
Subject: [PATCH 2/2] correct the callback for the  and register it as soon as
 possible.

---
 lisp/org-plot.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index 69d9250..faa34fc 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -294,6 +294,7 @@ line directly before or after the table.
 	   (table (org-table-to-lisp))
 	   (num-cols (length (if (eq (first table) 'hline) (second table)
 			   (first table)
+  (run-with-idle-timer 0.1 nil #'delete-file data-file)
   (while (equal 'hline (first table)) (setf table (cdr table)))
   (when (equal (second table) 'hline)
 	(setf params (plist-put params :labels (first table))) ;; headers to labels
@@ -344,8 +345,7 @@ line directly before or after the table.
 	(gnuplot-mode)
 	(gnuplot-send-buffer-to-gnuplot))
   ;; cleanup
-  (bury-buffer (get-buffer *gnuplot*))
-  (run-with-idle-timer 0.1 nil (lambda () (delete-file data-file))
+  (bury-buffer (get-buffer *gnuplot*)
 
 (provide 'org-plot)
 
-- 
1.9.1


From ebd2cd9b23138a39ad9ea4b517934c93757c2b4d Mon Sep 17 00:00:00 2001
From: Mario Frasca mrgsfra...@gmail.com
Date: Sun, 2 Nov 2014 08:50:47 -0500
Subject: [PATCH 1/2] do not kill the gnuplot process. just jump to end of
 buffer and rely on  command to do the resetting job.

---
 lisp/org-plot.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index 556b9ef..69d9250 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -281,8 +281,7 @@ line directly before or after the table.
 (delete-other-windows)
 (when (get-buffer *gnuplot*) ;; reset *gnuplot* if it already running
   (with-current-buffer *gnuplot*
-	(goto-char (point-max))
-	(gnuplot-delchar-or-maybe-eof nil)))
+	(goto-char (point-max
 (org-plot/goto-nearest-table)
 ;; set default options
 (mapc
-- 
1.9.1




signature.asc
Description: OpenPGP digital signature


Re: [O] How to extract TODOs from date-tree

2014-11-02 Thread Alan Schmitt
On 2014-10-29 15:34, Robert Horn rjh...@alum.mit.edu writes:

 Jay Iyer writes:

 If there are use cases out there, it might be worth collecting them and
 then thinking about how to support them better. If there aren't, maybe
 it should be thrown out.

 It's most definitely useful.  I'm not sure what you think would be
 better.  I make extensive use of date tree for maintaining various log
 book journals.  I've got various capture templates set up so that the
 two characters: F* char take me to the right file and date tree.  I
 type in the note, then C-c C-c takes me back where I had been
 previously.  The template capures the date and time for the note, plus
 other context information per the template.  This creates very nice time
 tagged logs.

I also use datetrees regularly. I have this in my capture templates:

#+begin_src emacs-lisp
(setq org-capture-templates
  (quote
(o Old Journal entry (file+datetree+prompt diary-runx.org)
 * %i%?)
(O Old Journal with link entry (file+datetree+prompt 
diary-runx.org)
 * %i%?\n%a)
(j Journal entry (file+datetree diary-runx.org)
 * %?\nEntered on %U\n  %i)
(J Journal with link entry (file+datetree diary-runx.org)
 * %?\nEntered on %U\n  %i\n  %a)))
#+end_src

Typical usage for a trivial topic: I watch a movie that I like, I write
a quick review in movies.org, I mark the title of the movie, and capture
with 'J'. It gives me an entry with the highlighted title and a link to
the review.

Less trivial usage: as a meeting start, I start a capture with 'j', and
C-u C-c C-c to jump to the diary file where I can take notes.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


[O] [RFC/PATCH] org-goto: Update for isearch changes

2014-11-02 Thread Kyle Meyer
Hello,

As of Emacs 24.4, isearch no longer has the function
isearch-other-control-char, which is bound in
org-goto-local-auto-isearch-map.

I've attached a patch that seems to produce the correct behavior with
Emacs 24.4. However, I haven't used this interface enough in the past (I
have org-goto-interface set to 'outline-path-completion') to be
confident that the patch keeps the intended behavior.

From 84b00057fe853649b33ecaff15890c98541af68b Mon Sep 17 00:00:00 2001
From: Kyle Meyer k...@kyleam.com
Date: Sun, 2 Nov 2014 01:32:43 -0400
Subject: [PATCH] org-goto: Update for isearch changes

* lisp/org.el (org-goto): Update for isearch changes that removed
isearch-other-control-char.

isearch-other-control-char has been removed from isearch.el [1]. The
default interface for org-go uses isearch-other-control-char to pass
certain key presses from org-goto-local-auto-isearch-map to
org-goto-map. Specifically, 'C-i' calls org-cycle and 'C-m' calls
org-goto-ret.

With the current isearch, the keys that should be passed to org-goto-map
can be set to nil.

[1] bzr revision 114586, git commit aa04ac2c6,
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15200
---
 lisp/org.el | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 1b17d2c..cfb7ed9 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7523,8 +7523,13 @@ (defun org-get-location (buf help)
 
 (defvar org-goto-local-auto-isearch-map (make-sparse-keymap))
 (set-keymap-parent org-goto-local-auto-isearch-map isearch-mode-map)
-(define-key org-goto-local-auto-isearch-map \C-i 'isearch-other-control-char)
-(define-key org-goto-local-auto-isearch-map \C-m 'isearch-other-control-char)
+(if (boundp 'isearch-other-control-char)
+(progn
+  (define-key org-goto-local-auto-isearch-map \C-i 'isearch-other-control-char)
+  (define-key org-goto-local-auto-isearch-map \C-m 'isearch-other-control-char))
+  (define-key org-goto-local-auto-isearch-map \C-i nil)
+  (define-key org-goto-local-auto-isearch-map \C-m nil)
+  (define-key org-goto-local-auto-isearch-map [return] nil))
 
 (defun org-goto-local-search-headings (string bound noerror)
   Search and make sure that any matches are in headlines.
-- 
2.1.3


--
Kyle


Re: [O] Previewing chemfig

2014-11-02 Thread Nicolas Goaziou
Garreau, Alexandre galex-...@galex-713.eu writes:

 Have you tried

   #+LATEX_HEADER: \usepackage{chemfig}

 Yes. I think it doesn’t influence the preview system.

It should. Perhaps your Org is outdated.


Regards,

-- 
Nicolas Goaziou



Re: [O] Beamer export of columns should use \columnwidth

2014-11-02 Thread Nicolas Goaziou
Hello,

Julien Cubizolles j.cubizol...@free.fr writes:

 The latest org-plus-contrib (20141027) from org/melpa seems to have
 reverted to using \textwidth instead of \columnwidth. Why is that ? The
 master branch from git is ok though (meaning it uses \columnwidth).

org-plus-contrib is stable (maint) branch. The change was applied on
development (master) branch.


Regards,

-- 
Nicolas Goaziou



[O] :components part in org-publish-project-alist fails

2014-11-02 Thread Julien Cubizolles
In git master, consider the following,

--8---cut here---start-8---
#+begin_src emacs-lisp :tangle yes :exports none
  (setq org-publish-project-alist
`((latex
   :base-directory ./
   :publishing-directory ./
   :publishing-function org-latex-publish-to-pdf
   :exclude .*
   :latex-class article
   :include (test.org)
   )
   (global :components (latex
#+end_src

#+RESULTS:
| latex  | :base-directory | ./  | :publishing-directory | ./ | 
:publishing-function | org-latex-publish-to-pdf | :exclude | .* | :latex-class 
| article | :include | (test.org) |
| global | :components | (latex) |   || 
 |  |  ||  | |  
||

* Ceci est un essai
* Ceci est un deuxième heading
--8---cut here---end---8---

evaluate the source block with C-c C-c and publish the latex project
(C-c C-e P x latex). The publication works. However the global project
fails. The message in the *Org Export Process* buffer is just nil...

I've been using this setup for a while without any problem in the
past. The latest master from git broke it.

Julien.




Re: [O] Patch org-capure-fill-template

2014-11-02 Thread Nicolas Goaziou
Roberto Huelga rhue...@gmail.com writes:

 I founded a section in the org-contribute.html with the names of the
 tiny change contributors,
 Do you know how could I get my name there? This is my second
 tinychange patch. And
 get my name in the list will make my day.

Your name is already in that list. You may need to refresh your
browser's cache.


Regards,

-- 
Nicolas Goaziou



[O] [PATCH] md backend needs to add blank line before some lists

2014-11-02 Thread Charles C. Berry


John Hendy pointed out [1] that

list
- item1
- item2

Isn't the same as this:

list

- item1
- item2

when exported using the `md' backend (or its derivatives). But it needs to 
be to generate a proper document (at least with engines like pandoc.)


The attached patch enables this by adding a blank line after a 
`paragraph', but before a `plain-list' as long as the `paragraph' is not 
itself inside a list.


In other words, with the patch, the `md' export renders both lists with a 
blank line after the preceeding paragraph.


HTH,

Chuck

p.s. I have assigned copyright to FSF as `Charles Chester Berry' on Sept 
23, 2014 (RT: 945490).


Footnote [1]: http://thread.gmane.org/gmane.emacs.orgmode/92289From 8e82dbb23109e2bf13281d3f929bdddb9096d13d Mon Sep 17 00:00:00 2001
From: chasberry ccbe...@ucsd.edu
Date: Sun, 2 Nov 2014 13:16:55 -0800
Subject: [PATCH] lisp/ox-md.el: Fix lists following paragraphs

* lisp/ox-md.el (org-md-separate-elements): Add a line after a
  paragraph that preceeds a list, but is not itself contained in a
  list.

  Markdown needs a blank line following a paragraph to understand that
  a list really is a list. However, nested lists do not need this and
  adding the blank line would result in extra whitespace when
  formatted for display.
---
 lisp/ox-md.el | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index 9625948..fd950d2 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -110,7 +110,7 @@ exceptions to this rule:
 
   1. Preserve blank lines between sibling items in a plain list,
 
-  2. Outside of plain lists, preserve blank lines between
+  2. Outside of plain lists, preserve or add blank lines between
  a paragraph and a plain list,
 
   3. In an item, remove any blank line before the very first
@@ -127,6 +127,13 @@ Assume BACKEND is `md'.
((not (eq (org-element-type (org-element-property :parent e)) 'item)))
(t (org-element-put-property
   e :post-blank (if (org-export-get-previous-element e info) 1 0))
+  (org-element-map tree 'paragraph
+(lambda (e)
+  (if
+ (eq (org-element-type (org-export-get-next-element e info))
+ 'plain-list)
+ (org-element-put-property e :post-blank 1)))
+nil nil 'plain-list)
   ;; Return updated tree.
   tree)
 
-- 
1.9.3 (Apple Git-50)



Re: [O] Previewing chemfig

2014-11-02 Thread John Kitchin
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

Interestingly, this:

#+LATEX_HEADER: \usepackage{chemfig}


$\chemfig{A-B-[1]C-[3]-D-[7]E-[6]F}$


exports to pdf correctly, but the latex preview is not correct. All the
letters are jumbled on top of each other.

 Garreau, Alexandre galex-...@galex-713.eu writes:

 Have you tried

   #+LATEX_HEADER: \usepackage{chemfig}

 Yes. I think it doesn’t influence the preview system.

 It should. Perhaps your Org is outdated.


 Regards,

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



[O] better interaction with gnuplot-mode

2014-11-02 Thread Mario Frasca
a couple of weeks ago I decided I would use emacs for my spreadsheets. I
first tried with `ses`, then I was pointed at the spreadsheet
capabilities of org-mode. but I also needed to see a graph
representation of the data.

http://stackoverflow.com/questions/26614536/

tables in org-mode work really nice, but I wanted the resulting graph in
an emacs buffer, and in svg format. so I first ask the developer of
gnuplot-mode about it and we (well, actually _he_) came with a couple of
small edits that permit this.

https://github.com/bruceravel/gnuplot-mode/issues/20

during the process we found two spots in org-plot/gnuplot that we think
are in need of editing.

one is relative to the cleaning up of the temporary files.
the other is relative to killing (or not) the gnuplot process.

the patches are attached.

the discussion is in the issue:20 of
https://github.com/bruceravel/gnuplot-mode/

MF
From be72bf875a9abd64869f1c0bd1c6ad50fa93e514 Mon Sep 17 00:00:00 2001
From: Mario Frasca mrgsfra...@gmail.com
Date: Sun, 2 Nov 2014 08:53:27 -0500
Subject: [PATCH 2/2] correct the callback for the  and register it as soon as
 possible.

---
 lisp/org-plot.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index 69d9250..faa34fc 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -294,6 +294,7 @@ line directly before or after the table.
 	   (table (org-table-to-lisp))
 	   (num-cols (length (if (eq (first table) 'hline) (second table)
 			   (first table)
+  (run-with-idle-timer 0.1 nil #'delete-file data-file)
   (while (equal 'hline (first table)) (setf table (cdr table)))
   (when (equal (second table) 'hline)
 	(setf params (plist-put params :labels (first table))) ;; headers to labels
@@ -344,8 +345,7 @@ line directly before or after the table.
 	(gnuplot-mode)
 	(gnuplot-send-buffer-to-gnuplot))
   ;; cleanup
-  (bury-buffer (get-buffer *gnuplot*))
-  (run-with-idle-timer 0.1 nil (lambda () (delete-file data-file))
+  (bury-buffer (get-buffer *gnuplot*)
 
 (provide 'org-plot)
 
-- 
1.9.1

From ebd2cd9b23138a39ad9ea4b517934c93757c2b4d Mon Sep 17 00:00:00 2001
From: Mario Frasca mrgsfra...@gmail.com
Date: Sun, 2 Nov 2014 08:50:47 -0500
Subject: [PATCH 1/2] do not kill the gnuplot process. just jump to end of
 buffer and rely on  command to do the resetting job.

---
 lisp/org-plot.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index 556b9ef..69d9250 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -281,8 +281,7 @@ line directly before or after the table.
 (delete-other-windows)
 (when (get-buffer *gnuplot*) ;; reset *gnuplot* if it already running
   (with-current-buffer *gnuplot*
-	(goto-char (point-max))
-	(gnuplot-delchar-or-maybe-eof nil)))
+	(goto-char (point-max
 (org-plot/goto-nearest-table)
 ;; set default options
 (mapc
-- 
1.9.1



signature.asc
Description: OpenPGP digital signature


Re: [O] [PATCH] New version of org-velocity

2014-11-02 Thread Paul Rodriguez
I'm afraid I don't understand the question. Is there a problem with the
patch?

Paul Rodriguez.


On Thu, Oct 30, 2014 at 2:18 PM, Marco Wahl marcowahls...@gmail.com wrote:

 Hello Paul,

 Paul Rodriguez p...@ruricolist.com writes:

  This is a new version of org-velocity. Principally it differs in using
  cl-lib and lexical binding, but there are also some minor bugfixes for
  presenting results on very large screens and compatibility with
  evil-mode.

 Thanks for sharing.

 Is there any reason not bringing your new version into the master
 branch?


 Best regards,  Marco
 --
 http://www.wahlzone.de
 GPG: 0x0A3AE6F2



[O] Bug: Org leaves whitespace around :LOGBOOK: [8.2.10 (release_8.2.10 @ /home/jsynacek/.local/share/emacs/24.4/lisp/org/)]

2014-11-02 Thread Jan Synacek
Hello,

I'm not sure if this is by design or not, but it sure looks like a bug
to me and is quite annoying.

Reproducer:
1) emacs -Q
2) eval the following:
(require 'org)
(setq org-log-done 'time)
(setq org-log-into-drawer t)
(setq org-todo-keywords
  '((sequence TODO(t) WAITING(w@/!) | DONE(d!
3) create a temporary org-mode buffer, insert an item in it, and C-c C-t
   on the item (set the item to the WAITING state)
4) notice the whitespace after :LOGBOOK: and :END:, creating sort of a box

Emacs  : GNU Emacs 24.4.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9)
 of 2014-10-22 on jsynacek-ntb-work.brq.redhat.com
Package: Org-mode version 8.2.10 (release_8.2.10 @ 
/home/jsynacek/.local/share/emacs/24.4/lisp/org/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-log-done 'time
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook org-show-block-all 
append local] 5]
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook 
org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-todo-keywords '((sequence TODO(t) WAITING(w@/!) | DONE(d!)))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-log-into-drawer t
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )

Cheers,
-- 
Jan Synacek
Software Engineer, Red Hat



Re: [O] [PATCH] New version of org-velocity

2014-11-02 Thread Paul Rodriguez
I am not a committer. Previously I've always sent in new versions of
org-velocity as patches, following the procedure on the Org wiki. I don't
usually follow the mailing list, so perhaps the procedure for handling
contributions has changed without my noticing. If so I'm happy to adjust.

Paul Rodriguez.

On Fri, Oct 31, 2014 at 2:58 AM, Marco Wahl marcowahls...@gmail.com wrote:

 Paul Rodriguez p...@ruricolist.com writes:

  I'm afraid I don't understand the question. Is there a problem with the
  patch?

 AFAICS there is no problem with your patch.

 I just wonder about how your patch could be applied to the repository.
 Can you do this?


 Best regards,  Marco
 --
 http://www.wahlzone.de
 GPG: 0x0A3AE6F2



[O] Bug: Org Bable: Set R-specific buffer-wide graphics headers == no R src block eval [8.2.10 (8.2.10-1-g8b63dc-elpa @ /home/user/.emacs.d/elpa/org-20141027/)]

2014-11-02 Thread myq larson
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


The documentation suggests that the following should be possible:

,
| #+PROPERTY: header-args:R :exports results
| #+PROPERTY: header-args   :results output graphics
| #+PROPERTY: header-args:R :width 400
|
| #+BEGIN_SRC R :file /tmp/bug.png
|   plot(rnorm(100));
| #+END_SRC
`

But the third line (`#+PROPERTY: header-args:R :width 400') silently
prevents /all/ R blocks from being evaluated. Changing the document to
the following works:

,
| #+PROPERTY: header-args:R :exports results
| #+PROPERTY: header-args   :results output graphics
|
| #+BEGIN_SRC R  :width 400 :file /tmp/bug.png
|   plot(rnorm(100));
| #+END_SRC
`

but doing so means that buffer-wide, /language-specific/ header defaults can not
be set to maintain consistency (at least for R) which is unfortunate. It
seems that buffer-wide headers can be set for /specific languages/, but
not language-specific headers? Maybe I haven't read enough of the
documentation yet, but it seems like that should be possible.

Thank you very much for this wonderful code/format/project. It's very useful!

Emacs  : GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2)
 of 2014-02-23 on chindi10, modified by Debian
Package: Org-mode version 8.2.10 (8.2.10-1-g8b63dc-elpa @
/home/myq/.emacs.d/elpa/org-20141027/)

current state:
==
(setq
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-latex-packages-alist '(( booktabs t))
 org-src-fontify-natively t
 org-html-format-inlinetask-function 'ignore
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
org-cycle-hide-drawers org-cycle-hide-inline-tasks
  org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-fontify-done-headline t
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-src-lang-modes '((ocaml . tuareg) (elisp . emacs-lisp)
(ditaa . artist) (asymptote . asy)
  (dot . fundamental) (sqlite . sql) (calc .
fundamental) (C . c)
  (cpp . c++) (C++ . c++) (screen .
shell-script) (bash . sh))
 org-html-format-headline-function 'ignore
 org-log-done 'time
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-default-notes-file notes.org
 org-latex-classes '((beamer \\documentclass[presentation]{beamer}
  (\\section{%s} . \\section*{%s})
(\\subsection{%s} . \\subsection*{%s})
  (\\subsubsection{%s} . \\subsubsection*{%s}))
 (article \\documentclass[11pt]{article}
(\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s})
  (\\subsubsection{%s} . \\subsubsection*{%s})
  (\\paragraph{%s} . \\paragraph*{%s})
  (\\subparagraph{%s} . \\subparagraph*{%s}))
 (report \\documentclass[11pt]{report}
(\\part{%s} . \\part*{%s})
  (\\chapter{%s} . \\chapter*{%s})
(\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s})
  (\\subsubsection{%s} . \\subsubsection*{%s}))
 (book \\documentclass[11pt]{book}
(\\part{%s} . \\part*{%s})
  (\\chapter{%s} . \\chapter*{%s})
(\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s})
  (\\subsubsection{%s} . \\subsubsection*{%s}))
 )
 org-babel-exp-call-line-template '\\num{%line}
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-export-backends '(ascii beamer html icalendar latex md odt org s5)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-latex-tables-booktabs t
 org-latex-default-figure-position tbh!
 org-mode-hook '(#[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook
org-show-block-all append local] 5]
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local] 5]
 

[O] Header/preface definitions in ox-taskjuggler?

2014-11-02 Thread John Hendy
I note that the defaults for a taskjuggler export in Org are as
follows, with taskjuggler syntax and related org variable definitions
listed.

Project tj syntax: project [id] name [version] interval2 [{
attributes }]

Org defaults:
- id: nil
- name: name of heading tagged with org-taskjuggler-project-tag
- version: org-taskjugler-default-project-version
- interval2: SCHEDULED: date + org-default-project-duration

For some reason the default global properties are defined as:

shift s40 Part time shift {
  workinghours wed, thu, fri off
}

I'm interpreting this to mean W-F are off days? If that's the
correct interpretation per the syntax, I don't understand why this
would be the default definition. Then again, perhaps it's just a
definition and you have to apply it to a task to use it?
- http://www.taskjuggler.org/tj3/manual/workinghours.shift.html

In any case, this is the one that's goofing me up. The first task gets
the following lines prepended to it:

task task1 task1 {
  purge allocate



Re: [O] Header/preface definitions in ox-taskjuggler?

2014-11-02 Thread John Hendy
Edit: sorry about the premature send. Bad accidental tab + enter from
gmail! Here's the intended email:
===

I note that the defaults for a taskjuggler export in Org are as
follows, with taskjuggler syntax and related org variable definitions
listed.

Project tj syntax: project [id] name [version] interval2 [{
attributes }]

Org defaults:
- id: nil
- name: name of heading tagged with org-taskjuggler-project-tag
- version: org-taskjugler-default-project-version
- interval2: SCHEDULED: date + org-default-project-duration

For some reason the default global properties are defined as:

shift s40 Part time shift {
  workinghours wed, thu, fri off
}

I'm interpreting this to mean W-F are off days? If that's the
correct interpretation per the syntax, I don't understand why this
would be the default definition. Then again, perhaps it's just a
definition and you have to apply it to a task to use it?
- http://www.taskjuggler.org/tj3/manual/workinghours.shift.html

In any case, this is the one that's goofing me up. The first task gets
the following lines prepended to it:

task task1 task1 {
  purge allocate
  allocate username
...
}

If one doesn't use the effort attribute (but duration or length
instead), you get a warning regarding resources having been requested
but none being assigned (because effort is the only time-related
attribute that calls for a person to translate effort into calendar
length). Is there a reason ox-taskjuggler defaults to
creating/assigning resources?


John



Re: [O] [PATCH] md backend needs to add blank line before some lists

2014-11-02 Thread Nicolas Goaziou
Hello,

Charles C. Berry ccbe...@ucsd.edu writes:

 The attached patch enables this by adding a blank line after a 
 `paragraph', but before a `plain-list' as long as the `paragraph' is not 
 itself inside a list.

Thanks for your patch. I applied a different one, though. 

I find blank lines rules in Markdown very unclear.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Org leaves whitespace around :LOGBOOK: [8.2.10 (release_8.2.10 @ /home/jsynacek/.local/share/emacs/24.4/lisp/org/)]

2014-11-02 Thread Nicolas Goaziou
Hello,

Jan Synacek jsyna...@redhat.com writes:

 I'm not sure if this is by design or not, but it sure looks like a bug
 to me and is quite annoying.

 Reproducer:
 1) emacs -Q
 2) eval the following:
 (require 'org)
 (setq org-log-done 'time)
 (setq org-log-into-drawer t)
 (setq org-todo-keywords
   '((sequence TODO(t) WAITING(w@/!) | DONE(d!
 3) create a temporary org-mode buffer, insert an item in it, and C-c C-t
on the item (set the item to the WAITING state)
 4) notice the whitespace after :LOGBOOK: and :END:, creating sort of a box

 Emacs  : GNU Emacs 24.4.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9)
  of 2014-10-22 on jsynacek-ntb-work.brq.redhat.com
 Package: Org-mode version 8.2.10 (release_8.2.10 @ 
 /home/jsynacek/.local/share/emacs/24.4/lisp/org/)

FWIW, I cannot reproduce it on development version (8.3_beta).


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC/PATCH] org-goto: Update for isearch changes

2014-11-02 Thread Nicolas Goaziou
Hello,

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

 As of Emacs 24.4, isearch no longer has the function
 isearch-other-control-char, which is bound in
 org-goto-local-auto-isearch-map.

 I've attached a patch that seems to produce the correct behavior with
 Emacs 24.4. However, I haven't used this interface enough in the past (I
 have org-goto-interface set to 'outline-path-completion') to be
 confident that the patch keeps the intended behavior.

C-i and C-m seem to work out the box in Emacs 24.4 anyway. Maybe the
following is sufficient:

  (when (fboundp 'isearch-other-control-char)
(define-key ...)
(define-key ...))

I.e, no need to bind these keys to nil.

Also, you should add a comment about deprecation once we drop support
for emacs 24.3.


Regards,

-- 
Nicolas Goaziou



[O] Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes

2014-11-02 Thread John Hendy
I ran into an error with a 30min task which used the :effort: property
to set this duration. Upon compilation, I noted the warning:
```
file.tjp:10: Warning: 400.0d of effort of task one does not fit into
the project time frame.
Warning: 1 tasks could not be scheduled
```

I looked at the .tjp file, and 30min had been converted to 4800.0
hours. I was able to reproduce with the following setup:

#+begin_src min-config
  (add-to-list 'load-path ~/.elisp/org.git/contrib/lisp/)
  (require 'ox-taskjuggler)
#+end_src

emacs -Q
M-x load-file ~/path/to/min-config

#+begin_src tj-time-test.org

* Project :taskjuggler_project:
** task1-effort-min
   :PROPERTIES:
   :start:2014-11-01
   :effort:   30min
   :allocate: jwhendy
   :END:
** task2-duration-min
   :PROPERTIES:
   :duration: 30min
   :allocate: jwhendy
   :blocker:  previous-sibling
   :END:

#+end_src

Exported this via =C-e J j=; report section omitted below.

#+begin_src tj-time-test.tjp

project nil Project 1.0 2014-11-02 +280d {
}
shift s40 Part time shift {
  workinghours wed, thu, fri off
}
resource jwhendy  {
}
task project Project {
  task task1_effort_min task1-effort-min {
purge allocate
allocate jwhendy
effort 4800.0h
start 2014-11-01
  }
  task task2_duration_min task2-duration-min {
depends !task1_effort_min
purge allocate
allocate jwhendy
duration 30min
  }
}

#+end_src

Note the effort vs. duration time processing.

I tried the property :Effort: instead, as that's used in Worg and I
wondered if it was built-in (even though any tj attribute should be
able to be passed through a property) and got the same result.

From what I can tell, effort/duration/length all have the same
definition structure:
- http://www.taskjuggler.org/tj3/manual/effort.html
- http://www.taskjuggler.org/tj3/manual/duration.html


Thanks for any feedback or requests for more info.


John



Re: [O] :components part in org-publish-project-alist fails

2014-11-02 Thread Nicolas Goaziou
Hello,

Julien Cubizolles j.cubizol...@free.fr writes:

 In git master, consider the following,

 #+begin_src emacs-lisp :tangle yes :exports none
   (setq org-publish-project-alist
 `((latex
:base-directory ./
:publishing-directory ./
:publishing-function org-latex-publish-to-pdf
:exclude .*
:latex-class article
:include (test.org)
)
(global :components (latex
 #+end_src

 #+RESULTS:
 | latex  | :base-directory | ./  | :publishing-directory | ./ | 
 :publishing-function | org-latex-publish-to-pdf | :exclude | .* | 
 :latex-class | article | :include | (test.org) |
 | global | :components | (latex) |   ||   
|  |  ||  |
  |  ||

 * Ceci est un essai
 * Ceci est un deuxième heading

 evaluate the source block with C-c C-c and publish the latex project
 (C-c C-e P x latex). The publication works. However the global project
 fails. The message in the *Org Export Process* buffer is just nil...

 I've been using this setup for a while without any problem in the
 past. The latest master from git broke it.

I cannot reproduce it. Publishing global project succeeds.


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC/PATCH] org-goto: Update for isearch changes

2014-11-02 Thread Kyle Meyer
Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
[...]
 C-i and C-m seem to work out the box in Emacs 24.4 anyway. Maybe the
 following is sufficient:

   (when (fboundp 'isearch-other-control-char)
 (define-key ...)
 (define-key ...))

 I.e, no need to bind these keys to nil.

Hmm, I tried that (and just checked it again), but it doesn't work on my
end. C-m will exit isearch but not the indirect org-goto buffer. A
second C-m is needed to get back to the main buffer. (This is also true
for return, which is why it is also set to nil.) For C-i, it adds ^I to
the search string instead of cycling.

 Also, you should add a comment about deprecation once we drop support
 for emacs 24.3.

Will do.

--
Kyle



Re: [O] Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes

2014-11-02 Thread Nicolas Goaziou
Hello,

John Hendy jw.he...@gmail.com writes:

 I ran into an error with a 30min task which used the :effort: property
 to set this duration. Upon compilation, I noted the warning:
 ```
 file.tjp:10: Warning: 400.0d of effort of task one does not fit into
 the project time frame.
 Warning: 1 tasks could not be scheduled
 ```

 I looked at the .tjp file, and 30min had been converted to 4800.0
 hours. I was able to reproduce with the following setup:

 #+begin_src min-config
   (add-to-list 'load-path ~/.elisp/org.git/contrib/lisp/)
   (require 'ox-taskjuggler)
 #+end_src

 emacs -Q M-x load-file ~/path/to/min-config

 #+begin_src tj-time-test.org

 * Project :taskjuggler_project:
 ** task1-effort-min
:PROPERTIES:
:start:2014-11-01
:effort:   30min
:allocate: jwhendy
:END:
 ** task2-duration-min
:PROPERTIES:
:duration: 30min
:allocate: jwhendy
:blocker:  previous-sibling
:END:

 #+end_src


EFFORT is a special property in Org (i.e., it is not specific to
taskjuggler). It expects HH:MM format. So, you should set it to

  :Effort: 00:30

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Org Bable: Set R-specific buffer-wide graphics headers == no R src block eval [8.2.10 (8.2.10-1-g8b63dc-elpa @ /home/user/.emacs.d/elpa/org-20141027/)]

2014-11-02 Thread John Hendy
On Fri, Oct 31, 2014 at 11:50 PM, myq larson m...@wordish.org wrote:
 Remember to cover the basics, that is, what you expected to happen and
 what in fact did happen.  You don't know how to make a good report?  See

  http://orgmode.org/manual/Feedback.html#Feedback

 Your bug report will be posted to the Org-mode mailing list.
 

 The documentation suggests that the following should be possible:

Could you link to the /specific/ documentation where you saw this?
Since Org uses a manual as well as a ton of stuff in Worg, I find it
helpful to look at the actual bit of code/explanation you were looking
at. For example, the manual leads me to *somewhat* agree that the
following should be possible (more on that later):
- http://orgmode.org/manual/Header-arguments-in-Org-mode-properties.html

 ,
 | #+PROPERTY: header-args:R :exports results
 | #+PROPERTY: header-args   :results output graphics
 | #+PROPERTY: header-args:R :width 400
 |
 | #+BEGIN_SRC R :file /tmp/bug.png
 |   plot(rnorm(100));
 | #+END_SRC
 `

 But the third line (`#+PROPERTY: header-args:R :width 400') silently
 prevents /all/ R blocks from being evaluated. Changing the document to
 the following works:

I think your interpretation may be incorrect. Why do you think the
blocks are not being evaluated?

From fiddling around myself, I believe the true cause is that the
buffer can accept only *one* of each of these properties. My guess is
that you're setting a variable somewhere, and adding two
=header-args:R= simply overwrites the variable with the contents of
the second vs. appending it. I could be wrong.

 ,
 | #+PROPERTY: header-args:R :exports results
 | #+PROPERTY: header-args   :results output graphics
 |
 | #+BEGIN_SRC R  :width 400 :file /tmp/bug.png
 |   plot(rnorm(100));
 | #+END_SRC
 `

 but doing so means that buffer-wide, /language-specific/ header defaults can 
 not
 be set to maintain consistency (at least for R) which is unfortunate. It
 seems that buffer-wide headers can be set for /specific languages/, but
 not language-specific headers? Maybe I haven't read enough of the
 documentation yet, but it seems like that should be possible.

Here was my experiment:

Generates bug.png, exports into PDF, and size responds to changing 800 - 400
#+PROPERTY: header-args:R :width 800 :exports results
#+PROPERTY: header-args   :results output graphics

Generates bug.png, exports into PDF, but size is not affected by :width arg
#+PROPERTY: header-args:R :width 800
#+PROPERTY: header-args   :results output graphics
#+PROPERTY: header-args:R :exports results

Generates bug.png, does *not* export to PDF, but you can verify that
the size changes by viewing bug.png after using different :width
settings:
#+PROPERTY: header-args:R :exports results
#+PROPERTY: header-args   :results output graphics
#+PROPERTY: header-args:R :width 800

So, my conclusion was that only the second property gets applied. If
your conclusion that the block wasn't being executed was due to the
plot not appearing in your resultant document, then we're on the same
page. If you didn't even get a bug.png file with any of the
combinations above... then maybe we have different issues.

M-x org-version
Org-mode version 8.3beta (release_8.3beta-483-g58bb3a @
/home/jwhendy/.elisp/org.git/lisp/)

It's up to someone else regarding whether or not the #+property
behavior is desired. I wondered what two subsequent #+options lines
would do, for example, and they appear to be cumulative. For example:

#+options:  toc:nil
#+options: num:nil

Yielded both results even though the default contains both. An analog
would have been for my document to retain a toc but with no section
numbers. So, *something's* different between how these behave.


Best regards,
John


 Thank you very much for this wonderful code/format/project. It's very useful!



Re: [O] Bug: Org Bable: Set R-specific buffer-wide graphics headers == no R src block eval [8.2.10 (8.2.10-1-g8b63dc-elpa @ /home/user/.emacs.d/elpa/org-20141027/)]

2014-11-02 Thread Nicolas Goaziou
Hello,

John Hendy jw.he...@gmail.com writes:

 It's up to someone else regarding whether or not the #+property
 behavior is desired. I wondered what two subsequent #+options lines
 would do, for example, and they appear to be cumulative. For example:

 #+options:  toc:nil
 #+options: num:nil

 Yielded both results even though the default contains both. An analog
 would have been for my document to retain a toc but with no section
 numbers. So, *something's* different between how these behave.

See

  (info (org) Property syntax)

in particular, the var+ syntax.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes

2014-11-02 Thread John Hendy
On Sun, Nov 2, 2014 at 4:47 PM, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 Hello,

 John Hendy jw.he...@gmail.com writes:

 I ran into an error with a 30min task which used the :effort: property
 to set this duration. Upon compilation, I noted the warning:
 ```
 file.tjp:10: Warning: 400.0d of effort of task one does not fit into
 the project time frame.
 Warning: 1 tasks could not be scheduled
 ```

 I looked at the .tjp file, and 30min had been converted to 4800.0
 hours. I was able to reproduce with the following setup:

 #+begin_src min-config
   (add-to-list 'load-path ~/.elisp/org.git/contrib/lisp/)
   (require 'ox-taskjuggler)
 #+end_src

 emacs -Q M-x load-file ~/path/to/min-config

 #+begin_src tj-time-test.org

 * Project :taskjuggler_project:
 ** task1-effort-min
:PROPERTIES:
:start:2014-11-01
:effort:   30min
:allocate: jwhendy
:END:
 ** task2-duration-min
:PROPERTIES:
:duration: 30min
:allocate: jwhendy
:blocker:  previous-sibling
:END:

 #+end_src


 EFFORT is a special property in Org (i.e., it is not specific to
 taskjuggler). It expects HH:MM format. So, you should set it to

   :Effort: 00:30


That mostly makes sense. Org's not case-sensitive, correct? I was
looking at the [granted, outdated] taskjuggler documentation and it
features estimates in days (i.e. 10d):
- http://orgmode.org/worg/org-tutorials/org-taskjuggler.html

Is this recent (as in post-writing of that worg page)? Or are there
other formats that could be accepted? It's unfortunate that org and
taskjuggler overlap on this, as ideally one could pass any tj
attribute as a property and it'd do the right thing. I see why the
issue exists now.

So if I want to estimate a task taking 10 days, I need to input 80:00?


Best regards,
John

 Regards,

 --
 Nicolas Goaziou



Re: [O] Bug: Org Bable: Set R-specific buffer-wide graphics headers == no R src block eval [8.2.10 (8.2.10-1-g8b63dc-elpa @ /home/user/.emacs.d/elpa/org-20141027/)]

2014-11-02 Thread John Hendy
On Sun, Nov 2, 2014 at 4:55 PM, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 Hello,

 John Hendy jw.he...@gmail.com writes:

 It's up to someone else regarding whether or not the #+property
 behavior is desired. I wondered what two subsequent #+options lines
 would do, for example, and they appear to be cumulative. For example:

 #+options:  toc:nil
 #+options: num:nil

 Yielded both results even though the default contains both. An analog
 would have been for my document to retain a toc but with no section
 numbers. So, *something's* different between how these behave.

 See

   (info (org) Property syntax)

 in particular, the var+ syntax.

Awesome! Indeed, myq, this works, for reference:

#+PROPERTY: header-args:R :exports results
#+PROPERTY: header-args   :results output graphics
#+PROPERTY: header-args:R+ :width 800

Also, don't forget to =C-c C-c= on these arguments (just one of them
in your preamble) to make sure they're updated before trying another
export. (Only mentioning this as I often forget and then think
something didn't work...)


John



 Regards,

 --
 Nicolas Goaziou



Re: [O] Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes

2014-11-02 Thread Nicolas Goaziou
John Hendy jw.he...@gmail.com writes:

 That mostly makes sense. Org's not case-sensitive, correct?

Correct.

 I was looking at the [granted, outdated] taskjuggler documentation and
 it features estimates in days (i.e. 10d): -
 http://orgmode.org/worg/org-tutorials/org-taskjuggler.html

 Is this recent (as in post-writing of that worg page)?

I cannot remember.

 Or are there other formats that could be accepted?

Not at the moment, since ox-taskjuggler.el hardcodes

  (org-duration-string-to-minutes effort)

 It's unfortunate that org and taskjuggler overlap on this, as ideally
 one could pass any tj attribute as a property and it'd do the right
 thing. I see why the issue exists now.

 So if I want to estimate a task taking 10 days, I need to input 80:00?

For now yes.

The code could be improved, however. I.e, if effort matches 

  \\`[0-9]+:[0-5][0-9]\\'

use `org-duration-string-to-minutes', otherwise insert it as-is.


Regards,



Re: [O] Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes

2014-11-02 Thread John Hendy
On Sun, Nov 2, 2014 at 5:01 PM, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 John Hendy jw.he...@gmail.com writes:

 That mostly makes sense. Org's not case-sensitive, correct?

 Correct.

 I was looking at the [granted, outdated] taskjuggler documentation and
 it features estimates in days (i.e. 10d): -
 http://orgmode.org/worg/org-tutorials/org-taskjuggler.html

 Is this recent (as in post-writing of that worg page)?

 I cannot remember.

 Or are there other formats that could be accepted?

 Not at the moment, since ox-taskjuggler.el hardcodes

   (org-duration-string-to-minutes effort)

 It's unfortunate that org and taskjuggler overlap on this, as ideally
 one could pass any tj attribute as a property and it'd do the right
 thing. I see why the issue exists now.

 So if I want to estimate a task taking 10 days, I need to input 80:00?

 For now yes.

 The code could be improved, however. I.e, if effort matches

   \\`[0-9]+:[0-5][0-9]\\'

 use `org-duration-string-to-minutes', otherwise insert it as-is.

Thanks for the explanation. I pretty much only use duration, which has
never had an issue. As a fluke I used effort and noticed the big
difference. Thanks for illuminating the situation!


John



 Regards,



Re: [O] Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes

2014-11-02 Thread Nicolas Goaziou
John Hendy jw.he...@gmail.com writes:

 Thanks for the explanation. I pretty much only use duration, which has
 never had an issue. As a fluke I used effort and noticed the big
 difference. Thanks for illuminating the situation!

Actually, I was slightly wrong. According to
`org-duration-string-to-minutes' and `org-effort-durations' docstrings,
Org accepts modifiers for numbers. IOW

  :Effort: 3d

is a valid value in Org.

The real problem is that min is not recognized as a valid modifier,
since 30min is basically the same as 30 or 0:30.

I changed `org-effort-durations' default value to include min as
a modifier, which will make your original example work.


Regards,



Re: [O] [RFC/PATCH] org-goto: Update for isearch changes

2014-11-02 Thread Nicolas Goaziou
Kyle Meyer k...@kyleam.com writes:

 Hmm, I tried that (and just checked it again), but it doesn't work on my
 end. C-m will exit isearch but not the indirect org-goto buffer. A
 second C-m is needed to get back to the main buffer. (This is also true
 for return, which is why it is also set to nil.) For C-i, it adds ^I to
 the search string instead of cycling.

OK.

However, C-m is RET. Is there any reason to distinguish between the two?

Regards,



Re: [O] [RFC/PATCH] org-goto: Update for isearch changes

2014-11-02 Thread Kyle Meyer
Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
[...]
 However, C-m is RET. Is there any reason to distinguish between the two?

If I use just

(define-key org-goto-local-auto-isearch-map [return] nil)

then C-m doesn't work (i.e., it results in isearch-exit being called
instead of org-goto-ret, then requiring a second key press to get out of
the org-goto indirect buffer). The same is true for return if only the
C-m line is used.

Is there a method you have in mind that will catch both of them?

--
Kyle



Re: [O] Previewing chemfig

2014-11-02 Thread Garreau, Alexandre
On 2014-11-02 at 22:48, John Kitchin wrote:
 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Interestingly, this:

 #+LATEX_HEADER: \usepackage{chemfig}


 $\chemfig{A-B-[1]C-[3]-D-[7]E-[6]F}$


 exports to pdf correctly, but the latex preview is not correct. All the
 letters are jumbled on top of each other.

Ok, I tested again, and found that actually any preview (even without
chemfig) completely stops working when I add
« #+LATEX_HEADER:\usepackage{chemfig} », even pure maths. I just get
little shrinked transparent void rectangles.

I’m on Debian Testing (Jessy) and hence use Org version 7.9.3f (GNU
Emacs 24.3).


pgp6lX5Sr9tL9.pgp
Description: PGP signature


Re: [O] Previewing chemfig

2014-11-02 Thread Rasmus
Hello,

gGarreau, Alexandre galex-...@galex-713.eu writes:

 On 2014-11-02 at 22:48, John Kitchin wrote:
 Nicolas Goaziou m...@nicolasgoaziou.fr writes:
 Interestingly, this:
 #+LATEX_HEADER: \usepackage{chemfig}
 $\chemfig{A-B-[1]C-[3]-D-[7]E-[6]F}$
 exports to pdf correctly, but the latex preview is not correct. All the
 letters are jumbled on top of each other.

 Ok, I tested again, and found that actually any preview (even without
 chemfig) completely stops working when I add
 « #+LATEX_HEADER:\usepackage{chemfig} », even pure maths. I just get
 little shrinked transparent void rectangles.

To debug check you *Message* buffer.  You might see something like

   LaTeX errors in `*/tmp/orgtex1687lRq output*'. Use C-c ` to display.

Check the file, compile it, and check that everything works.  Compile it
to dvi and try to run dvipng on the file.

For me, dvipng is unhappy about chemfig since it seems to contain PS
elements.  If I do

(setq org-latex-create-formula-image-program 'imagemagick)

everything works since it's converted to pdf rather than dvi.

(org-version) = 8.3beta.

 I’m on Debian Testing (Jessy) and hence use Org version 7.9.3f (GNU
 Emacs 24.3).

You might get better results with a recent version of Org.  If you
upgrade to Emacs 24.4 you should get Org 8.2.10, I think.

—Rasmus

-- 
And I faced endless streams of vendor-approved Ikea furniture. . .




Re: [O] org-babel-detangle not working

2014-11-02 Thread Grant Rettke
Good evening,


1 Attempt
═

  Just tried out your example. So it is crystal clear, I did use the
  following:


1.1 Source input: ex1.org
─

  ┌
  │ * Heading
  │
  │ #+BEGIN_SRC js :comments noweb :tangle yes :padline no
  │   function foo() {}
  │ #+END_SRC
  └


1.2 Tangled output: ex1.js
──

  ┌
  │ // [[file:~/tmp/ex1.org::*Heading][Heading:1]]
  │   function foo() {}
  │ // Heading:1 ends here
  └


2 Comments  Questions
══

  When I open the tangled output file, opened it in a buffer, put the
  cursor on line 2, and call `org-babel-detangle', the buffer switches
  to ex1.org, and then I get the message:

Return to existing edit buffer ([n] will revert changes)?
(y or n)

  Whether I choose yes or not, the current buffer always returns to
  ex1.js.

  Is this expected?


3 Environment
═

  ┌
  │ (print emacs-version)
  └

  ┌
  │ 24.3.1
  └

  ┌
  │ (print org-version)
  └

  ┌
  │ 8.2.8
  └

  ┌
  │ (print (pp-to-string org-babel-default-header-args))
  └

  ┌
  │ ((:eval . \always\)
  │  (:padline . \no\)
  │  (:noweb . \no-export\)
  │  (:exports . \both\)
  │  (:results . \output replace\)
  │  (:comments . \no\)
  │  (:session . \none\)
  │  (:cache . \no\)
  │  (:hlines . \no\)
  │  (:tangle . \no\))
  │ 
  └

  ┌
  │ (print (pp-to-string org-babel-default-header-args:R))
  └

  ┌
  │ ((:session . \*R*\))
  │ 
  └

On Sat, Nov 1, 2014 at 1:44 PM, Jaakko Järvi jar...@gmail.com wrote:
 There seems to be something wrong with detangling.
 Would it be working, it would be a really wonderful feature.

 Detangling moves back to the org buffer and opens a source block editing 
 buffer,
 but does not change to block in the org buffer.

 Is detangling working for some? I see this same issue described around
 2013:

   http://thread.gmane.org/gmane.emacs.orgmode/75290/focus=75299

 Below, a minimal test.org file and its tangled output.

 Thanks,

   Jaakko Järvi

 - test.org 
 * Heading

 #+BEGIN_SRC js :comments noweb :tangle yes :padline no
   function foo() {}
 #+END_SRC
 ---

 - test.js -
 // [[file:~/test/test.org::*Heading][Heading:1]]
 function foo() {}
 // Heading:1 ends here
 ---



-- 
Grant Rettke
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


Re: [O] Previewing chemfig

2014-11-02 Thread Garreau, Alexandre
On 2014-11-03 at 01:23, Rasmus wrote:
 Hello,

 Garreau, Alexandre galex-...@galex-713.eu writes:
 On 2014-11-02 at 22:48, John Kitchin wrote:
 Nicolas Goaziou m...@nicolasgoaziou.fr writes:
 Interestingly, this:
 #+LATEX_HEADER: \usepackage{chemfig}
 $\chemfig{A-B-[1]C-[3]-D-[7]E-[6]F}$
 exports to pdf correctly, but the latex preview is not correct. All the
 letters are jumbled on top of each other.

 Ok, I tested again, and found that actually any preview (even without
 chemfig) completely stops working when I add
 « #+LATEX_HEADER:\usepackage{chemfig} », even pure maths. I just get
 little shrinked transparent void rectangles.

 To debug check you *Message* buffer.  You might see something like

LaTeX errors in `*/tmp/orgtex1687lRq output*'. Use C-c ` to display.

Nothing in *messages*.

 Check the file, compile it, and check that everything works.  Compile it
 to dvi and try to run dvipng on the file.

 For me, dvipng is unhappy about chemfig since it seems to contain PS
 elements.  If I do

 (setq org-latex-create-formula-image-program 'imagemagick)

And suddenly, after some trials, everything worked… :D thank you!

 everything works since it's converted to pdf rather than dvi.

 (org-version) = 8.3beta.

 I’m on Debian Testing (Jessy) and hence use Org version 7.9.3f (GNU
 Emacs 24.3).

 You might get better results with a recent version of Org.  If you
 upgrade to Emacs 24.4 you should get Org 8.2.10, I think.

Myeah, mixing distribution releases is not always a good idea, but I
think with Emacs it’s fine, and I want so much 24.4 features I’ll
probably do it in little time. 



Re: [O] How do you interact with org src blocks for your gmane.emacs.orgmode correspondence?

2014-11-02 Thread Grant Rettke
On Sat, Nov 1, 2014 at 5:58 AM, Thorsten Jolitz tjol...@gmail.com wrote:
 And there is a new library

 [[http://goo.gl/pYYzS6][outorg-export]]

I just used http://goo.gl/pYYzS6 and it worked fine; that looks like
an org mode link.



[O] Syntax inconsistency?

2014-11-02 Thread Marcin Borkowski
Hello,

just wondering: on one hand, we have lines like

#+OPTIONS: toc:nil

On the other hand, we have

#+ATTR_ASCII: :width 10

Why is the syntax (seemingly, at least) inconsistent?  Why not
`width:10' or `:toc nil'?

Best,

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



Re: [O] org-babel-detangle not working

2014-11-02 Thread Jaakko Järvi
Hi Grant,

This is exactly the behavior I get too.
Thank you for documenting it precisely.

Let me clarify one step: 

“put the cursor on line 2 in ex1.js, _and modify that line_, and
then call org-babel-detangle”

And no, I don’t think what happens is the expected behavior.

I would expect the contents of the source block in ex1.org 
to be replaced with the modified contents of the block in ex1.js.

But that does not happen.

(One could imagine that org-babel-detangle would detangle the entire
buffer back to the org file, but based on what I understand of the
code of org-babel-detangle, it is only trying to detangle one
block; perhaps another function to do the former, say
org-babel-detangle-buffer, would be a useful command
as well)

Best, 

  Jaakko


On Nov 2, 2014, at 7:23 PM, Grant Rettke g...@wisdomandwonder.com wrote:

 Good evening,
 
 
 1 Attempt
 ═
 
  Just tried out your example. So it is crystal clear, I did use the
  following:
 
 
 1.1 Source input: ex1.org
 ─
 
  ┌
  │ * Heading
  │
  │ #+BEGIN_SRC js :comments noweb :tangle yes :padline no
  │   function foo() {}
  │ #+END_SRC
  └
 
 
 1.2 Tangled output: ex1.js
 ──
 
  ┌
  │ // [[file:~/tmp/ex1.org::*Heading][Heading:1]]
  │   function foo() {}
  │ // Heading:1 ends here
  └
 
 
 2 Comments  Questions
 ══
 
  When I open the tangled output file, opened it in a buffer, put the
  cursor on line 2, and call `org-babel-detangle', the buffer switches
  to ex1.org, and then I get the message:
 
Return to existing edit buffer ([n] will revert changes)?
(y or n)
 
  Whether I choose yes or not, the current buffer always returns to
  ex1.js.
 
  Is this expected?
 
 
 3 Environment
 ═
 
  ┌
  │ (print emacs-version)
  └
 
  ┌
  │ 24.3.1
  └
 
  ┌
  │ (print org-version)
  └
 
  ┌
  │ 8.2.8
  └
 
  ┌
  │ (print (pp-to-string org-babel-default-header-args))
  └
 
  ┌
  │ ((:eval . \always\)
  │  (:padline . \no\)
  │  (:noweb . \no-export\)
  │  (:exports . \both\)
  │  (:results . \output replace\)
  │  (:comments . \no\)
  │  (:session . \none\)
  │  (:cache . \no\)
  │  (:hlines . \no\)
  │  (:tangle . \no\))
  │ 
  └
 
  ┌
  │ (print (pp-to-string org-babel-default-header-args:R))
  └
 
  ┌
  │ ((:session . \*R*\))
  │ 
  └
 
 On Sat, Nov 1, 2014 at 1:44 PM, Jaakko Järvi jar...@gmail.com wrote:
 There seems to be something wrong with detangling.
 Would it be working, it would be a really wonderful feature.
 
 Detangling moves back to the org buffer and opens a source block editing 
 buffer,
 but does not change to block in the org buffer.
 
 Is detangling working for some? I see this same issue described around
 2013:
 
  http://thread.gmane.org/gmane.emacs.orgmode/75290/focus=75299
 
 Below, a minimal test.org file and its tangled output.
 
 Thanks,
 
  Jaakko Järvi
 
 - test.org 
 * Heading
 
 #+BEGIN_SRC js :comments noweb :tangle yes :padline no
  function foo() {}
 #+END_SRC
 ---
 
 - test.js -
 // [[file:~/test/test.org::*Heading][Heading:1]]
 function foo() {}
 // Heading:1 ends here
 ---
 
 
 
 -- 
 Grant Rettke
 g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
 “Wisdom begins in wonder.” --Socrates
 ((λ (x) (x x)) (λ (x) (x x)))
 “Life has become immeasurably better since I have been forced to stop
 taking it seriously.” --Thompson




Re: [O] syntax highlighting of inline LaTeX fragments

2014-11-02 Thread Brady Trainor
Ilya Shlyakhter ilya_...@alum.mit.edu writes:

 dear org-moders,
 is it possible to syntax-highlight inline LaTeX fragments,
 such as $V$ or \cite{smith2012generating} ?
 I know you can highlight LaTeX code blocks, but I'm looking
 specifically for highlighting of inline fragments.
 thanks for help,
 ilya

:bump:

[feature-request]

I would also like this.

I may have to try out mmm-mode.

One solution is to use M-x latex-mode, then M-x orgstruct-mode, but headlines 
lose their syntax highlighting.

There is also a blob from 
[[http://stackoverflow.com/a/25048304/2533127][org-mode buffer latex syntax 
highlighting - Stack Overflow]], but I've so far only improved it to the 
following state:

#+BEGIN_SRC emacs-lisp
(font-lock-add-keywords
 'org-mode
 `((\\$.+?\\$ . font-lock-keyword-face)
   (\\$\\$.+\\$\\$ . font-lock-keyword-face)
   (,(concat  \\[   ; \[
 \\(  ; \(
 . \\| \n ; .|\n
 \\) *  ; \)*
  \\])  ; \]
. font-lock-keyword-face)))
#+END_SRC

So I now get some syntax highlighting on articles written in org like

#+BEGIN_SRC org
$$ W_{net} = \Delta KE. $$

On the other hand, the $i^{th}$ contribution to the work due to the $i^{th}$ 
force is /always/ 

\[
W_i = \int_{\textbf{a}}^{\textbf{b}} 
  \textbf{F}_i \cdot d\textbf{r}. 
\]
#+END_SRC

It's a little broken, for instance it doesn't react to changes in the buffer. 

Some links discussing similar issues include: 

- 
http://www.gnu.org/software/emacs/manual/html_node/elisp/Multiline-Font-Lock.html
- 
http://stackoverflow.com/questions/9452615/emacs-is-there-a-clear-example-of-multi-line-font-locking
- 
http://stackoverflow.com/questions/19623503/emacs-major-mode-font-lock-only-occurs-when-first-loading-file
- http://www.emacswiki.org/emacs/MultilineRegexp

--
Brady




Re: [O] [RFC/PATCH] org-goto: Update for isearch changes

2014-11-02 Thread Kyle Meyer
Kyle Meyer k...@kyleam.com wrote:
 Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 [...]
 However, C-m is RET. Is there any reason to distinguish between the two?

 If I use just

 (define-key org-goto-local-auto-isearch-map [return] nil)

 then C-m doesn't work (i.e., it results in isearch-exit being called
 instead of org-goto-ret, then requiring a second key press to get out of
 the org-goto indirect buffer). The same is true for return if only the
 C-m line is used.

To follow up on this:

I think the reason why setting only one doesn't work is because isearch
specifies both of them.

(define-key map \r 'isearch-exit)
(define-key map [return] 'isearch-exit)

Since the return key is given a binding, it's not translated to the
corresponding ASCII character and, as a result, needs to be overridden
specifically. At least, that's my understanding based on
(info (emacs)Named ASCII Chars).

--
Kyle



Re: [O] :components part in org-publish-project-alist fails

2014-11-02 Thread Julien Cubizolles
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 I cannot reproduce it. Publishing global project succeeds.

Did you publish asynchronously ? I can publish global and latex
synchronously, latex asynchronously (see the following *Org Export
Process* buffer) : only global fails when run asynchronously.

--8---cut here---start-8---
Loading /home/wilk/.org-timestamps/latex.cache...
Publishing file /home/wilk/tmp/test.org using `org-latex-publish-to-pdf'
Saving file /home/wilk/tmp/test.tex...
Wrote /home/wilk/tmp/test.tex
Processing LaTeX file /home/wilk/tmp/test.tex...
PDF file produced.

((latex :base-directory ./ :publishing-directory ./ :publishing-function 
org-latex-publish-to-pdf :exclude .* :latex-class article :include 
(test.org)))
--8---cut here---end---8---


Thanks for your help,

Julien.




Re: [O] syntax highlighting of inline LaTeX fragments

2014-11-02 Thread Rasmus
Hi,

Brady Trainor algeb...@uw.edu writes:

 Ilya Shlyakhter ilya_...@alum.mit.edu writes:

 dear org-moders,
 is it possible to syntax-highlight inline LaTeX fragments,
 such as $V$ or \cite{smith2012generating} ?
 I know you can highlight LaTeX code blocks, but I'm looking
 specifically for highlighting of inline fragments.
 thanks for help,
 ilya

 :bump:

 [feature-request]

The variable `org-highlight-latex-and-related' should allow you to
highlight inline math.  For citations, one solution would be something
like [[cite:smith2012generatin][Smith (2012)]].

Hope it helps,
Rasmus

-- 
When in doubt, do it!