Re: [O] [bug] Code snippets are not getting numbered

2014-01-29 Thread Nicolas Goaziou
Hello,

Eric Schulte schulte.e...@gmail.com writes:

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

 IIUC, there are two flags types in `org-babel-exp-code'. One is
 the :flags parameter and the other one are the switches of the source
 block. Unfortunately, you can have only one at a time since they are
 stored in an alist (the first one shadows the other one).

 I think a correct solution would be to rename switches switches and
 add them to `org-babel-exp-code-template'.

 Eric, what do you think?


 That sounds reasonable to me.

Done in maint.


Regards,

-- 
Nicolas Goaziou



[O] [RFC] Syntax for macros

2014-01-29 Thread Sebastien Vauban
Hello,

I know this question can be a sensible one, but I wonder whether we
couldn't remove some fat from the macro call syntax?

When trying to convince colleagues and friends to use macros, I get
kind of allergic reactions because of the many accolades.

Example:

--8---cut here---start-8---
  #+MACRO: hlt @@html:span style=background-color: yellow;$1/span@@

  This {{{hlt(information)}}} is important.
--8---cut here---end---8---

I wondered whether we could reduce the number of accolades to 2 or 1?

This would be much more easy to read, IMO:

--8---cut here---start-8---
  This {hlt(information)} is important.
--8---cut here---end---8---

Would this be possible?  If so, would you want that as well?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Sebastien Vauban
Hello Bastien and Thomas,

Bastien wrote:
 thanks for starting this list.

 t...@tsdye.com (Thomas S. Dye) writes:

 C-c ! Creating timestamps
 C-c . Creating timestamps
 C-c # Checkboxes
 C-c ' Editing and debugging formulas, literal examples, include files,
 editing source code, cooperation
 C-c , Priorities
 C-c ; Comment lines
 C-c ? Editing and debugging formulas
 C-c @ Structure editing 
 C-c ^ Structure editing, plain lists, built-in table editor
 C-c ` Built-in table editor
 C-c ~ Cooperation

 (There is also C-c : (to add QUOTE) but doomed to disappear anyway.)

What about `C-c {' and such in the tables?

 I think most of these keybindings could migrate to a C-c C- version.

 For example:

 C-c # Checkboxes

 would be

 C-c C-# Checkboxes

 this would work for all of them except C-c ^ beause C-c C-^ is
 already bound to org-up-element.  Maybe it can move to C-c M-^
 instead (but that's one of the keybindings that is deeply into
 my memory.)

So is it for me. As half of the above mentioned key bindings -- the
other half, I don't know/use it.

 How would everyone feel about moving those keybindings to comply
 more closely with Emacs coding recommendations?

I guess it's better to comply to the Emacs guidelines. That change will
allow us to wake up our neurons and fight against Alzheimer. So, let's
do it.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-update-statistics-cookies does not update stats

2014-01-29 Thread Bastien
Hi Yasushi,

Yasushi SHOJI ya...@atmark-techno.com writes:

 It seems to me that the commit 80fc5ad breaks
 `org-update-statistics-cookies' on my setup.

This should now be fixed in master.

Thanks for reporting this!

-- 
 Bastien



Re: [O] [RFC] Syntax for macros

2014-01-29 Thread Bastien


Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 This would be much more easy to read, IMO:

   This {hlt(information)} is important.

But more prone to false positives.

 Would this be possible?  If so, would you want that as well?

Reducing to {{...}} could be better, but I'm not sure this is
what will make your friends happy :)

-- 
 Bastien




[O] Use ; for org-toggle-comment speedy command and # for org-update-statistics-cookies

2014-01-29 Thread Bastien
Hi all,

I suggest to use ; for the speedy command org-toggle-comment and
# for org-update-statistics-cookies.  See the attached patch.

Let me know if 

1) you feel using ; for toggling COMMENT is better than #
1) you feel the new # speedy command would be useful

Thanks,

diff --git a/lisp/org.el b/lisp/org.el
index 7a4f347..f04858c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19354,7 +19354,8 @@ boundaries.
 (w . org-refile)
 (a . org-archive-subtree-default-with-confirmation)
 (@ . org-mark-subtree)
-(# . org-toggle-comment)
+(; . org-toggle-comment)
+(# . org-update-statistics-cookies)
 (Clock Commands)
 (I . org-clock-in)
 (O . org-clock-out)

-- 
 Bastien


Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Bastien


Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 What about `C-c {' and such in the tables?

(FWIW, that's one of the few keybindings I would not like to change.)

 I guess it's better to comply to the Emacs guidelines. That change will
 allow us to wake up our neurons and fight against Alzheimer. So, let's
 do it.

Thanks for your feedback -- that said, maybe the move is to big
compared to the real issue at stake.  I'd rather make this move
minimalist by just rebinding those keybindings that are not *that*
into our memories (e.g. C-c # ... )

-- 
 Bastien




Re: [O] bug: Please save the buffer to a file before refiling when the buffer is already saved

2014-01-29 Thread Bastien
Hi Samuel,

Samuel Wales samolog...@gmail.com writes:

 Would this also get rid of the current-file special case?  If so, this
 sounds good to me and I will test it.

Please test the attached patch against maint and let me know what
issues it fixes for you.

Thanks,

diff --git a/lisp/org.el b/lisp/org.el
index 23126b3..9a648dd 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11308,7 +11308,7 @@ on the system \/user@host:\.
 			   txt (org-link-display-format (match-string 4))
 			   txt (replace-regexp-in-string \\( *\[[0-9]+/?[0-9]*%?\]\\)+$  txt)
 			   re (format org-complex-heading-regexp-format
-	  (regexp-quote (match-string 4
+	  (regexp-quote (match-string-no-properties 4
 			 (when org-refile-use-outline-path
 			   (setq txt (mapconcat
   'org-protect-slash
@@ -11641,6 +11641,12 @@ prefix argument (`C-u C-u C-u C-c C-w').
   (bookmark-jump org-refile-last-stored)
   (message This is the location of the last refile))
 
+(defsubst org-refile--get-location (answ tbl)
+  (or (assoc answ tbl)
+  (assoc (concat answ /) tbl)
+  (assoc answ org-refile-target-table)
+  (assoc (concat answ /) org-refile-target-table)))
+
 (defun org-refile-get-location (optional prompt default-buffer new-nodes
 	  no-exclude)
   Prompt the user for a refile location, using PROMPT.
@@ -11692,10 +11698,9 @@ this is used for the GOTO interface.
   (concat  (default  cbnex  : ))
 	 pa answ parent-target child parent old-hist)
 (setq old-hist org-refile-history)
-(setq answ (funcall cfunc prompt tbl nil (not new-nodes)
+(setq answ (funcall cfunc prompt tbl nil (if new-nodes 'confirm t)
 			nil 'org-refile-history (or cdef (car org-refile-history
-(setq pa (or (assoc answ tbl) (assoc (concat answ /) tbl)))
-(if pa
+(if (setq pa (org-refile--get-location answ tbl))
 	(progn
 	  (org-refile-check-position pa)
 	  (when (or (not org-refile-history)
@@ -11712,8 +11717,7 @@ this is used for the GOTO interface.
 	  (progn
 	(setq parent (match-string 1 answ)
 		  child (match-string 2 answ))
-	(setq parent-target (or (assoc parent tbl)
-(assoc (concat parent /) tbl)))
+	(setq parent-target (org-refile--get-location parent tbl))
 	(when (and parent-target
 		   (or (eq new-nodes t)
 			   (and (eq new-nodes 'confirm)

-- 
 Bastien


Re: [O] Use ; for org-toggle-comment speedy command and # for org-update-statistics-cookies

2014-01-29 Thread Sebastien Vauban
Bastien,

 I suggest to use ; for the speedy command org-toggle-comment and
 # for org-update-statistics-cookies.  See the attached patch.

 Let me know if 

 1) you feel using ; for toggling COMMENT is better than #

It seems more natural to me, as `M-;' is the standard key for commenting
stuff in Emacs.

 1) you feel the new # speedy command would be useful

Not for me. But that does not mean it shouldn't be added for others, of
course.

BTW, the documented `F' and `B' speed commands don't work for me on
Babel code blocks. Is it only me?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Sebastien Vauban
Bastien,

Bastien wrote:
 Sebastien Vauban writes:

 What about `C-c {' and such in the tables?

 (FWIW, that's one of the few keybindings I would not like to change.)

 I guess it's better to comply to the Emacs guidelines. That change will
 allow us to wake up our neurons and fight against Alzheimer. So, let's
 do it.

 Thanks for your feedback -- that said, maybe the move is to big
 compared to the real issue at stake.  I'd rather make this move
 minimalist by just rebinding those keybindings that are not *that*
 into our memories (e.g. C-c # ... )

Personally, I'd opt for a all-or-none switch.

If you only do some, we can't rely on just add another C- to get the
right key binding. I have the impression we'll never know which ones
were migrated, and which ones weren't.

In the case you don't intend to move 'em all, I'd stay with the current
config, then. Is it really important to have a couple less of not
standard key bindings, if we still have others which don't comply?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Bastien


Hi Sébastien,

Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 Is it really important to have a couple less of not
 standard key bindings, if we still have others which don't comply?

I think so, as it reduces the chances of conflicting keybindings from
other minor modes.

-- 
 Bastien




Re: [O] Use ; for org-toggle-comment speedy command and # for org-update-statistics-cookies

2014-01-29 Thread Bastien


Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 BTW, the documented `F' and `B' speed commands don't work for me on
 Babel code blocks. Is it only me?

The speed commands work on headlines -- hitting F or B goes to the
next/previous src block fine here.  What's wrong for you?

-- 
 Bastien




Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Sebastien Vauban
Bastien,

Bastien wrote:
 Sebastien Vauban writes:

 Is it really important to have a couple less of not
 standard key bindings, if we still have others which don't comply?

 I think so, as it reduces the chances of conflicting keybindings from
 other minor modes.

OK. I (can) agree. But not changing them all will make it even more
complex for our little heads...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Use ; for org-toggle-comment speedy command and # for org-update-statistics-cookies

2014-01-29 Thread Sebastien Vauban
Bastien,

Bastien wrote:
 Sebastien Vauban writes:

 BTW, the documented `F' and `B' speed commands don't work for me on
 Babel code blocks. Is it only me?

 The speed commands work on headlines -- hitting F or B goes to the
 next/previous src block fine here.  What's wrong for you?

I've always thought they worked on the meta line of the code blocks! --
and never succeeded using them...

Too bad it just goes from the headline to the first code block, and then
stops...

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Bug: If multiple org-store-link-function available, Org fails to prompt which [8.2.5g (8.2.5g-dist @ /home/benj/usr/share/emacs/site-lisp/org/)]

2014-01-29 Thread Benjamin Drieu

Since probably version 8.2 of Org I could not store links from Gnus.
After some investigation it appears that org-store-link was faulty, not
allowing me to choose between functions.  The cause is that
completing-read was not called properly, attached patch (hopefully)
fixes this.

Bug is trigged only if multiple store link functions are available,
which was my case since I included org-nnml.el as well as org-gnus.el.


Emacs  : GNU Emacs 23.4.1 (i486-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-09-09 on murphy, modified by Debian
Package: Org-mode version 8.2.5g (8.2.5g-dist @ 
/home/benj/usr/share/emacs/site-lisp/org/)

-- 
* Benjamin Drieu bdr...@april.org - http://www.april.org/
* Soutenez le logiciel libre, rejoignez l'April
  http://www.april.org/association/adhesion.html
--- org-orig.el	2014-01-29 11:43:43.0 +0100
+++ org.el	2014-01-29 11:39:37.0 +0100
@@ -9411,7 +9411,7 @@
 		   (funcall (intern
  (completing-read
   Which function for creating the link? 
-  sfunsn t (car sfunsn)
+  sfunsn nil t (car sfunsn)
 		  (funcall (caar sfuns)))
 	  (setq link (plist-get org-store-link-plist :link)
 		desc (or (plist-get org-store-link-plist


pgpE1psXlN8IX.pgp
Description: PGP signature


Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Florian Beck

On 28.01.2014 10:08, Bastien wrote:


I think most of these keybindings could migrate to a C-c C- version.


There is no need for migrating them IMO.

The recommendation is:

   Sequences consisting of `C-c' followed by any other punctuation
   character are allocated for minor modes.  Using them in a major
   mode is not absolutely prohibited, but if you do that, the major
   mode binding may be shadowed from time to time by minor modes.

This means important commands should have a binding reserved for major 
modes. But there is absolutely no need to remove bindings which (for 
many org users) have worked just fine for a long time.


--
Florian Beck



Re: [O] Clojure Code Block Results not Tabularized

2014-01-29 Thread Soapy Smith
Hi Christian, I think that is a very good point!

From the manual, the explanation of what is returned as a result
using :results raw

raw The results are interpreted as raw Org mode code and are inserted
directly into
the buffer. If the results look like a table they will be aligned as
such by Org mode.
E.g., :results value raw.

So, it doesn't say it will result in a table, but it will be aligned
like a table!

Whatever the case, the behavior of Clojure should be consistent with the
other languages.

Looking into the old set further, I find the :results header argument
makes no difference:
:results value
:results value raw
:results table
(no header argument)

All result in the same org table.  So it looks like the old version was
not behaving properly either.  However, it was able to coerce the
Clojure vector into an org table successfully.

With the new system (version 8 org and CIDER),
there are in fact 3 different results blocks:

(no header argument)
#+RESULTS:
: [1 2 3 4]

:results value raw
#+RESULTS:
[1 2 3 4]

:results value
#+RESULTS:
: [1 2 3 4]

:results table
#+RESULTS:
| [1 2 3 4] |

Christian, could you try :results table with Python and reply back with
the #+RESULTS:?

Regards,
Greg


On Wed, 2014-01-29 at 08:57 +0100, Christian Moe wrote:
 Hi,
 
 I don't use Clojure so I may get this wrong, but: isn't this what you
 would expect with `:results raw'?
 
 Cf. these Python examples:
 
 #+begin_src python :results raw
   a = (1, 2, 3)
   return a
 #+end_src
 
 #+RESULTS:
 (1, 2, 3)
 
 #+begin_src python
   a = (1, 2, 3)
   return a
 #+end_src
 
 #+RESULTS:
 | 1 | 2 | 3 |
 
 Yours,
 Christian





Re: [O] Clojure Code Block Results not Tabularized

2014-01-29 Thread Christian Moe

Soapy Smith writes:

 Christian, could you try :results table with Python and reply back with
 the #+RESULTS:?

Same as the default, i.e. a table, as expected.
#+RESULTS:
| 1 | 2 | 3 |

The Babel/Clojure behavior you report does seem buggy. 

I'm afraid I can't be of further help, but hopefully others will pick up
on this.

Yours,
Christian



Re: [O] Clojure Code Block Results not Tabularized

2014-01-29 Thread Soapy Smith
Yes, I agree the Clojure behavior is not quite correct.  But all the
functionality is there if both the old and new are combined.  I think
only a rearrangement of existing code is required.

I like the idea of comparing to the behavior of Python code blocks.
I've got a Coursera class coming up which will use Python, so I need to
get it set it up here.

Thank you for the assistance!
Greg

On Wed, 2014-01-29 at 13:58 +0100, Christian Moe wrote:
 Soapy Smith writes:
 
  Christian, could you try :results table with Python and reply back with
  the #+RESULTS:?
 
 Same as the default, i.e. a table, as expected.
 #+RESULTS:
 | 1 | 2 | 3 |
 
 The Babel/Clojure behavior you report does seem buggy. 
 
 I'm afraid I can't be of further help, but hopefully others will pick up
 on this.
 
 Yours,
 Christian





Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Nick Dokos
Florian Beck f...@miszellen.de writes:

 On 28.01.2014 10:08, Bastien wrote:

 I think most of these keybindings could migrate to a C-c C- version.

 There is no need for migrating them IMO.

 The recommendation is:

Sequences consisting of `C-c' followed by any other punctuation
character are allocated for minor modes.  Using them in a major
mode is not absolutely prohibited, but if you do that, the major
mode binding may be shadowed from time to time by minor modes.

 This means important commands should have a binding reserved for major
 modes. But there is absolutely no need to remove bindings which (for
 many org users) have worked just fine for a long time.

But it's not just a matter of satisfying rules: it's a matter of making
it easy on users. Having a bad binding as well as a good binding for
something would mean that if I load a minor mode that takes over the
bad binding, I would then lose it in the major mode and have to
remember the good binding. That's more confusing IMO than having a
single good binding: if we need to retrain fingers, we need to retrain
them once, not every time we load a minor mode that steps on some
binding.

I find myself more in agreement with Seb than with Bastien here. The
argument that reducing the number of bad bindings reduces the chance
of conflicts does not hold water IMO: we will always have to be looking
in the rear-view mirror for some minor mode that will step on us. If
it's an important enough problem to solve, we should just follow the
emacs guidelines in their entirety.

-- 
Nick




Re: [O] Use ; for org-toggle-comment speedy command and # for org-update-statistics-cookies

2014-01-29 Thread Bastien


Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 Too bad it just goes from the headline to the first code block, and then
 stops...

But then you have C-c C-v C-n

-- 
 Bastien




Re: [O] Use ; for org-toggle-comment speedy command and # for org-update-statistics-cookies

2014-01-29 Thread Sebastien Vauban
Bastien wrote:
 Sebastien Vauban writes:

 Too bad it just goes from the headline to the first code block, and then
 stops...

 But then you have C-c C-v C-n

Right (forgot about that one)... but not a speed command anymore ;-)

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Bug: If multiple org-store-link-function available, Org fails to prompt which [8.2.5g (8.2.5g-dist @ /home/benj/usr/share/emacs/site-lisp/org/)]

2014-01-29 Thread Bastien
Hi Benjamin,

Benjamin Drieu bdr...@april.org writes:

 Since probably version 8.2 of Org I could not store links from Gnus.
 After some investigation it appears that org-store-link was faulty, not
 allowing me to choose between functions.  The cause is that
 completing-read was not called properly, attached patch (hopefully)
 fixes this.

 Bug is trigged only if multiple store link functions are available,
 which was my case since I included org-nnml.el as well as
 org-gnus.el.

Applied, thanks!

-- 
 Bastien



Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Bastien
Hi Nick,

Nick Dokos ndo...@gmail.com writes:

 I find myself more in agreement with Seb than with Bastien here. The
 argument that reducing the number of bad bindings reduces the chance
 of conflicts does not hold water IMO: we will always have to be looking
 in the rear-view mirror for some minor mode that will step on us.

In the last ten years, we had only *one* such problem while having a
dozen of faulty keybindings --- my hope is that, with only a fistful
of faulty keybindings, we won't have to look in the rear-view mirror
for the next twenty years :)  [IOW: I don't buy the all-or-nothing
reasoning.]

More precisely, I suggest these rebindings:

C-c # Checkboxes = C-c C-#
C-c , Priorities = C-c C-,
C-c ; Comment lines  = C-c C-;
C-c @ Mark subtree   = C-c C-@

(Note they are also accessible through speedy keys.)

C-c ~ Cooperation= C-c C-~

(This one I just discovered.)

Let's not get trapped in a buridanesque decision.  :)

-- 
 Bastien



Re: [O] [RFC] Move ox-koma-letter into core?

2014-01-29 Thread Bastien
Hi Nicolas,

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

 As a reminder, the initial point of this thread was to suggest that
 providing a way to create letters is a /core/ feature for Org. So this
 is orthogonal to the contrib/ vs ELPA package discussion.

Yes, this is orthogonal.

My suggestion is to ask Emacs maintainers, but of course I'm fine if
Carsten decides otherwise.

-- 
 Bastien



Re: [O] [RFC] Move ox-koma-letter into core?

2014-01-29 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

 Bastien b...@gnu.org writes:

 My suggestion: convert contrib/lisp/ libraries into Org ELPA packages
 and expurge the the contrib/ Git history from Org's repo.

 Here is another way to evaluate this proposal: imagine we don't
 have the contrib/ directory and we want to promote some external
 Org libraries but don't want to include them into core.

As a reminder, the initial point of this thread was to suggest that
providing a way to create letters is a /core/ feature for Org. So this
is orthogonal to the contrib/ vs ELPA package discussion.


Regards,

-- 
Nicolas Goaziou



Re: [O] How to use ox-bibtex

2014-01-29 Thread o.castillo.felis...@gmail.com
I finally did it!!! (with your help of course).

Thank you.

A single doubt is left... the bibtex compilation is not performed during
the exportation process, should be done manually, Am I write?

 For completeness 

$ cd ~/.emacs.d/

Either create the repository

$ git clone git://orgmode.org/org-mode.git
$ cd org-mode

or update it

$ cd org-mode
$make up1

Then compile the sources

$ make all
$ sudo make install

After this... I followed the advice of Eric,  open an emacs session without
personal configuration

$ make vanilla

in the emacs session evaluate one line at the time, for that use =M-:=

(add-to-list 'load-path contrib/lisp/)
(require 'ox-bibtex)

Finally, open the =ox-bibtex-example.org= and export it!!!

I did the work for me, however, the bibtex compilation should be done by
hand.

Cheers.


On Tue, Jan 28, 2014 at 11:16 PM, Eric Schulte schulte.e...@gmail.comwrote:

 There is not enough information to address your bug.  Please read [1]
 and re-send.  It sounds to me like your installation may be bad, in
 which case it may also be worthwhile to read [2].

 Best,

 Footnotes:
 [1]  http://orgmode.org/org.html#Feedback

 [2]
 http://orgmode.org/worg/org-faq.html#keeping-current-with-Org-mode-development

 --
 Eric Schulte
 https://cs.unm.edu/~eschulte
 PGP: 0x614CA05D




-- 
_
Oscar Castillo-Felisola.
Grupo de Fisica Teorica.
UTFSM -- CCTVal.
Av. Espana, 1680, Valparaiso-Chile.
__


Re: [O] How to use ox-bibtex

2014-01-29 Thread Nick Dokos
o.castillo.felis...@gmail.com o.castillo.felis...@gmail.com writes:


 A single doubt is left... the bibtex compilation is not performed
 during the exportation process, should be done manually, Am I write?


You can customize org-latex-pdf-process to do what you want.
By default, it does three pdflatex runs in a row. If texi2dvi
works for you, it might be preferable. But you can always add
a bibtex run after the first pdflatex run.

Nick




Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Florian Beck

On 29.01.2014 14:16, Nick Dokos wrote:


But it's not just a matter of satisfying rules: it's a matter of making
it easy on users.


That is why I don't recommend satisfying them here.


Having a bad binding as well as a good binding for
something would mean that if I load a minor mode that takes over the
bad binding, I would then lose it in the major mode and have to
remember the good binding. That's more confusing IMO than having a
single good binding: if we need to retrain fingers, we need to retrain
them once, not every time we load a minor mode that steps on some
binding.


On the other hand, it doesn't happen every time. The bindings had been 
working for years before one user reported a problem with some of them. 
The conflict is rare and doesn't require resolution. But it is polite to 
provide alternatives for bindings that might be shadowed.



--
Florian Beck



Re: [O] Clojure Code Block Results not Tabularized

2014-01-29 Thread Eric Schulte
Soapy Smith soapy-sm...@comcast.net writes:

 Yes, I agree the Clojure behavior is not quite correct.  But all the
 functionality is there if both the old and new are combined.  I think
 only a rearrangement of existing code is required.


Try evaluating the following and see how it works.  This simply copies
the results handling from the slime backend to the cider backend (which
currently does not appear to have any results handling).  While you're
at it the nrepl results handling looks broken to me as well.  Maybe
Bastien (who I believe wrote or committed this code) can help.

(defun org-babel-execute:clojure (body params)
  Execute a block of Clojure code with Babel.
  (let ((expanded (org-babel-expand-body:clojure body params)))
(case org-babel-clojure-backend
  (cider
   (require 'cider)
   (let ((result
  (or (nth 1 (nrepl-send-string-sync
  expanded
  (cider-current-ns)
  (nrepl-current-tooling-session)))
  (error nREPL not connected!  Use M-x cider-jack-in RET
 (org-babel-result-cond (cdr (assoc :result-params params))
   result
   (condition-case nil (org-babel-script-escape result)
 (error result)
  (nrepl
   (require 'nrepl)
   (if (nrepl-current-connection-buffer)
   (let* ((result (nrepl-eval expanded))
  (s (plist-get result :stdout))
  (r (plist-get result :value)))
 (if s (concat s \n r) r))
 (error nREPL not connected!  Use M-x nrepl-jack-in RET)))
  (slime
   (require 'slime)
   (with-temp-buffer
 (insert expanded)
 ((lambda (result)
(let ((result-params (cdr (assoc :result-params params
  (org-babel-result-cond result-params
result
(condition-case nil (org-babel-script-escape result)
  (error result)
  (slime-eval
   `(swank:eval-and-grab-output
 ,(buffer-substring-no-properties (point-min) (point-max)))
   (cdr (assoc :package params)

I don't have clojure installed locally and can't test.

Best,


 I like the idea of comparing to the behavior of Python code blocks.
 I've got a Coursera class coming up which will use Python, so I need to
 get it set it up here.

 Thank you for the assistance!
 Greg

 On Wed, 2014-01-29 at 13:58 +0100, Christian Moe wrote:
 Soapy Smith writes:
 
  Christian, could you try :results table with Python and reply back with
  the #+RESULTS:?
 
 Same as the default, i.e. a table, as expected.
 #+RESULTS:
 | 1 | 2 | 3 |
 
 The Babel/Clojure behavior you report does seem buggy. 
 
 I'm afraid I can't be of further help, but hopefully others will pick up
 on this.
 
 Yours,
 Christian




-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] Clojure Code Block Results not Tabularized

2014-01-29 Thread Bastien
Eric Schulte schulte.e...@gmail.com writes:

 Try evaluating the following and see how it works.

It works fine for me:

,
| #+BEGIN_SRC clojure :results table
| (map #(* %1 3) '(1 2 3))
| #+END_SRC
| 
| #+RESULTS:
| | 3 | 6 | 9 |
`

 This simply copies
 the results handling from the slime backend to the cider backend (which
 currently does not appear to have any results handling).  While you're
 at it the nrepl results handling looks broken to me as well.

Yep.

Greg, please test Eric's function above for all your use cases and let
us know if it covers them all -- then I'll fix this and the nrepl case
too.

Thanks Eric!

-- 
 Bastien



Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Bastien
Florian Beck f...@miszellen.de writes:

 But it is
 polite to provide alternatives for bindings that might be shadowed.

Indeed.

The only problem is C-c ^ since C-c C-^ is already taken.

Btw, we could use C-c C-u (currently bound to `outline-up-heading')
instead of C-c C-^ (currently bound to `org-up-element') : in most
cases, `org-up-element' will achieve either the same or a better
job.

-- 
 Bastien



Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

 Florian Beck f...@miszellen.de writes:

 But it is
 polite to provide alternatives for bindings that might be shadowed.

 Indeed.

 The only problem is C-c ^ since C-c C-^ is already taken.

 Btw, we could use C-c C-u (currently bound to `outline-up-heading')
 instead of C-c C-^ (currently bound to `org-up-element') : in most
 cases, `org-up-element' will achieve either the same or a better
 job.

I think that C-M-u is also a good candidate for `org-up-element'.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Thomas S. Dye


Aloha Seb,

Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 What about `C-c {' and such in the tables?

The syntax table I see in my org file calls `{' an open delimiter
character, not punctuation.

Of course, I'm assuming that what the syntax table calls punctuation is
what the emacs guideline means when it says punctuation.  

Also, this is my first time trying to decode a syntax table, so caveat
emptor.

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com




Re: [O] [ANN] google-contacts.el can now export to org-contacts.

2014-01-29 Thread Robert Eckl
Rüdiger Sonderfeld ruedi...@c-plusplus.de writes:

 Hello,

 Julien Danjou's google-contacts.el is a GNU Emacs package to display
 contacts from Google Contacts within Emacs. I have recently added
 support to export contacts to org-contacts format (See
 contrib/lisp/org-contacts.el). 

 Calling `M-x google-contacts-to-org-contacts' will export all contacts
 into the current buffer. There currently is no support for
 synchronisation. 

 http://julien.danjou.info/projects/emacs-packages#google-contacts

I wanted to play with it, but if I use
*M-x google-contacts*
and type string i get 
google-oauth-auth-and-store: Symbol's function definition is void:
  oauth2-auth-and-store

Cu,
Robert



Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Bastien


Hi Thomas,

t...@tsdye.com (Thomas S. Dye) writes:

 Also, this is my first time trying to decode a syntax table, so caveat
 emptor.

Yes -- when doing C-u C-x on { in fundamental-mode I read

Character code properties: customize what to show
  name: LEFT CURLY BRACKET
  old-name: OPENING CURLY BRACKET
  general-category: Ps (Punctuation, Open)
^^^

and this is the same in org-mode, as org-mode does not modify the
syntax of this character.

So I think `{' is generally a considered a punctuation character
(compare it to the `*' char, which also falls into two categories,
punctuation and other.)

-- 
 Bastien




Re: [O] fold only DONE items at #+STARTUP

2014-01-29 Thread Bastien
Hi Piotr,

Piotr Isajew pisa...@yahoo.com writes:

 For example, when I open .org file I would like to have subtrees
 marked as DONE folded, but the others should be opened as with
 #+STARTUP: content setting. Can it be done?

No.  But you can archive the DONE subtrees with C-c C-x C-a for
example.  See Archiving in Org's manual.

-- 
 Bastien



Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Achim Gratz
Bastien writes:
 More precisely, I suggest these rebindings:

 C-c # Checkboxes = C-c C-#
 C-c , Priorities = C-c C-,

C-, can not be input using an ASCII terminal as it would produce a line
control character.

 C-c ; Comment lines  = C-c C-;
 C-c @ Mark subtree   = C-c C-@

C-@ may get lost in some terminals also (it's the NUL character).  Any
combinations with Shift were originally ignored and silently mapped to
their non-shifted counterparts.



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

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




[O] bug in tangling code?

2014-01-29 Thread John Kitchin
There seems to be a bug in org-mode 8.2.5g for tangling source blocks.

If I have an org-file with just this in it:

#+BEGIN_SRC python :tangle test2.py

a = 1

print a*2

#+END_SRC

#+RESULTS:
: 2

And  then I run org-babel-tangle, I get this error:

byte-code: Before first headline at position 3 in buffer test.org2

The file tangles fine with an older org7.9 version. It also tangles fine if
I add a headline above the source block.

The error seems to come from this line:
 (org-back-to-heading t)  ; Sets match data

L476 in ob-tangle.el

John

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


Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Thomas S. Dye


Aloha Bastien,

Bastien b...@gnu.org writes:

 Hi Thomas,

 t...@tsdye.com (Thomas S. Dye) writes:

 Also, this is my first time trying to decode a syntax table, so caveat
 emptor.

 Yes -- when doing C-u C-x on { in fundamental-mode I read

 Character code properties: customize what to show
   name: LEFT CURLY BRACKET
   old-name: OPENING CURLY BRACKET
   general-category: Ps (Punctuation, Open)
 ^^^

 and this is the same in org-mode, as org-mode does not modify the
 syntax of this character.

 So I think `{' is generally a considered a punctuation character
 (compare it to the `*' char, which also falls into two categories,
 punctuation and other.)

Then punctuation has two senses, one generic and another specific. To
my mind, the emacs guideline is ambiguous unless there is some
convention about which sense is meant in this case.  I guess it would be
possible to look at the code to figure this out, but I'm not well
equipped to do that.

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com




Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Andreas Leha
Bastien b...@gnu.org writes:

 Hi Nick,

 Nick Dokos ndo...@gmail.com writes:

 I find myself more in agreement with Seb than with Bastien here. The
 argument that reducing the number of bad bindings reduces the chance
 of conflicts does not hold water IMO: we will always have to be looking
 in the rear-view mirror for some minor mode that will step on us.

 In the last ten years, we had only *one* such problem while having a
 dozen of faulty keybindings --- my hope is that, with only a fistful
 of faulty keybindings, we won't have to look in the rear-view mirror
 for the next twenty years :)  [IOW: I don't buy the all-or-nothing
 reasoning.]


I might be missing something here.  But I think it would not be a
problem for Bastien (and others with similar preferences) to rebind the
keys to the shorter and potentially problematic version.  So to me it
seems, that the only problem with making the default keybindings less
'offensive' is finding non-taken and non-offensive keybindings.

The question is whether Org could do something to make rebinding keys
easier?  Like a worg page / FAQ about 'getting the old keybindings
back', maybe?

Just my 2ct, of course.
- Andreas






 More precisely, I suggest these rebindings:

 C-c # Checkboxes = C-c C-#
 C-c , Priorities = C-c C-,
 C-c ; Comment lines  = C-c C-;
 C-c @ Mark subtree   = C-c C-@

 (Note they are also accessible through speedy keys.)

 C-c ~ Cooperation= C-c C-~

 (This one I just discovered.)

 Let's not get trapped in a buridanesque decision.  :)




Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Iannis Zannos
Yep, I am also using org-mode with icicles. Made several mods to help with
that. I use icicles for searching headers or text content all the time.
 Interesting is the possibility to open a section (subtree) in an
independent buffer after finding it, with one command.  I enclose the code
here, plus the link to a gist containing the code.

Gist link: https://gist.github.com/iani/8695954
Gist name: org-icicles

Iannis Zannos


(add-hook 'org-mode-hook
  (lambda () (imenu-add-to-menubar Imenu)))
(setq org-imenu-depth 3)

(defun org-icicle-occur ()
  In org-mode, show entire buffer contents before running icicle-occur.
 Otherwise icicle-occur will not place cursor at found location,
 if the location is hidden.
  (interactive)
  (show-all)
  (icicle-occur (point-min) (point-max))
  (recenter 3))

(eval-after-load 'org
  '(define-key org-mode-map (kbd C-c C-') 'org-icicle-occur))
(eval-after-load 'org
  '(define-key org-mode-map (kbd C-c i o) 'org-icicle-occur))
(defun org-icicle-imenu (separate-buffer)
  In org-mode, show entire buffer contents before running icicle-imenu.
Otherwise icicle-occur will not place cursor at found location,
if the location is hidden.
If called with prefix argument (C-u), then:
- open the found section in an indirect buffer.
- go back to the position where the point was before the command, in the
  original buffer.
  (interactive P)
  (show-all)
  (let ((mark (point)))
(icicle-imenu (point-min) (point-max) t)
(cond (separate-buffer
   (org-tree-to-indirect-buffer)
   (goto-char mark))
  (t (recenter 4)

(eval-after-load 'org
  '(define-key org-mode-map (kbd C-c C-=) 'org-icicle-imenu))
(eval-after-load 'org
  '(define-key org-mode-map (kbd C-c i m) 'org-icicle-imenu))

;; install alternative for org-mode C-c = org-table-eval-formula
;; which is stubbornly overwritten by icy-mode.
(eval-after-load 'org
  '(define-key org-mode-map (kbd C-c C-x =) 'org-table-eval-formula))

;; this is a redundant second try for the above, to be removed after
testing:
(add-hook 'org-mode-hook
  (lambda ()
(local-set-key (kbd C-c M-=) 'org-table-eval-formula)))

;;;  Adapt org-mode to icicle menus when refiling (C-c C-w)
;;; Still problems. Cannot use standard org refiling with icicles activated!
(setq org-outline-path-complete-in-steps nil)

(add-hook 'org-mode-hook (lambda () (prelude-mode -1)))

(defun org-refile-icy (as-subtree optional do-copy-p)
  Alternative to org-refile using icicles.
Refile or copy current section, to a location in the file selected with
icicles.
Without prefix argument: Place the copied/cut section it *after* the
selected section.
With prefix argument: Make the copied/cut section *a subtree* of the
selected section.

Note 1: If quit with C-g, this function will have removed the section that
is to be refiled.  To get it back, one has to undo, or paste.

Note 2: Reason for this function is that icicles seems to break org-modes
headline
buffer display, so onehas to use icicles for all headline navigation if it
is loaded.
  (interactive P)
  (outline-back-to-heading)
  (if do-copy-p (org-copy-subtree) (org-cut-subtree))
  (show-all)
  (icicle-imenu (point-min) (point-max) t)
  (outline-next-heading)
  (unless (eq (current-column) 0) (insert \n))
  (org-paste-subtree)
  (if as-subtree (org-demote-subtree)))

(defun org-copy-icy (as-subtree)
  Copy section to another location in file, selecting the location with
icicles.
See org-refile-icy.
  (interactive P)
  (org-refile-icy as-subtree t))

(eval-after-load 'org
  '(define-key org-mode-map (kbd C-c i r) 'org-refile-icy))
(eval-after-load 'org
  '(define-key org-mode-map (kbd C-c i c) 'org-copy-icy))





On Wed, Jan 29, 2014 at 9:48 PM, Thomas S. Dye t...@tsdye.com wrote:



 Aloha Bastien,

 Bastien b...@gnu.org writes:

  Hi Thomas,
 
  t...@tsdye.com (Thomas S. Dye) writes:
 
  Also, this is my first time trying to decode a syntax table, so caveat
  emptor.
 
  Yes -- when doing C-u C-x on { in fundamental-mode I read
 
  Character code properties: customize what to show
name: LEFT CURLY BRACKET
old-name: OPENING CURLY BRACKET
general-category: Ps (Punctuation, Open)
  ^^^
 
  and this is the same in org-mode, as org-mode does not modify the
  syntax of this character.
 
  So I think `{' is generally a considered a punctuation character
  (compare it to the `*' char, which also falls into two categories,
  punctuation and other.)

 Then punctuation has two senses, one generic and another specific. To
 my mind, the emacs guideline is ambiguous unless there is some
 convention about which sense is meant in this case.  I guess it would be
 possible to look at the code to figure this out, but I'm not well
 equipped to do that.

 All the best,
 Tom

 --
 Thomas S. Dye
 http://www.tsdye.com





Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Iannis Zannos
Agree.
To do my own rebindings i use this kind of code:

(eval-after-load 'org
  '(define-key org-mode-map (kbd C-c C-=) 'org-icicle-imenu))

But when re-opening a buffer with desktop after rebooting emacs, the
new bindings are not added

IZ



On Wed, Jan 29, 2014 at 10:06 PM, Andreas Leha 
andreas.l...@med.uni-goettingen.de wrote:

 Bastien b...@gnu.org writes:

  Hi Nick,
 
  Nick Dokos ndo...@gmail.com writes:
 
  I find myself more in agreement with Seb than with Bastien here. The
  argument that reducing the number of bad bindings reduces the chance
  of conflicts does not hold water IMO: we will always have to be looking
  in the rear-view mirror for some minor mode that will step on us.
 
  In the last ten years, we had only *one* such problem while having a
  dozen of faulty keybindings --- my hope is that, with only a fistful
  of faulty keybindings, we won't have to look in the rear-view mirror
  for the next twenty years :)  [IOW: I don't buy the all-or-nothing
  reasoning.]
 

 I might be missing something here.  But I think it would not be a
 problem for Bastien (and others with similar preferences) to rebind the
 keys to the shorter and potentially problematic version.  So to me it
 seems, that the only problem with making the default keybindings less
 'offensive' is finding non-taken and non-offensive keybindings.

 The question is whether Org could do something to make rebinding keys
 easier?  Like a worg page / FAQ about 'getting the old keybindings
 back', maybe?

 Just my 2ct, of course.
 - Andreas






  More precisely, I suggest these rebindings:
 
  C-c # Checkboxes = C-c C-#
  C-c , Priorities = C-c C-,
  C-c ; Comment lines  = C-c C-;
  C-c @ Mark subtree   = C-c C-@
 
  (Note they are also accessible through speedy keys.)
 
  C-c ~ Cooperation= C-c C-~
 
  (This one I just discovered.)
 
  Let's not get trapped in a buridanesque decision.  :)





[O] [bug] Tangling a LaTeX code block creates a .latex file

2014-01-29 Thread Sebastien Vauban
Hello,

This one is quite new: tangling a code block in `latex' language now
produces a file with a `.latex' extension, instead of the common `.tex'
extension.

Example:

--8---cut here---start-8---
* Letter composition

#+begin_src latex :noweb yes :tangle yes
\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

% ...
#+end_src
--8---cut here---end---8---

Best regards,
  Seb

PS- Org-mode version 8.2.5e (release_8.2.5e-111-g72ad52)

-- 
Sebastien Vauban




Re: [O] [ANN] ELPA package for ODT and JabRef exporters

2014-01-29 Thread Aric Gregson
Jambunathan,

I have tried to install this. I even created a blank .emacs file as you
suggested. Everything appears to be fine with the exception of 

C-h v org-odt-styles-dir
C-h v org-odt-schema-dir

These do not appear as options for me. I'm not sure if that matters.

Thanks, Aric




Re: [O] [ANN] ELPA package for ODT and JabRef exporters

2014-01-29 Thread Jambunathan K
Aric Gregson aorc...@mac.com writes:

 Jambunathan,

 I have tried to install this. I even created a blank .emacs file as you
 suggested. Everything appears to be fine with the exception of 

C-h v org-odt-styles-dir
C-h v org-odt-schema-dir

 These do not appear as options for me. I'm not sure if that matters.

Most likely that ODT backend is not loaded.  Try this.

1. Configure org-export-backends and add ODT to it.
2. Put (setq org-odt-data-dir nil) at the start of Emacs.
3. Visit an Org file and export to ODT

Now check the *Messages* buffer and the value of the above variables.


 Thanks, Aric




Re: [O] bug: Please save the buffer to a file before refiling when the buffer is already saved

2014-01-29 Thread Samuel Wales
with the patch on maint, sometimes refile goto from the scratch buffer
shows 2 olpaths for the same location.  one has the filename and the
other does not.  selecting the default results in:

Debugger entered--Lisp error: (error Invalid target location)
  signal(error (Invalid target location))
  user-error(Invalid target location)
  org-refile-get-location(Goto nil nil 4)
  org-refile(4)
  alpha-org-goto-1()
  alpha-org-goto-restricted()
  call-interactively(alpha-org-goto-restricted nil nil)

where restricted goto let-binds org refile targets.  so it seems about
the same as before?  i don't see the need for 2 olpaths to point to
the same location.

could be pilot error?


On 1/29/14, Bastien b...@gnu.org wrote:
 Hi Samuel,

 Samuel Wales samolog...@gmail.com writes:

 Would this also get rid of the current-file special case?  If so, this
 sounds good to me and I will test it.

 Please test the attached patch against maint and let me know what
 issues it fixes for you.

 Thanks,




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

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

Denmark: free Karina Hansen NOW.



Re: [O] Bug dragging lines in tag-restricted agenda

2014-01-29 Thread Thomas Morgan
Hi, Bastien,

This is working in 8.2.5c, thanks!

There are a few related bugs (going to a running clock associated
with a line that has been dragged in the agenda, for example) that
I'll send in reports for later.

Thanks,
Thomas

Bastien b...@gnu.org writes:

 Hi Thomas,

 Bastien b...@gnu.org writes:

 I'm afraid I'm still seeing the same behavior described
 in the bug report.

 You're right, there are still annoying bugs after filtering.
 I'll have a look when I have more time at hand.

 This should now be fixed in maint, please test heavily
 and report any issue.

 Thanks,



[O] Arranging images on a LaTeX page?

2014-01-29 Thread Peter Davis

I can place images in my document, suitably scaled, with constructs like:

#+ATTR_LATEX: :height 4.5cm
[[/path/to/image.jpg]]

However, if I try to put two images side-by-side:

#+ATTR_LATEX: :height 4.5cm
| [[/path/to/image1.jpg]] | [[/path/to/image2.jpg]] |

the height attribute is ignored.

Is there a way to do this?

Thanks!

-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Clojure Code Block Results not Tabularized

2014-01-29 Thread Phill Wolf
It is better.  To really stress it, I tried a two-row table:

#+begin_src clojure :results table
  [[:ny :nj :ct]
   [  7   9   4]]
#+end_src

#+RESULTS:
| :ny | :nj | :ct |
|   7 |   9 |   4 |


On Wed, Jan 29, 2014 at 10:28 AM, Bastien b...@gnu.org wrote:

 Eric Schulte schulte.e...@gmail.com writes:

  Try evaluating the following and see how it works.

 It works fine for me:

 ,
 | #+BEGIN_SRC clojure :results table
 | (map #(* %1 3) '(1 2 3))
 | #+END_SRC
 |
 | #+RESULTS:
 | | 3 | 6 | 9 |
 `

  This simply copies
  the results handling from the slime backend to the cider backend (which
  currently does not appear to have any results handling).  While you're
  at it the nrepl results handling looks broken to me as well.

 Yep.

 Greg, please test Eric's function above for all your use cases and let
 us know if it covers them all -- then I'll fix this and the nrepl case
 too.

 Thanks Eric!

 --
  Bastien




Re: [O] bug: Please save the buffer to a file before refiling when the buffer is already saved

2014-01-29 Thread Bastien
Hi Samuel,

please provide a reproducible recipe, it's really hard to explore
those kind of bugs otherwise.

The patch should fix at least these two bugs:

- you enter A headline/ as a refile target but A headline/
  is not in the current file: before the patch, it throws an error,
  after the patch it refiles to A headline/.

- you enter A headline/a_non_existent_headline as a refile target
  and have (setq org-refile-allow-creating-parent-nodes t).  Before
  the patch, if A headline/ is not in the current file, it will fail
  silently.  Now the prompt asks for confirmation and will refile to
  the correct location by guessing the filename right.

Thanks for letting me know.

-- 
 Bastien



Re: [O] Bug dragging lines in tag-restricted agenda

2014-01-29 Thread Bastien
Hi Thomas,

Thomas Morgan t...@ziiuu.com writes:

 There are a few related bugs (going to a running clock associated
 with a line that has been dragged in the agenda, for example) that
 I'll send in reports for later.

Please do -- as agenda lines are transported with all their text
properties, it seems strange that associated data gets corrupted
so please let us know.

Thanks!

-- 
 Bastien



[O] Proposal/request for input: slidify export for html slides

2014-01-29 Thread John Hendy
Greetings,


I use R quite a bit, and ran into a new exporter sometime last year called
Slidify:
- http://slidify.org/start.html

Would anyone be able to suggest a good starting place for creating a
possible backend exporter for this? RStudio allows this pretty easily, but
I really like my prose/code in Orgmode format and working within Emacs.
Plus, it allows the obvious benefit of exporting to Beamer or Slidify at
will (perhaps with some tweaks).

I planned to look at the existing non-Beamer libraries for reference, but
thought it wouldn't hurt to inquire about potential pitfalls based in how
Slidify works:
- initializes a git repo with some css/other folders
- creates an index.Rmd file (markdown, which one edits to create
presentation)
- spits out an index.html file when you run `slidify(index.Rmd)`

I think the folders in the presentation directory could be initialized and
then Org syntax could be converted to R markdown, followed by running the
slidify command to compile, but am not sure.

I'm coming from ~zero elisp experience but think this would be a neat hobby
project if I could pull it off.


Thanks for any input,
John


Re: [O] (no subject)

2014-01-29 Thread Bastien
Hi Ken,

Ken Okada keno.s...@gmail.com writes:

 I have a question. By default tables are centered in LaTeX export.
 Sometimes I prefere to make it flush left or right. I thought this was
 done with, for example,

 #+ATTR_LATEX: :center nil
 | a | b |
 | 1 | 2 |

The use of the :center parameter suggests you consulted a recent
version of the documentation, for Org =8.0.

This is how it works for Org 8.0 and above:

#+ATTR_LATEX: :environment longtable :align l|lp{3cm}r|l
| a | b | c |
| 1 | 2 | 3 |

If you can, please upgrade.  Otherwise, someone needs to check the
documentation for Org 7.8.11... 

HTH,

-- 
 Bastien



Re: [O] [bug] Tangling a LaTeX code block creates a .latex file

2014-01-29 Thread Bastien


Hi Sébastien,

Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 This one is quite new: tangling a code block in `latex' language now
 produces a file with a `.latex' extension, instead of the common `.tex'
 extension.

AFAIU you need to (require 'ob-latex) first.

Could you say since when you get this error, since obviously it worked
before and you didn't change your setup wrt this?

Thanks,

-- 
 Bastien




Re: [O] (no subject)

2014-01-29 Thread John Hendy
On Wed, Jan 29, 2014 at 6:15 PM, Bastien b...@gnu.org wrote:

 Hi Ken,

 Ken Okada keno.s...@gmail.com writes:

  I have a question. By default tables are centered in LaTeX export.
  Sometimes I prefere to make it flush left or right. I thought this was
  done with, for example,
 
  #+ATTR_LATEX: :center nil
  | a | b |
  | 1 | 2 |

 The use of the :center parameter suggests you consulted a recent
 version of the documentation, for Org =8.0.

 This is how it works for Org 8.0 and above:

 #+ATTR_LATEX: :environment longtable :align l|lp{3cm}r|l
 | a | b | c |
 | 1 | 2 | 3 |

 If you can, please upgrade.  Otherwise, someone needs to check the
 documentation for Org 7.8.11...

Bastien beat me to it. Yes, the example syntax is for Org  8.0.
Here's a version of the manual for v7.9:
- 
http://www.gnu.org/software/emacs/manual/html_mono/org.html#Tables-in-LaTeX-export

I'm not sure what the proper argument is and can't test since I'm on
the current version of Org from git. You might take a look at the
placement= argument?

I'm having a tough time finding info on LaTeX with what makes a table
left or right aligned (not the columns, but the table itself). Most of
the hits are on how to *center* the table, which seems to suggest they
will be left aligned by default.

Sorry not to be of better help -- I think Bastien's suggestion to
upgrade to 8.0 is the right move. A lot of the mailing list has likely
made the move and thus it's hard to troubleshoot versions with the old
exporter syntax.


Best regards,
John


 HTH,

 --
  Bastien




Re: [O] Arranging images on a LaTeX page?

2014-01-29 Thread Peter Davis

Hi, Bastien,

On 1/29/14, 7:00 PM, Bastien wrote:


Is there a way to do this?

Not really.  But you can use `org-latex-image-default-height'
for all pictures in your file.

Thanks. I don't think setting an emacs variable is going to work for me. 
Too much manual setting/unsetting. I may give it a try if I get 
desperate though.


Thanks!
-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Arranging images on a LaTeX page?

2014-01-29 Thread John Hendy
On Wed, Jan 29, 2014 at 6:22 PM, Peter Davis p...@pfdstudio.com wrote:
 Hi, Bastien,

 On 1/29/14, 7:00 PM, Bastien wrote:

 Is there a way to do this?

 Not really.  But you can use `org-latex-image-default-height'
 for all pictures in your file.

 Thanks. I don't think setting an emacs variable is going to work for me. Too
 much manual setting/unsetting. I may give it a try if I get desperate
 though.

This has come up before, and the answer is that it's not currently
possible with just Org. See the following [probably] duplicate
questions:
- http://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg01800.html
- https://www.mail-archive.com/emacs-orgmode@gnu.org/msg75806.html

There were some suggestions there you might try (e.g. using the LaTeX
subfig package).


Best regards,
John


 Thanks!
 -pd

 --
 
 Peter Davis
 The Tech Curmudgeon
 www.techcurmudgeon.com



Re: [O] org-mode + icicles, avoid key binding redefinitions?

2014-01-29 Thread Bastien


t...@tsdye.com (Thomas S. Dye) writes:

 Then punctuation has two senses, one generic and another specific. To
 my mind, the emacs guideline is ambiguous unless there is some
 convention about which sense is meant in this case.  I guess it would be
 possible to look at the code to figure this out, but I'm not well
 equipped to do that.

Re-reading the Elisp conventions about keybindings says this:

   • Sequences consisting of ‘C-c’ followed by ‘{’, ‘}’, ‘’, ‘’, ‘:’
 or ‘;’ are also reserved for major modes.

   • Sequences consisting of ‘C-c’ followed by any other punctuation
 character are allocated for minor modes.  Using them in a major
 mode is not absolutely prohibited, but if you do that, the major
 mode binding may be shadowed from time to time by minor modes.

So C-c { and C-c } are fine in a major mode.

(And now that C-c : is not used anymore, this gives us one more free
keybinding to reuse.)

-- 
 Bastien




Re: [O] Arranging images on a LaTeX page?

2014-01-29 Thread Peter Davis
On Wed, Jan 29, 2014 at 06:29:37PM -0600, John Hendy wrote:
 
 This has come up before, and the answer is that it's not currently
 possible with just Org. See the following [probably] duplicate
 questions:
 - http://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg01800.html
 - https://www.mail-archive.com/emacs-orgmode@gnu.org/msg75806.html
 
 There were some suggestions there you might try (e.g. using the LaTeX
 subfig package).

Thanks, John. I'll take a look.

Meanwhile. for the current need, I'll probaby just compose the images
in Photoshop or GIMP, and place the resulting composite in the
document.

Thanks!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Proposal/request for input: slidify export for html slides

2014-01-29 Thread Ahmadou Dicko
I love slidify too and I think that having similar functionnality in org
could be great.
I think that you have everything to do that using the html backend, you
just need to interface the right Javascript/HTML5 library.
In slidify you can use io2012, deck.js, shower and landslide and I know
that you can use deck.js through ox-deck and it will not be difficult to
create and interface for other library too.
For example if you need a nice non Beamer library you can also check
ox-reveal https://github.com/yjwen/org-reveal/ which interface reveal.js.

Here is a minimal example with R code.  (Make sure to have ox-reveal.el in
your path and export using C-c C-e R R)




On Thu, Jan 30, 2014 at 12:05 AM, John Hendy jw.he...@gmail.com wrote:

 Greetings,


 I use R quite a bit, and ran into a new exporter sometime last year called
 Slidify:
 - http://slidify.org/start.html

 Would anyone be able to suggest a good starting place for creating a
 possible backend exporter for this? RStudio allows this pretty easily, but
 I really like my prose/code in Orgmode format and working within Emacs.
 Plus, it allows the obvious benefit of exporting to Beamer or Slidify at
 will (perhaps with some tweaks).

 I planned to look at the existing non-Beamer libraries for reference, but
 thought it wouldn't hurt to inquire about potential pitfalls based in how
 Slidify works:
 - initializes a git repo with some css/other folders
 - creates an index.Rmd file (markdown, which one edits to create
 presentation)
 - spits out an index.html file when you run `slidify(index.Rmd)`

 I think the folders in the presentation directory could be initialized and
 then Org syntax could be converted to R markdown, followed by running the
 slidify command to compile, but am not sure.

 I'm coming from ~zero elisp experience but think this would be a neat
 hobby project if I could pull it off.


 Thanks for any input,
 John




-- 
Ahmadou H. DICKO
statistician economist (Ingénieur Statisticien Économiste)
PhD candidate in Climate change economics
Faculty of economics and managment - Cheikh Anta Diop University
West African Science Service Center on Climate Change and Adaptated Land
Use (WASCAL)
Center for Development Research (ZEF) - University of Bonn
email : ahmadou.di...@ucad.edu.sn
twitter : @dickoah
github : github/dickoa https://github.com/dickoa
tel : +221 33 827 55 16
portable: +221 77 123 81 69
Title: (Ox-reveal and R)








Ox-reveal and R

@dickoah





Code




Embedding rCharts


library(rCharts)
hair_eye_male = subset(as.data.frame(HairEyeColor), Sex == "Male")
n1 - nPlot(Freq ~ Hair, group = 'Eye',
data = "" type = 'multiBarChart'
)
n1$set(width = 1200, height = 600)  
n1$show('inline', include_assets = TRUE, cdn = TRUE)







 
 








Code

You can check the raw Org-file here





 Created by Ahmadou H. Dicko. 







rChart.org
Description: Lotus Organizer


Re: [O] Proposal/request for input: slidify export for html slides

2014-01-29 Thread Rick Frankel
On Thu, Jan 30, 2014 at 12:57:46AM +, Ahmadou Dicko wrote:
I love slidify too and I think that having similar functionnality in org
could be great.
I think that you have everything to do that using the html backend, you
just need to interface the right Javascript/HTML5 library.
In slidify you can use io2012, deck.js, shower and landslide and I know
that you can use deck.js through ox-deck and it will not be difficult to
create and interface for other library too.
For example if you need a nice non Beamer library you can also check
ox-reveal which interface reveal.js.

Just to follow-up and expand. It looks like slidy is an interface for
Rstudio to a number of html slide (javascript) libraries, and uses
markdown as it markup language, while providing the ability to execute
R code interspersed with the markup (literate programming/reproducable
results)

Org is it's own markup language and allow interspersing executable
code (and its output) in a literate, reproducable way
(babel). Including, but not limited to, R.

In addion org has export interfaces to multiple output types. For
slideshow there are (at least):

  - ox-s5
  - ox-deck
  - ox-reveal
  - beamer

As well as pdf, html and others.

So it doesn't seem to make sense to use org as a frontend to Rstudio,
but i may be wrong...

rick



[O] Habits and Diary Type Dates?

2014-01-29 Thread Aric Gregson
Hello,

I believe that what I want to do will not work, but I thought I would
ask. I have a habit that I want to do on certain days of the week
only. I had the date in the org file set as the following:

#+begin_src org
%%(memq (calendar-day-of-week date) '(2 3 0))
#+end_src 

While it shows up on the calendar on the correct dates, it will not
cycle like a habit should. It will actually move to a DONE
state. Changing the date format back to an org date type format seems to
solve the problem.

Is there a work-around? 

Thanks, Aric

-- 
~O
/\_,
###-\  |_
(*) / (*)




[O] org-element-map no-recursion argument?

2014-01-29 Thread James Harkins
I've written some emacs-lisp using org-element-map to iterate over source 
code blocks in an org buffer and insert them into another buffer, including 
a listing number and caption (so it's different from tangling).


I was just trying to tweak it to ignore source code blocks in a comment 
section.


More specifically -- I had moved some material into a Removed subtree 
(with a tag noexport). This subtree contains some source blocks, but I 
want my function to ignore these.


I thought I could wrap the entire Removed section in #+begin/end_comment, 
and then tell org-element-map to skip comment blocks for recursion.


(org-element-map tree 'src-block (lambda (element) ...)
 nil nil 'comment)

But this has no effect. I guess the src-block filter erases the distinction 
between live and commented sections.


I can work around it by commenting out the captions, but it would be nicer 
to have an entire off-limits section of the document.


hjh



[O] GPG Files and Agenda

2014-01-29 Thread Aric Gregson
Hello,

I have a gpg encrypted org file in my org directory that I have tracked
time on. I would like this to show up in the Agenda view when I create
it and have logging on, but it seems that logged time from the gpg file
is not included in the agenda. I have loaded the module org-crypt, but
that does not seem to do anything different. I should note that I
encrypted it outside of org-mode, I used just the emacs 'Encrypt-file'
function. 

Must the file be encrypted from within org mode? Or is this just
something you cannot do? 

Thanks, Aric

-- 
~O
/\_,
###-\  |_
(*) / (*)




Re: [O] GPG Files and Agenda

2014-01-29 Thread Eric Abrahamsen
Aric Gregson aorc...@mac.com writes:

 Hello,

 I have a gpg encrypted org file in my org directory that I have tracked
 time on. I would like this to show up in the Agenda view when I create
 it and have logging on, but it seems that logged time from the gpg file
 is not included in the agenda. I have loaded the module org-crypt, but
 that does not seem to do anything different. I should note that I
 encrypted it outside of org-mode, I used just the emacs 'Encrypt-file'
 function. 

 Must the file be encrypted from within org mode? Or is this just
 something you cannot do? 

 Thanks, Aric

I don't think that's how org-crypt works: IIUC it only provides for
encrypting individual entries in an otherwise non-encrypted file. But both
whole-file encryption and per-tree encryption are going to have the same
problem regarding the agenda: there's nothing in the agenda generation
code which says decrypt all agenda files and everything in them.
Without that, org can't extract agenda data from them.

I could see an argument for automatic decryption, but you'd want to be
pretty careful about it -- org-crypt goes to some lengths help you keep
decrypted data from being saved to disk.

E




Re: [O] Proposal/request for input: slidify export for html slides

2014-01-29 Thread John Hendy
On Jan 29, 2014 7:46 PM, Rick Frankel r...@rickster.com wrote:

 On Thu, Jan 30, 2014 at 12:57:46AM +, Ahmadou Dicko wrote:
 I love slidify too and I think that having similar functionnality in
org
 could be great.
 I think that you have everything to do that using the html backend,
you
 just need to interface the right Javascript/HTML5 library.
 In slidify you can use io2012, deck.js, shower and landslide and I
know
 that you can use deck.js through ox-deck and it will not be
difficult to
 create and interface for other library too.
 For example if you need a nice non Beamer library you can also check
 ox-reveal which interface reveal.js.

 Just to follow-up and expand. It looks like slidy is an interface for
 Rstudio to a number of html slide (javascript) libraries, and uses
 markdown as it markup language, while providing the ability to execute
 R code interspersed with the markup (literate programming/reproducable
 results)

 Org is it's own markup language and allow interspersing executable
 code (and its output) in a literate, reproducable way
 (babel). Including, but not limited to, R.

 In addion org has export interfaces to multiple output types. For
 slideshow there are (at least):

   - ox-s5
   - ox-deck
   - ox-reveal
   - beamer

 As well as pdf, html and others.

 So it doesn't seem to make sense to use org as a frontend to Rstudio,
 but i may be wrong...


Agree on most points, and will be checking out the HTML org options as I
mentioned.

I did want to correct that slidify is not tied to rstudio, even though it
integrates nicely with it. I was playing with it when straight from an R
session within Emacs when I wrote the post.

It also has some nice web publishing features to send the presentation
right to git, dropbox, or rpubs from R, (though I didn't try that outside
of rstudio, so there could be caveats).

John

 rick



Re: [O] Habits and Diary Type Dates?

2014-01-29 Thread Josiah Schwab

Aric Gregson writes:

 I have a habit that I want to do on certain days of the week only.
 [ ... snip ... ]
 Changing the date format back to an org date type format seems to
 solve the problem.

 Is there a work-around? 

I have a habit that I only do on weekdays, and the workaround that I
ended up using was to have separate copies of the task for each day of
the week that I want to do it.

See some related discussion at
http://comments.gmane.org/gmane.emacs.orgmode/47134

Josiah



Re: [O] Habits and Diary Type Dates?

2014-01-29 Thread Aric Gregson
--On January 29, 2014 9:18:57 PM -0800 Josiah Schwab jsch...@gmail.com 
wrote:



I have a habit that I only do on weekdays, and the workaround that I
ended up using was to have separate copies of the task for each day of
the week that I want to do it.


Thanks, I read the link. Sounds like they are just not meant to work that 
way.


Aric






Re: [O] Org habit graph not showing

2014-01-29 Thread Chris Henderson
On Wed, Jan 29, 2014 at 5:06 PM, Chris Henderson henders...@gmail.comwrote:

 On Wed, Jan 29, 2014 at 6:07 AM, Bastien b...@gnu.org wrote:

 Chris Henderson henders...@gmail.com writes:

  Is this the underlying issue causing the problem? How can I get rid
  of this issue? Should I completely delete /Users/chris/.emacs.d/elpa/
  and install orgmode again?

 Yes, please do try that -- delete all ELPA Org instances
 and install Org package from a fresh Emacs session.

 Then use

   (package-initialize)

 before

 (require 'org)

 in your .emacs.el


 Adding (package-initialize) seem to have done the trick as in I don't get
 the version mismatch error anymore. But still can't see the graph. The
 following items are on the menu bar when I do
 alt-x org-agenda a (Org-Agenda Week Ddl Grid Habit vl Wrap)

 Thanks.


According to this:
https://lists.gnu.org/archive/html/emacs-orgmode/2010-09/msg00238.html

The habit should display on your agenda as a TODO item with a colored bar
after it.

But it doesn't. I only get:

Week-agenda (W05):
Monday 27 January 2014 W05
Tuesday28 January 2014
Wednesday  29 January 2014
Thursday   30 January 2014
Friday 31 January 2014
Saturday1 February 2014
Sunday  2 February 2014

for

* TODO meeting
  SCHEDULED: 2014-01-31 Fri .+1d
  - State DONE   from TODO   [2014-01-30 Thu 17:33]
  - State DONE   from TODO   [2014-01-30 Thu 17:31]
  - State DONE   from TODO   [2014-01-30 Thu 17:30]
  - State DONE   from TODO   [2014-01-30 Thu 17:30]
  - State DONE   from TODO   [2014-01-30 Thu 17:30]
  - State DONE   from TODO   [2014-01-30 Thu 17:25]
  :PROPERTIES:
  :LAST_REPEAT: [2014-01-30 Thu 17:33]
  :END:
  :LAST_REPEAT: [2014-01-30 Thu 17:25]
  :STYLE:habit
  :END


Re: [O] bug: Please save the buffer to a file before refiling when the buffer is already saved

2014-01-29 Thread Bastien
Hi Samuel,

Samuel Wales samolog...@gmail.com writes:

 i have very little capacity to do this properly, doing the best i can
 so you get timely feedback.  perhaps this gives you a little to go on.
   if not, this will take much longer.

Thanks -- I'll explore this using ido, which I do not use ordinarily.

If other users want to chim in and test, that'd be great too,
especially for the bugfixes I explained in my previous email.

-- 
 Bastien



Re: [O] (no subject)

2014-01-29 Thread Ken Okada
John,

Thanks for advising.

On Org 7.8.11, placement=[l] and placement={l} parameter does not make
sense for tables as I tried.

I tried to install the current version. (There was a compile error
arising from the fact that BSD make is not GNU make, but it's no matter.)
A simple example for :center nil works well. For main org file I have to
do more work... not about centering.

However there seems not to be a parameter for flush right. At present
this is not a serious problem because :center nil works well, so we can
control directory with #+LATEX: \begin ... and \end . But it's tiresome.

I also feel something about the difference between the way to designate
centering and flush left/right. For HTML export we use :align parameter;
for LaTeX, :center parameter, which only allows us to control centering
or not. :align parameter is used for alignment of contents of table.
I'm confused. I guess there's a problem about backward compatibility or
something.

As you wrote there's a way to change default behaviour, but I feel
centering is confortable in the most typesetting *with Org*.
I think such searching result is due to the default behaviour of LaTeX.
File local option switching the behaviour would be useful, I think.

Best regards,
Ken Okada


At Wed, 29 Jan 2014 18:22:38 -0600,
John Hendy wrote:
 
 On Wed, Jan 29, 2014 at 6:15 PM, Bastien b...@gnu.org wrote:
 
  Hi Ken,
 
  Ken Okada keno.s...@gmail.com writes:
 
   I have a question. By default tables are centered in LaTeX export.
   Sometimes I prefere to make it flush left or right. I thought this was
   done with, for example,
  
   #+ATTR_LATEX: :center nil
   | a | b |
   | 1 | 2 |
 
  The use of the :center parameter suggests you consulted a recent
  version of the documentation, for Org =8.0.
 
  This is how it works for Org 8.0 and above:
 
  #+ATTR_LATEX: :environment longtable :align l|lp{3cm}r|l
  | a | b | c |
  | 1 | 2 | 3 |
 
  If you can, please upgrade.  Otherwise, someone needs to check the
  documentation for Org 7.8.11...
 
 Bastien beat me to it. Yes, the example syntax is for Org  8.0.
 Here's a version of the manual for v7.9:
 - 
 http://www.gnu.org/software/emacs/manual/html_mono/org.html#Tables-in-LaTeX-export
 
 I'm not sure what the proper argument is and can't test since I'm on
 the current version of Org from git. You might take a look at the
 placement= argument?
 
 I'm having a tough time finding info on LaTeX with what makes a table
 left or right aligned (not the columns, but the table itself). Most of
 the hits are on how to *center* the table, which seems to suggest they
 will be left aligned by default.
 
 Sorry not to be of better help -- I think Bastien's suggestion to
 upgrade to 8.0 is the right move. A lot of the mailing list has likely
 made the move and thus it's hard to troubleshoot versions with the old
 exporter syntax.
 
 
 Best regards,
 John
 
 
  HTH,
 
  --
   Bastien