Re: [O] Kill all items with specific tag to kill-ring.

2013-04-25 Thread Carsten Dominik
On 25.4.2013, at 07:32, Oleksandr Gavenko gaven...@gmail.com wrote:

 I use tags only on top level items in org-file.
 
 And want move all items marked by specific tag to different org-file.
 
 I expect that this command kill items with selected tag to kill-ring in one
 step (so single undo command return original buffer content).
 
 Seems there are no such command build-in command...

no, but you could easily make one using the function org-map-entries.


- Carsten



Re: [O] Using Eric Schulte's starter kit with org mode from source

2013-04-25 Thread Alan Schmitt
Thomas S. Dye writes:

 I tangle the initialization file (init.el) from my document.  Everything
 is contained in the one Org file.

 Asynchronous export works really well for me.

As I don't install org from elpa, I removed the after-init-hook part (so
I load the starter kit immediately), and everything now works.

Alan



Re: [O] are babel python sessions and inlined images incompatible?

2013-04-25 Thread Sebastien Vauban
Hi Rodrigo,

Rodrigo Amestica wrote:
 Sebastien Vauban wrote:
 You don't need to explicitly specify a return when working with a
 session. Either of the following should work.

 #+BEGIN_SRC python :session test :file images/test.png
   from pylab import *
   plot(rand(10))
   savefig('images/test.png')
 #+END_SRC

 that does not quite work, I get no inlined image but the following line in
 the Messages buffer

 orgtbl-format-line: Wrong type argument: sequencep,
 matplotlib\.lines\.Line2DError during redisplay: (wrong-type-argument
 arrayp nil)

 Try adding the `:results graphics' header argument...

 it does not help. Still same error. I'm using org-7.9.4 from tarball, in
 ob.el there is no 'graphics' option defined for :results.

Well, I *now* know it's not described in the Org manual...

  ╭ http://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg01181.html
  │
  │ - :results graphics makes the list even longer, yes?  :-) I'm not
  │   sure that every language supports it and I don't believe it's
  │   currently in the manual.
  ╰

Though, it's described in many different posts on this ML, and in some
tutorials on Worg...

  ╭ http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html
  │
  │ If a :file filename.ext header argument is provided to an R source block, 
then
  │ the output from the source block will go to the named file. What that output
  │ is depends on the value of the :results header argument.
  │
  │ If the value is :results graphics then base graphics output is captured on
  │ disk, and a link to the graphics file is inserted into the Org Mode buffer 
(as
  │ is also the case with the graphics-only languages such as gnuplot, ditaa, 
dot,
  │ and asymptote.)
  ╰

I thought it was a core option value for all general-purpose languages (e.g.
emacs-lisp, python, R, ruby, sh), required when your code block outputs a
graphics.

After checking, I only found it in those files:

--8---cut here---start-8---
./ob-maxima.el:117:  (and (member graphics (cdr (assq :result-params params)))
./ob-octave.el:272:  (and (member graphics (cdr (assq :result-params params)))
./ob-R.el:234:  (and (member graphics (cdr (assq :result-params params)))
--8---cut here---end---8---

Maybe they are the only general-purpose languages able to output graphics? No,
wait, your example shows that python is also able to do so.

Then, I don't understand what that :results graphics option is not part of
python. Sorry not to be of more help...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Item task_id not being used in taskjuggler export tj prefixing

2013-04-25 Thread Christian Egli
John Hendy jw.he...@gmail.com writes:

 On Mon, Apr 1, 2013 at 5:01 PM, Nicolas Goaziou n.goaz...@gmail.com wrote:

 You can already do so. IDs only have to be unique within the task
 siblings.

 True, one can name tasks identically as long as they have no identical
 siblings... but the point was the since one can only specify the
 lowest level of id (e.g. T1 instead of T.T1), Org doesn't know how
 to resolve them properly. 

AFAIK task_ids have to be globally unique if you want to use them for
dependencies.

 Task M1 ends up depending on both M.T1 (represented as !T1) /and/
 T.T1. It won't fail since both T.T1 and M.T1 exist, but the user has
 no way to set a depends option to target the specific T1 they wanted.
 Setting =:depends: !!T.T1= ignores the :depends: property entirely.

The TaskJuggler exporter gives you 3 ways to express a dependency:

1. using ORDERED on the parent task
2. using previous-sibling
3. using a task_id of another task. This has to be a unique id,
   otherwise you end up depending all the other tasks that have this
   task_id.

 You don't have to name parents either. You only need to name tasks that
 will be used as a dependency.

 True, which is nice. But we're torn between:
 - Letting Org name the parent whatever it wants, but then having to
 figure out the org-generated parent id so we can do =:depends:
 parent.subtask=, or

 - Specifically naming the parent to have control over the task_id, but
 having to change it because we move it later (and then updating all
 =:depends: parent.task_id= properties accordingly)

 And in either case, there's still no way to depend on a specific
 =parent.task_id= combination.

I don't understand this. Why do you need to name parents (or assign them
a task_id)? As Nicolas says: all you have to do is to give the task you
want to depend on a task_id. 

As an aside I thought you could also use plain ID to express
dependencies. But from looking at the code this doesn't seem supported.
I think the reason why yet another id (namely task_id) is used, is that
this allows for short human readable ids where as the standard ID is
generally generated by org mode and is cryptic and much longer.

HTH
Christian
-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland




Re: [O] Kill all items with specific tag to kill-ring.

2013-04-25 Thread Oleksandr Gavenko
Carsten Dominik carsten.dominik at gmail.com writes:

 
 On 25.4.2013, at 07:32, Oleksandr Gavenko gavenkoa at gmail.com wrote:
 
  I use tags only on top level items in org-file.
  
  And want move all items marked by specific tag to different org-file.
  
  I expect that this command kill items with selected tag to kill-ring in one
  step (so single undo command return original buffer content).
  
  Seems there are no such command build-in command...
 
 no, but you could easily make one using the function org-map-entries.
 

I finish with very hackie code (based on knowledge of internal
implementation of org-scan-tags):

(defun my-org-kill-by-tag (tag)
  (interactive (list (read-input Enter tag: )))
  (kill-new )
  (org-scan-tags
   (lambda ()
 (let ( (last-command 'kill-region) )
   (org-cut-subtree)))
   '(member tag tags-list)
   nil) )

You can replace 'org-cut-subtree' by 'org-copy-subtree' if don't want remove
org entries...




Re: [O] Kill all items with specific tag to kill-ring.

2013-04-25 Thread Carsten Dominik

On 25.4.2013, at 10:21, Oleksandr Gavenko gaven...@gmail.com wrote:

 Carsten Dominik carsten.dominik at gmail.com writes:
 
 
 On 25.4.2013, at 07:32, Oleksandr Gavenko gavenkoa at gmail.com wrote:
 
 I use tags only on top level items in org-file.
 
 And want move all items marked by specific tag to different org-file.
 
 I expect that this command kill items with selected tag to kill-ring in one
 step (so single undo command return original buffer content).
 
 Seems there are no such command build-in command...
 
 no, but you could easily make one using the function org-map-entries.
 
 
 I finish with very hackie code (based on knowledge of internal
 implementation of org-scan-tags):
 
 (defun my-org-kill-by-tag (tag)
  (interactive (list (read-input Enter tag: )))
  (kill-new )
  (org-scan-tags
   (lambda ()
 (let ( (last-command 'kill-region) )
   (org-cut-subtree)))
   '(member tag tags-list)
   nil) )
 
 You can replace 'org-cut-subtree' by 'org-copy-subtree' if don't want remove
 org entries...

Yes, this work, nice trick with binding last-command to kill-region.

A less hackie version would probably add the found entries to a
string or list and only put that string into the kill ring at the end.

org-map-entries would allow processing of several files in one go,
but it would be a very similar implementation.

- Carsten


Re: [O] Android MobileOrg: appointments without SCHEDULED/DEADLINE

2013-04-25 Thread Eric S Fraga
Henning Weiss hdwe...@gmail.com writes:


[...]

 Active timestamps are currently supported, but only in the payload of an
 item. You can also try enabling show done events if the events are still
 not added to the calendar. Timestamps in headings might be supported at
 some point in the future (we have an open issue dealing with it).

Very strange.  When I initially started using MobileOrg (well, the
second time around, once I had a decent Android phone as opposed to the
really cr*p Samsung I initially had) a month or so ago, only scheduled
(and deadline) items seemed to be incorporated into my Google
Calendar.  I have just tried again and it works very well with all of my
active timestamps for appointments.  I must have done something really
stupid somewhere along the line. blush

Thanks!

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_8.0.1-19-g9655a1




Re: [O] Kill all items with specific tag to kill-ring.

2013-04-25 Thread Oleksandr Gavenko
Carsten Dominik carsten.dominik at gmail.com writes:

 
 
 On 25.4.2013, at 10:21, Oleksandr Gavenko gavenkoa at gmail.com wrote:
 
  I finish with very hackie code (based on knowledge of internal
  implementation of org-scan-tags):
  
  (defun my-org-kill-by-tag (tag)
   (interactive (list (read-input Enter tag: )))
   (kill-new )
   (org-scan-tags
(lambda ()
  (let ( (last-command 'kill-region) )
(org-cut-subtree)))
'(member tag tags-list)
nil) )
  
  You can replace 'org-cut-subtree' by 'org-copy-subtree' if don't want remove
  org entries...
 
 Yes, this work, nice trick with binding last-command to kill-region.
 

10 min of reading (info (elisp)Low-Level Kill Ring)... This morning I ask:

  http://thread.gmane.org/gmane.emacs.help/90339
Want to delete distinct regions but make capable undo by single command.

This hack based on:

   (defun kill-region (beg end optional yank-handler)
 
  (if (eq last-command 'kill-region)
  (kill-append string ( end beg) yank-handler)
(kill-new string nil yank-handler)))

 A less hackie version would probably add the found entries to a
 string or list and only put that string into the kill ring at the end.
 
 org-map-entries would allow processing of several files in one go,
 but it would be a very similar implementation.
 

I look to code and found that 'org-map-entries' call 'org-scan-tags'. As
'org-map-entries' looks complicated to me I try to use more low-level
function...

'org-map-entries' also allow rich search queries:

  (info (org)Matching tags and properties)

`+work-boss'
 Select headlines tagged `:work:', but discard those also tagged
 `:boss:'.

`work|laptop'
 Selects lines tagged `:work:' or `:laptop:'.

`work|laptop+night'
 Like before, but require the `:laptop:' lines to be tagged also
 `:night:'.

Next 20 min I search for 'org-get-buffer-tags'. This code completely satisfy
my needs:

(defun my-org-kill-by-tag (tag)
  (interactive (list (completing-read Enter tag:  (org-get-buffer-tags
  (kill-new )
  (org-scan-tags
   (lambda ()
 (let ( (last-command 'kill-region) )
   (org-cut-subtree)))
   '(member tag tags-list)
   nil) )

Is it possible to include correct implementation (seems that I can't able
implement one) to org-mode?

I want this feature in order to simplify precess of moving entries from job
org-file to home org-file by marking entries with tag :HOME:...




[O] XML src block syntax highlighting

2013-04-25 Thread Tom
Hi,

I'm in the process of writing documentation for a simple HTTP based API that 
returns responses as XML.

The included response examples are blocks of the form:

#+BEGIN_SRC xml :exports code
?xml version=1.0 encoding=utf-8?
validxml
  ...
/validxml
#+END_SRC

I have org-src-fontify-natively = and it works for other code, but xml is 
fontified as a fundamental buffer, not like nxml-mode shows the block contents. 
nxml-mode /is/ used when I use C-c ' to edit the contents.

Do I miss something in my setup to let org-mode use nxml-mode for xml 
src-blocks?

kind regards,
Tom
--
xmpp://t...@sec.goochesa.de
http://www.goochesa.de

Re: [O] Paths including spaces fail the installation: Patch

2013-04-25 Thread Bernd Haug
Hi Achim,

On 23 April 2013 18:56, Achim Gratz strom...@nexgo.de wrote:
 Please put quotes around the definition of prefix:
 prefix = /Users/bernd.haug/Library/Application Support/Aquamacs Emacs

Yes, with quoting the prefix a fresh clone installed cleanly.

 thanks, but don't bother about supporting me.
 Huh? I'm not sure where this comes from.

It comes entirely from a friendly place – I got the impression that
this was a problem only I was having / that you had a mainline-merged
general fix anyway, and that I had fixed it already as far as my needs
were concerned, so I didn't want to waste your time.

Cheers, Bernd



Re: [O] Kill all items with specific tag to kill-ring.

2013-04-25 Thread Carsten Dominik

On 25 apr. 2013, at 10:56, Oleksandr Gavenko gaven...@gmail.com wrote:

 Carsten Dominik carsten.dominik at gmail.com writes:
 
 
 
 On 25.4.2013, at 10:21, Oleksandr Gavenko gavenkoa at gmail.com wrote:
 
 I finish with very hackie code (based on knowledge of internal
 implementation of org-scan-tags):
 
 (defun my-org-kill-by-tag (tag)
 (interactive (list (read-input Enter tag: )))
 (kill-new )
 (org-scan-tags
  (lambda ()
(let ( (last-command 'kill-region) )
  (org-cut-subtree)))
  '(member tag tags-list)
  nil) )
 
 You can replace 'org-cut-subtree' by 'org-copy-subtree' if don't want remove
 org entries...
 
 Yes, this work, nice trick with binding last-command to kill-region.
 
 
 10 min of reading (info (elisp)Low-Level Kill Ring)... This morning I ask:
 
  http://thread.gmane.org/gmane.emacs.help/90339
Want to delete distinct regions but make capable undo by single 
 command.
 
 This hack based on:
 
   (defun kill-region (beg end optional yank-handler)
 
 (if (eq last-command 'kill-region)
 (kill-append string ( end beg) yank-handler)
   (kill-new string nil yank-handler)))
 
 A less hackie version would probably add the found entries to a
 string or list and only put that string into the kill ring at the end.
 
 org-map-entries would allow processing of several files in one go,
 but it would be a very similar implementation.
 
 
 I look to code and found that 'org-map-entries' call 'org-scan-tags'. As
 'org-map-entries' looks complicated to me I try to use more low-level
 function...
 
 'org-map-entries' also allow rich search queries:
 
  (info (org)Matching tags and properties)
 
 `+work-boss'
 Select headlines tagged `:work:', but discard those also tagged
 `:boss:'.
 
 `work|laptop'
 Selects lines tagged `:work:' or `:laptop:'.
 
 `work|laptop+night'
 Like before, but require the `:laptop:' lines to be tagged also
 `:night:'.
 
 Next 20 min I search for 'org-get-buffer-tags'. This code completely satisfy
 my needs:
 
 (defun my-org-kill-by-tag (tag)
  (interactive (list (completing-read Enter tag:  (org-get-buffer-tags
  (kill-new )
  (org-scan-tags
   (lambda ()
 (let ( (last-command 'kill-region) )
   (org-cut-subtree)))
   '(member tag tags-list)
   nil) )
 
 Is it possible to include correct implementation (seems that I can't able
 implement one) to org-mode?


I thought your version did work?  Does it not?

- Carsten

 
 I want this feature in order to simplify precess of moving entries from job
 org-file to home org-file by marking entries with tag :HOME:...
 
 




Re: [O] Kill all items with specific tag to kill-ring.

2013-04-25 Thread Oleksandr Gavenko
Carsten Dominik carsten.dominik at gmail.com writes:

 On 25 apr. 2013, at 10:56, Oleksandr Gavenko gavenkoa at gmail.com wrote:
  
  (defun my-org-kill-by-tag (tag)
   (interactive (list (completing-read Enter tag:  (org-get-buffer-tags
   (kill-new )
   (org-scan-tags
(lambda ()
  (let ( (last-command 'kill-region) )
(org-cut-subtree)))
'(member tag tags-list)
nil) )
  
  Is it possible to include correct implementation (seems that I can't able
  implement one) to org-mode?
 
 I thought your version did work?  Does it not?
 

Yes. It works. But implementation relay on internals of 'org-cut-subtree' 
and applied only to single file and without any checks (I try call on
non-org buffer - it doesn't do anything - so seems it is safe).

Also it doesn't follow any org-mode coding conventions...

Also 'org-scan-tags' have 'todo-only' argument which may be interesting for
possible users of my-org-kill-by-tag

  I want this feature in order to simplify precess of moving entries from job
  org-file to home org-file by marking entries with tag :HOME:...




[O] Loop when updating SCHEDULED date from agenda view

2013-04-25 Thread Sebastien Vauban
Hello,

As I rarely meet my goals, I _very often_ move SCHEDULED entries in the
future, by S-right arrow'ing the agenda entry.

Since 1 month or so, I _sometimes_ experience a loop (seems infinite, but
hopefully it is breakable) when updating the date of SCHEDULED items.

This did not occur at all before some cut-off date.

This is not easily reproducible, hence very difficult to bisect the Org code
to find the bad commit. However, I wanted to poll for similar experiences you
would have gotten. In clear, am I the only one seeing this?

For info, when the loop gets broken, here's the backtrace:

--8---cut here---start-8---
Debugger entered--Lisp error: (quit)
  (progn (org-move-to-column (- (window-width) (length stamp)) t) 
(org-agenda-fix-tags-filter-overlays-at (point)) (if nil (let ((ex (make-extent 
nil nil)) (gl (make-glyph stamp))) (set-glyph-face gl (quote 
secondary-selection)) (set-extent-properties ex (list (quote invisible) t 
(quote end-glyph) gl (quote duplicable) t)) (insert-extent ex (1- (point)) 
(point-at-eol))) (add-text-properties (1- (point)) (point-at-eol) (list (quote 
display) (org-add-props stamp nil (quote face) (quote secondary-selection) 
(beginning-of-line 1))
  (if (equal marker (org-get-at-bol (quote org-marker))) (progn 
(org-move-to-column (- (window-width) (length stamp)) t) 
(org-agenda-fix-tags-filter-overlays-at (point)) (if nil (let ((ex (make-extent 
nil nil)) (gl (make-glyph stamp))) (set-glyph-face gl (quote 
secondary-selection)) (set-extent-properties ex (list (quote invisible) t 
(quote end-glyph) gl (quote duplicable) t)) (insert-extent ex (1- (point)) 
(point-at-eol))) (add-text-properties (1- (point)) (point-at-eol) (list (quote 
display) (org-add-props stamp nil (quote face) (quote secondary-selection) 
(beginning-of-line 1)))
  (while (not (bobp)) (if (equal marker (org-get-at-bol (quote org-marker))) 
(progn (org-move-to-column (- (window-width) (length stamp)) t) 
(org-agenda-fix-tags-filter-overlays-at (point)) (if nil (let ((ex (make-extent 
nil nil)) (gl (make-glyph stamp))) (set-glyph-face gl (quote 
secondary-selection)) (set-extent-properties ex (list (quote invisible) t 
(quote end-glyph) gl (quote duplicable) t)) (insert-extent ex (1- (point)) 
(point-at-eol))) (add-text-properties (1- (point)) (point-at-eol) (list (quote 
display) (org-add-props stamp nil (quote face) (quote secondary-selection) 
(beginning-of-line 1))) (beginning-of-line 0))
  (save-excursion (goto-char (point-max)) (while (not (bobp)) (if (equal marker 
(org-get-at-bol (quote org-marker))) (progn (org-move-to-column (- 
(window-width) (length stamp)) t) (org-agenda-fix-tags-filter-overlays-at 
(point)) (if nil (let ((ex ...) (gl ...)) (set-glyph-face gl (quote 
secondary-selection)) (set-extent-properties ex (list ... t ... gl ... t)) 
(insert-extent ex (1- ...) (point-at-eol))) (add-text-properties (1- (point)) 
(point-at-eol) (list (quote display) (org-add-props stamp nil ... ... 
(beginning-of-line 1))) (beginning-of-line 0)))
  (let ((inhibit-read-only t)) (setq stamp (concat prefix  =  stamp  )) 
(save-excursion (goto-char (point-max)) (while (not (bobp)) (if (equal marker 
(org-get-at-bol (quote org-marker))) (progn (org-move-to-column (- 
(window-width) (length stamp)) t) (org-agenda-fix-tags-filter-overlays-at 
(point)) (if nil (let (... ...) (set-glyph-face gl ...) (set-extent-properties 
ex ...) (insert-extent ex ... ...)) (add-text-properties (1- ...) 
(point-at-eol) (list ... ...))) (beginning-of-line 1))) (beginning-of-line 0
  org-agenda-show-new-time(#marker at 80425 in Gras-Savoye.org 2013-03-31 
Sun)
  (let ((--cline (org-current-line)) (--cmd this-command) (--buf1 
(current-buffer)) (--buf2 buffer) (--undo1 buffer-undo-list) (--undo2 
(save-current-buffer (set-buffer buffer) buffer-undo-list)) --c1 --c2) 
(save-current-buffer (set-buffer buffer) (widen) (goto-char pos) (if (not 
(org-at-timestamp-p)) (error Cannot find time stamp)) (if (and 
org-agenda-move-date-from-past-immediately-to-today (equal arg 1) (or (not 
what) (eq what (quote day))) (not (let ((save-match-data-internal ...)) 
(unwind-protect (progn ...) (set-match-data save-match-data-internal ...) 
(progn (setq cdate (org-parse-time-string (match-string 0) (quote nodefault)) 
cdate (calendar-absolute-from-gregorian (list (nth 4 cdate) (nth 3 cdate) (nth 
5 cdate))) today (org-today)) (if ( today cdate) (setq arg (- today cdate) 
(org-timestamp-change arg (or what (quote day))) (if (and (org-at-date-range-p) 
(re-search-backward org-tr-regexp-both (point-at-bol))) (progn (let ((end 
org-last-changed-timestamp)) (org-timestamp-change arg (or what (quote day))) 
(setq org-last-changed-timestamp (concat org-last-changed-timestamp -- 
end)) (org-agenda-show-new-time marker org-last-changed-timestamp) (if 
org-agenda-allow-remote-undo (progn (setq --c1 (org-verify-change-for-undo 
--undo1 (save-current-buffer (set-buffer --buf1) 

Re: [O] Kill all items with specific tag to kill-ring.

2013-04-25 Thread Bernt Hansen
Oleksandr Gavenko gaven...@gmail.com writes:

  I want this feature in order to simplify precess of moving entries from job
  org-file to home org-file by marking entries with tag :HOME:...

Hi Oleksandr,

If all you want to do is move items why not use the agenda?  Mark your
entries with a tag, do an agenda search for that tag, mark all entries
with m and move them using bulk refile with B r

Regards,
Bernt



[O] [BUG] org-fill-paragraph on #+TBLNAME

2013-04-25 Thread Michael Brand
Hi all

There is a minor bug, relevant in my first and simple trial to apply
org-fill-paragraph on all parts of an Org buffer: M-q
(fill-paragraph/org-fill-paragraph) on the first column of the
line #+TBLNAME here

#+TBLNAME: table
| field |

results in an error. The type table and the buffer range returned by
org-element-at-point that determines to use org-table-align seems ok
to me. More like the problem seems that the variable lines of
org-table-align that should contain the table rows becomes nil. I am
not sure how to resolve it in a robust way, preferrably with
org-element. This is release_8.0.1-35-ge87dc9.

Michael



Re: [O] [babel] Specified colnames

2013-04-25 Thread Sebastien Vauban
Hi Eric,

Eric Schulte wrote:
 Sebastien Vauban wxhgmqzgw...@spammotel.com writes:
 Eric Schulte wrote:
 Sebastien Vauban wxhgmqzgw...@spammotel.com writes:
 Eric Schulte wrote:
 Extra question: tested with a sh block, both of the above do work, that 
 is
 with strings or symbols. Which one is supposed to be better (that is, 
 will be
 more portable with time), if there is one?

 Both will be maintained.  The contribution of a test exercising both
 options could provide an extra guarantee of perseverance.  This is also
 a good first step towards editing the code. :)

 Here's my trial to do so [...].
 Does this correspond to what you're asking for?

 Close, could you prepare this as a patch against the current code base?
 That way I can simply apply it locally and more easily test it.

 See the above, could you prepare this as a patch so that I can more
 easily read/use/test it?

Here the patch you asked for.

Best regards,
  Seb

From aa7230ff485df5d9775429b53487aefcc7cd911d Mon Sep 17 00:00:00 2001
From: Sebastien Vauban wxhgmqzgw...@spammotel.com
Date: Thu, 25 Apr 2013 15:24:58 +0200
Subject: [PATCH] Test support of explicitly specified colnames

* test-ob.el (test-ob/specific-colnames): Add test checking that given column
names are well present in the output table.

---
 testing/lisp/test-ob.el |   32 
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index bbbfbc4..d51e183 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -1106,6 +1106,38 @@ Paragraph
 (widen)
 (should (should (re-search-forward ^: 3 nil t)
 
+(ert-deftest test-ob/specific-colnames ()
+  Test passing specific column names.
+  (should
+   (equal #+name: input-table
+| id | var1 |
+|+--|
+|  1 | bar  |
+|  2 | baz  |
+
+#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
+echo \$data\
+#+end_src
+
+#+results:
+| Rev | Author |
+|-+|
+|   1 | bar|
+|   2 | baz|
+
+
+ (org-test-with-temp-text #+name: input-table
+| id | var1 |
+|+--|
+|  1 | bar  |
+|  2 | baz  |
+
+#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
+echo \$data\
+#+end_src
+
+  (org-babel-execute-src-block)
+  (buffer-string)
 
 (provide 'test-ob)
 
-- 
1.7.9

-- 
Sebastien Vauban




Re: [O] Worg not publishing

2013-04-25 Thread Thorsten Jolitz
Bastien b...@gnu.org writes:

Hi Bastien,

 Achim Gratz strom...@nexgo.de writes:

 Worg stopped publishing... it dies on some invalid timestamp:

 remote: Generating tree-style sitemap for Sitemap for project worg-pages 

 remote: Generating tree-style sitemap for Sitemap for project worg-pages 

 remote: Generating tree-style sitemap for Sitemap for project worg-pages 

 remote: Invalid time specification
 remote: worg publish process 22305 exited at 04/22/13@01:08:26
 To git+ssh://w...@orgmode.org/~/worg.git

 Should be fixed now, thanks.

I just updated the 'org-outside-org' tutorial on Worg and pushed it
(apparently) with the usual delay when Worg is rebuilding, however the
changes don't appear when I watch the page in the brower (normally they
appear immediatly after a push).

Still not fixed, or an error on my side?

-- 
cheers,
Thorsten




Re: [O] XML src block syntax highlighting

2013-04-25 Thread Suvayu Ali
On Thu, Apr 25, 2013 at 11:57:49AM +0200, Tom wrote:
 
 #+BEGIN_SRC xml :exports code
 ?xml version=1.0 encoding=utf-8?
 validxml
   ...
 /validxml
 #+END_SRC
 
 I have org-src-fontify-natively = and it works for other code, but xml
 is fontified as a fundamental buffer, not like nxml-mode shows the
 block contents. nxml-mode /is/ used when I use C-c ' to edit the
 contents.

Can you try the following:

  #+BEGIN_SRC nxml :exports code
..
  #+END_SRC

As far as I know, the language is supposed to be the leading part of
some-mode.  My information is a bit outdated, so I could be wrong.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] XML src block syntax highlighting

2013-04-25 Thread Tom
Hi,

Many thanks for your reply.



Suvayu Ali fatkasuvayu+li...@gmail.com schrieb:

On Thu, Apr 25, 2013 at 11:57:49AM +0200, Tom wrote:
 
 #+BEGIN_SRC xml :exports code
 ?xml version=1.0 encoding=utf-8?
 validxml
   ...
 /validxml
 #+END_SRC

 I have org-src-fontify-natively = and it works for other code, but
xml
 is fontified as a fundamental buffer, not like nxml-mode shows the
 block contents. nxml-mode /is/ used when I use C-c ' to edit the
 contents.

Can you try the following:

  #+BEGIN_SRC nxml :exports code
..
  #+END_SRC

As far as I know, the language is supposed to be the leading part of
some-mode.  My information is a bit outdated, so I could be wrong.

Hope this helps,

I should have written that in my OP: I tried that to no avail.

I also tried

(add-to-list 'org-src-lang-modes '(xml . nxml))

Without success.

Regards,
Tom

--
xmpp://t...@sec.goochesa.de



Re: [O] Using Eric Schulte's starter kit with org mode from source

2013-04-25 Thread Eric Schulte
Alan Schmitt alan.schm...@polytechnique.org writes:

 Thomas S. Dye writes:

 I tangle the initialization file (init.el) from my document.  Everything
 is contained in the one Org file.

 Asynchronous export works really well for me.

 As I don't install org from elpa, I removed the after-init-hook part (so
 I load the starter kit immediately), and everything now works.

 Alan

With my latest push to the starter kit you can now simply set the
ORG_HOME environment variable instead of modifying that file locally.
But it's largely a matter of taste at that point as both options are
functionally identical.

Cheers,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



[O] Bug: org-element-fixed-width-interpreter fails when given an empty string [8.0.1 (release_8.0.1-40-g38051c @ /home/david/git/home-common/emacs/foreign/org-mode/lisp/)]

2013-04-25 Thread David Beswick
Hi, I encountered this problem when trying out org-sync with
Redmine. That package uses org-element to create fixed-width type
elements to contain the bug descriptions. When a bug had no description,
this problem would occur. In that case, org-element-property returns the
empty string for the :value property of the fixed-width element, and
the call to substring fails.

I also encountered the problem with org version [7.9.2
(release_7.9.2-1-ge003bd @
/home/david/git/home-common/emacs/foreign/org-mode/lisp/)]

As far as I can see, org-element.el head still has the problem. Here's
a patch for the issue.

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 73d0b46..bfc35a7 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -1834,8 +1834,11 @@ Assume point is at the beginning of the fixed-width area.
 (defun org-element-fixed-width-interpreter (fixed-width contents)
   Interpret FIXED-WIDTH element as Org syntax.
 CONTENTS is nil.
-  (replace-regexp-in-string
-   ^ :  (substring (org-element-property :value fixed-width) 0 -1)))
+  (let ((value (org-element-property :value fixed-width)))
+   (if (not (= (length value) 0))
+   (replace-regexp-in-string
+^ :  (substring value 0 -1))
+ : )))


  Horizontal Rule






Emacs  : GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.12)
 of 2012-09-23 on allspice, modified by Debian
Package: Org-mode version 8.0.1 (release_8.0.1-40-g38051c @
/home/david/git/home-common/emacs/foreign/org-mode/lisp/)

current state:
==
(setq
 org-agenda-clockreport-parameter-plist '(:link nil :maxlevel 3)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-clock-heading-function '(lambda nil (concat (buffer-name)  
(org-clock-heading-function-default)))
 org-after-todo-statistics-hook '(org-summary-todo)
 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-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 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-mode-hook '((lambda nil (local-unset-key (kbd C-tab))
(org-indent-mode 1) (visual-line-mode 1))
 #[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-confirm-elisp-link-function 'yes-or-no-p
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-occur-hook '(org-first-headline-recenter)
 org-from-is-user-regexp \\David\\
 org-clock-report-include-clocking-task t
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 )



[O] How could I configure an export directory?

2013-04-25 Thread Manfred Lotz
Hi there,
When I export to pdf (involving LaTeX), odt or whatever I would like
all those files (including temporary files) to reside in a special
directory, say ~/org/exportdir


How can I configure this?


-- 
Thanks,
Manfred




Re: [O] How could I configure an export directory?

2013-04-25 Thread John Hendy
On Thu, Apr 25, 2013 at 10:51 AM, Manfred Lotz manfred.l...@arcor.de wrote:
 Hi there,
 When I export to pdf (involving LaTeX), odt or whatever I would like
 all those files (including temporary files) to reside in a special
 directory, say ~/org/exportdir


Looks like this has come up before:
- 
http://stackoverflow.com/questions/9559753/emacs-org-mode-export-to-another-directory
- http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg00264.html

Worg also has a bit about publishing to different directories from the
same file by selecting tags to indicate where you want the exported
files to go (not sure if it's current per the 8.0 exporter, though:
- http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-9-2


John


 How can I configure this?


 --
 Thanks,
 Manfred





Re: [O] Worg not publishing

2013-04-25 Thread Bastien
Thorsten Jolitz tjol...@gmail.com writes:

 Still not fixed, or an error on my side?

Your commit was well in the repository (i.e., well pushed.)

I republished Org.

What we do know is that the local version of Org is obtained
with ~$ git checkout release_7.9.4 -- and there are some cron
jobs which used to switch back again to the maint or master
branch.  Last time I fixed the scripts, this time I simply
checked out release_7.9.4 again, as the org-mode repo was
using the maint branch... I don't know why.

Thanks for reporting this,

-- 
 Bastien



Re: [O] Org-mode outside Org-mode

2013-04-25 Thread Thorsten Jolitz
Alexander Vorobiev alexander.vorob...@gmail.com writes:

Hi Alexander, 

 A while back I wrote a macro (based on the advice in 
 http://stackoverflow.com/a/2494384/973603) which allows to activate
 minor mode bindings when a condition is true and fall back to previous
 bindings otherwise:

I just pushed a new version of outshine.el on github (and updated the
Org-mode outside Org-mode article on Worg). I use a modified version of
your macro to bind TAB, M-left-arrow and M-right-arrow. I still
'take over' BACKTAB and M-up-arrow and M-down-arrow in outshine.el,
since the associated functions are usefull anywhere in an outshine
buffer.

Thanks for the tip and the code!

-- 
cheers,
Thorsten




[O] hard coded autoload file

2013-04-25 Thread Ivan Kanis
Hello,

It seems each file has the name of the autoload file hard coded at the
end.

For example at the end org-element.el:

;; Local variables:
;; generated-autoload-file: org-loaddefs.el
;; End:

It sucks for me as I generate autoload with a different name. I made a
workaround so it's fine.

I think it would be better engineered no to have this stuff
repeated at the end of each file.

It would be better that it's specified somewhere in the autoconf.

If I work on this would the patch be accepted?
-- 
Not properly grounded, please bury computer.
-- BOFH excuse #52



[O] M-RET slow

2013-04-25 Thread Samuel Wales
In recent git, M-RET takes a few seconds before it does anything.  I
wonder what sophisticated calculation it is doing?  :)

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.



[O] M-RET inside the first second-level heading of the first first-level heading

2013-04-25 Thread Jisang Yoo
short description:

When I try to create a new heading using M-RET, it works as expected except 
one case: inside the first second-level heading of the first first-level 
heading. This bug affects the latest ELPA version of org, but not the latest 
bundled-with-Emacs version

long description:

Org version 8.0.1-6-ge6776c-elpaplus
GNU Emacs 24.3.1

Create an org buffer with the following contents

* crunchy
** bacon
* soft
** tofu
* warm
** milk

1. Place cursor at the end of bacon and press M-RET and org creates a first-
level heading, when it should have created a second level heading as it does 
at the end of tofu or milk.

2. Place cursor at the beginning of ** bacon and press M-RET and org creates 
a first-level heading.

The odd behavior disappears after I add an empty line before the first 
heading.




Re: [O] [PATCH] export to various flavors of (X)HTML

2013-04-25 Thread Eric Abrahamsen
François Pinard pin...@iro.umontreal.ca writes:

 Christian Wittern cwitt...@gmail.com writes:

 On 2013-04-23 21:09, François Pinard wrote:

 If I remember well [...]

 Well, in this case you are misremembering, empty elements, aka as
 self-closing tags are one of the innovations of XML.  Just my nit to pick,

 A friendly nit-picking is always a good way to get one another to
 improve.  Thanks!

Who knew this would turn out to be such a fraught issue! All I wanted
was that little green checkmark from the W3C...

Here's what I think should be an acceptable final patch. I dropped the
CDATA mess, and came up with a slightly different implementation for
handling self-closing tags. It's maybe a little /bulkier/ than the
previous implementation, but not so hacky, and may continue to be useful
in the future. There's also a documentation patch.

Hope this works,
E

From d3af8f41480eea27e0165e4dcd594ce3475e56cd Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen e...@ericabrahamsen.net
Date: Thu, 25 Apr 2013 14:00:24 -0700
Subject: [PATCH 11/11] ox-html.el: Export to various flavors of (X)HTML

lisp/ox-html.el
(org-html-doctype-alist): New variable holding an alist of (X)HTML
			 doctypes

(org-html-xhtml-p): New function
(org-html-html5-p): New function
(org-html-close-tag): New function

Significant changes to `org-html-format-inline-image',
`org-html--build-meta-info', `org-html--build-head',
`org-html--build-pre/postable', `org-html-template',
`org-html-horizontal-rule', `org-html-format-list-item',
`org-html-line-break', `org-html-table', and `org-html-verse-block'.

doc/org.texi: Document the above
---
 doc/org.texi|  41 -
 lisp/ox-html.el | 187 +---
 2 files changed, 163 insertions(+), 65 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 3f2d1b8..c7fae6d 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -596,6 +596,7 @@ Exporting
 HTML export
 
 * HTML Export commands::How to invoke HTML export
+* HTML doctypes::   Org can export to various (X)HTML flavors
 * HTML preamble and postamble::  How to insert a preamble and a postamble
 * Quoting HTML tags::   Using direct HTML in Org mode
 * Links in HTML export::How links will be interpreted and formatted
@@ -10959,6 +10960,7 @@ language, but with additional support for tables.
 
 @menu
 * HTML Export commands::How to invoke HTML export
+* HTML doctypes::   Org can export to various (X)HTML flavors
 * HTML preamble and postamble::  How to insert a preamble and a postamble
 * Quoting HTML tags::   Using direct HTML in Org mode
 * Links in HTML export::How links will be interpreted and formatted
@@ -10970,7 +10972,7 @@ language, but with additional support for tables.
 * JavaScript support::  Info and Folding in a web browser
 @end menu
 
-@node HTML Export commands, HTML preamble and postamble, HTML export, HTML export
+@node HTML Export commands, HTML doctypes, HTML export, HTML export
 @subsection HTML export commands
 
 @table @kbd
@@ -10998,7 +11000,42 @@ Export to a temporary buffer.  Do not create a file.
 @c @noindent
 @c creates two levels of headings and does the rest as items.
 
-@node HTML preamble and postamble, Quoting HTML tags, HTML Export commands, HTML export
+@node HTML doctypes, HTML preamble and postamble, HTML Export commands, HTML export
+@subsection HTML doctypes
+@vindex org-html-doctype
+@vindex org-html-doctype-alist
+
+Org can export to various (X)HTML flavors.
+
+Setting the variable @var{org-html-doctype} allows you to export to different
+(X)HTML variants. The exported HTML will be adjusted according to the sytax
+requirements of that variant. You can either set this variable to a doctype
+string directly, in which case the exporter will try to adjust the syntax
+automatically, or you can use a ready-made doctype. The ready-made options
+are:
+
+@itemize
+@item
+``html4-strict''
+@item
+``html4-transitional''
+@item
+``html4-frameset''
+@item
+``xhtml-strict''
+@item
+``xhtml-transitional''
+@item
+``xhtml-frameset''
+@item
+``xhtml-11''
+@item
+``html5''
+@end itemize
+
+See the variable @var{org-html-doctype-alist} for details. The default is ``xhtml-strict''.
+
+@node HTML preamble and postamble, Quoting HTML tags, HTML doctypes, HTML export
 @subsection HTML preamble and postamble
 @vindex org-html-preamble
 @vindex org-html-postamble
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index ef7d15a..eddc122 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -143,6 +143,26 @@
 (defvar org-html--pre/postamble-class status
   CSS class used for pre/postamble)
 
+(defconst org-html-doctype-alist
+  '((html4-strict . !DOCTYPE html PUBLIC \-//W3C//DTD HTML 4.01//EN\
+\http://www.w3.org/TR/html4/strict.dtd\;)
+(html4-transitional . !DOCTYPE html PUBLIC \-//W3C//DTD HTML 4.01 Transitional//EN\
+\http://www.w3.org/TR/html4/loose.dtd\;)
+(html4-frameset . !DOCTYPE html PUBLIC 

Re: [O] M-RET inside the first second-level heading of the first first-level heading

2013-04-25 Thread John Hendy
On Thu, Apr 25, 2013 at 3:39 PM, Jisang Yoo jisang.yoo.ac+...@gmail.com wrote:
 short description:

 When I try to create a new heading using M-RET, it works as expected except
 one case: inside the first second-level heading of the first first-level
 heading. This bug affects the latest ELPA version of org, but not the latest
 bundled-with-Emacs version

 long description:

 Org version 8.0.1-6-ge6776c-elpaplus
 GNU Emacs 24.3.1

 Create an org buffer with the following contents

 * crunchy
 ** bacon
 * soft
 ** tofu
 * warm
 ** milk

 1. Place cursor at the end of bacon and press M-RET and org creates a first-
 level heading, when it should have created a second level heading as it does
 at the end of tofu or milk.

 2. Place cursor at the beginning of ** bacon and press M-RET and org creates
 a first-level heading.

I can replicate on Org-mode version 8.0.1 (release_8.0.1-40-g38051c).


 The odd behavior disappears after I add an empty line before the first
 heading.

I can also replicate this. Also odd is that if I put text under the
first headline, it doesn't seem to matter what spacing is before/after
it; ** baconcursor and M-RET will create a first level headline.

* crunchy

Test of some stuff.

** bacon

I can delete the empty space between Test of some stuff. and the
first headline, or add more spaces, add more spaces between ** bacon
and * soft, and I always get a first level headline with M-RET after
** bacon. Same with C-RET.


John






[O] runaway argument exporting: * _is_?

2013-04-25 Thread Greg Minshall
hi.  i'm running

Org-mode version 8.0.1 (release_8.0.1-42-g267cbe @
/Users/minshall/usr/share/emacs/site-lisp/org/)


my test case is

#+DATE: 2013-04-25 Thu
#+OPTIONS: H:2 texht:t
#+BEAMER_COLOR_THEME:
#+BEAMER_FONT_THEME:
#+BEAMER_HEADER:
#+BEAMER_INNER_THEME:
#+BEAMER_OUTER_THEME:
#+BEAMER_THEME: default
#+LATEX_CLASS: beamer
#+LATEX_CLASS_OPTIONS:
#+LATEX_HEADER:
#+LATEX_HEADER_EXTRA:

* _is_?


exporting via C-c C-e lO (or, lo), i get an error from latex.

if i change H:2 to H:1, all (seemingly) works.  here is a diff of the
.tex file generated by each H:

bash greg-minshalls-mbp: {1039} diff sectbug.texH:1 sectbug.texH:2
38,39c38,39
 \begin{frame}[label=sec-1]{\underline{is}?}
 \end{frame}
---
 \section[\underline{is}?]{\underline{is}?}
 \label{sec-1}


am i doing something wrong?  (this is fallout converting from 7.9.3f to
8.)

cheers, Greg Minshall



Re: [O] Updating Worg: call to Worg authors

2013-04-25 Thread Jay Kerns
Greetings,

First: thanks to Nicholas Goaziou and Thorsten Jolitz. There is
a bunch of work already completed - indeed, out of the 83
currently existing headlines, 63 are marked DONE.

But there is a lot of updating that remains.  And the longer the
process continues, the further the two branches will diverge so all
the more difficult the eventual merge of the two branches will be.

Moving forward, I would like to start marking *.org files DONE if they
export cleanly on my machine with no change. To this end, it occurred
to me that just because a file exports cleanly on *my* machine doesn't
necessarily mean that it would be OK on Worg. (This occurred to me
when I noticed Babel code evaluating during export, something not
permitted on Worg).

For testing purposes, we should be using a minimal config, consistent
with the one on Worg, right? This let me to here:

http://orgmode.org/worg/sources/emacs.el

Though that one, of course, has a bunch of extra stuff which isn't
relevant for the time being (publishing, etc.). In addition, that one
is not necessarily compatible with Org 8.0 and the new exporter.

I've made a first stab at a minimal init file, copy-pasted below. I've
also put a soft copy called

worgtest-init.el

which lives right beside worgmap.org in the top-level of the
worg-new-exporter branch. It would seem that the new asynchronous
export would make it relatively easy to test files uniformly and
minimally for Org 8.0 by doing something like

$ emacs -Q -l ~/git/worg/worgtest-init.el

and testing from there.

Here are my questions:

1. Is this overkill?
2. Is there something extra/missing in worgtest-init.el?
3. Anything I should be asking but amn't?

-- 
Jay


#+BEGIN_SRC emacs-lisp
(custom-set-variables
 '(org-modules (quote (org-jsinfo)))
 '(safe-local-variable-values
   (quote ((org-tags-column . -80)
   (org-export-html-style . link rel=\stylesheet\
type=\text/css\ href=\stylesheet.css\ /)
   (org-export-html-style-extra . link rel=stylesheet
href=\org-faq.css\ type=\text/css\ style type=\text/css\
/style)
   (org-export-html-style . link rel=stylesheet
href=\freeshell2.css\ type=\text/css\ style type=\text/css\
.tag { color: red; font-weight:bold}/style)

(add-to-list 'load-path ~/git/org-mode/lisp/)
(add-to-list 'load-path ~/git/org-mode/contrib/lisp/)

(show-paren-mode 1)
(menu-bar-mode 0)

(require 'org)
(require 'htmlize)

(setq org-export-in-background t)
(setq org-export-async-init-file ~/git/worg/worgtest-init.el)
(setq org-export-async-debug t)

(setq org-export-default-language en
  org-export-html-extension html
  org-export-with-timestamps nil
  org-export-with-section-numbers nil
  org-export-with-tags 'not-in-toc
  org-export-skip-text-before-1st-heading nil
  org-export-with-sub-superscripts '{}
  org-export-with-LaTeX-fragments t
  org-export-with-archived-trees nil
  org-export-highlight-first-table-line t
  org-export-html-style-include-default nil
  org-export-htmlize-output-type 'css
  org-startup-folded nil
  org-export-allow-BIND t
  org-export-babel-evaluate nil
  org-confirm-babel-evaluate nil)
#+END_SRC



Re: [O] Updating Worg: call to Worg authors

2013-04-25 Thread Jay Kerns
On Thu, Apr 25, 2013 at 7:18 PM, Jay Kerns gjkerns...@gmail.com wrote:

 First: thanks to Nicholas Goaziou and Thorsten Jolitz. There is

That should have been Nicolas; I apologize.

Jay



[O] variable names in manual

2013-04-25 Thread Greg Minshall
hi.  the info pages seem to have convert



[O] variable names in manual

2013-04-25 Thread Greg Minshall
sorry about that.  i was going to ask about the variable names in the
current (8.x) documentation being in upper case.  (then, wanted to check
the mailing list, but hit the wrong key -- now i've looked, cursorily,
as i wanted to apologize quickly.)

this convention has the advantage of making clear what is, and what
isn't, a variable name.

but, it means that placing the cursor over the name and hitting C-h v
doesn't default to that name.  (and, i've always found that a convenient
way to navigate.)

so, just curious is it might make sense to revert to lower case names.

cheers, Greg Minshall



[O] parameterizing keyword values during a #+call

2013-04-25 Thread Greg Minshall
hi.  i would have an org file that uses lots of #+calls to various
asymptote routines (babelled into the file) to produce graphics.  i
would like to export this file to both html and to latex (specifically
beamer).  for html, i would like, e.g., SVG files, and for latex, PDF
files.  the file name is normally passed to the asymptote routine via a
:file parameter, to wit

#+call: disc[:file images/disc.svg]() :results file

and the file extension (.svg in the above) determines the format of
the asymptote output.

is there an obvious way to allow the file extension to take on different
values depending on which sort of export is driving its execution?  i
had hoped that replacing .svg with something like .{{{ext()}}},
where ext was a macro which selected amongst the alternatives(*),
would do the trick.  but that doesn't appear to be the case.

thanks in advance (and with full appreciation of what a pain macros
are to implement fully, halfly, anyly), Greg Minshall

(*)
#+MACRO: ext @@latex:pdfbeamer:pdfhtml:svg@@



Re: [O] variable names in manual

2013-04-25 Thread Suvayu Ali
On Thu, Apr 25, 2013 at 07:37:25PM -0400, Greg Minshall wrote:
 sorry about that.  i was going to ask about the variable names in the
 current (8.x) documentation being in upper case.  (then, wanted to check

[...chomp...chomp...chomp...]

 but, it means that placing the cursor over the name and hitting C-h v
 doesn't default to that name.  (and, i've always found that a convenient
 way to navigate.)
 
 so, just curious is it might make sense to revert to lower case names.

I wasn't aware of this change!  I would agree with Greg here.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] parameterizing keyword values during a #+call

2013-04-25 Thread Eric Schulte
Greg Minshall minsh...@umich.edu writes:

 hi.  i would have an org file that uses lots of #+calls to various
 asymptote routines (babelled into the file) to produce graphics.  i
 would like to export this file to both html and to latex (specifically
 beamer).  for html, i would like, e.g., SVG files, and for latex, PDF
 files.  the file name is normally passed to the asymptote routine via a
 :file parameter, to wit
 
 #+call: disc[:file images/disc.svg]() :results file
 
 and the file extension (.svg in the above) determines the format of
 the asymptote output.

 is there an obvious way to allow the file extension to take on different
 values depending on which sort of export is driving its execution?  i
 had hoped that replacing .svg with something like .{{{ext()}}},
 where ext was a macro which selected amongst the alternatives(*),
 would do the trick.  but that doesn't appear to be the case.


Something like the following should work.

#+call: disc[:file (if (and (boundp org-export-current-backend) (equal 
org-export-current-backend 'html)) foo.svg foo.tex)]() :results file

And you could wrap up the extra-long Emacs-lisp in a function or macro
in your init to avoid the overlength header argument.


 thanks in advance (and with full appreciation of what a pain macros
 are to implement fully, halfly, anyly), Greg Minshall

 (*)
 #+MACRO: ext @@latex:pdfbeamer:pdfhtml:svg@@


-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] Filling bug with alphabetical lists

2013-04-25 Thread Bernt Hansen
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Bernt Hansen be...@norang.ca writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Bernt Hansen be...@norang.ca writes:

 I found the following filling bug with alphabetical lists.

 I have 

 (setq org-alphabetical-lists t)

 This is now `org-list-allow-alphabetical'. I think you need to reload
 Org when this variable is changed.

 Thanks, I wasn't aware of this rename but it is already set to t here.
 I'll rename the variable in my .emacs.

 Do you get the same filling behaviour as me?

 Not anymore after I reload Org.

Thanks Nicolas,

My problem was I had org-alphabetical-lists defined _after_ the requires
for the exporter back ends in my .emacs so this didn't work for me.

Putting it before 

--8---cut here---start-8---
;; Explicitly load required exporters
(require 'ox-html)
(require 'ox-latex)
(require 'ox-ascii)
--8---cut here---end---8---

and restarting Emacs fixed it for me.

Regards,
Bernt



Re: [O] New exporter - publishing org files doesn't include :tangle

2013-04-25 Thread Bernt Hansen
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Bernt Hansen be...@norang.ca writes:

 James Yuan noticed that the .org file that is published with my document
 (http://doc.norang.ca/org-mode.org does not contain :tangle on any of
 the source blocks.

 One of the uses of this document is to pull up the file and tangle it to
 create an emacs configuration but this seems to be broken in 8.0.

 This is not directly related to the export framework.

 For some reason, Babel removes all properties from the opening string of
 a block when evaluated. IOW

   #+BEGIN_SRC emacs-lisp :exports code :tangle yes
   (+ 1 1)
   #+END_SRC

 becomes

   #+BEGIN_SRC emacs-lisp 
   (+ 1 1)
   #+END_SRC

 One workaround is to add Babel properties on a #+header: affiliated
 keyword instead as

   #+header: :tangle yes
   #+BEGIN_SRC emacs-lisp :exports code
   (+ 1 1)
   #+END_SRC

 becomes

   #+header: :tangle yes
   #+BEGIN_SRC emacs-lisp
   (+ 1 1)
   #+END_SRC


 Regards,

Hi Nick,

So far my attempts using this workaround have failed and I can't get
:tangle in my exported org file.  I think I also would prefer to have
the :exports value in the .org source as well so it's a true
representation of the source.

I'll give this another try again later.

Regards,
Bernt