Re: [O] #+PROPERTY: for babel header args worked... then it didn't

2013-12-06 Thread Sebastien Vauban
James Harkins wrote:
 Achim Gratz Stromeko at nexgo.de writes:
 James Harkins writes:
  Now I'm working on a short article-class document, and I included the same 
  #+PROPERTY at the top, and... no effect. But... *the lines are identical*. 
  ??
 
 Did you C-c C-c the configuration lines (or reverted the document)?

 Argh... that must have been it. No, I didn't.

 Out of curiousity, will C-c also work for #+startup: beamer lines?
 Refresh setup current buffer is kind of annoying :)

 Re: Sebastian's question, it couldn't be a regression. I rendered the beamer
 document on Wednesday, no problem, and created the problem document on
 Thursday. No git updates in between.

 I'm sure Achim's answer is what I missed.

I'm sure I did C-c C-c the options. Now, if it does work, it'll prove I still
must be wrong...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] bug with :wrap when exporting

2013-12-06 Thread Sebastien Vauban
Nick Dokos wrote:
 Alan Schmitt alan.schm...@polytechnique.org writes:
 jsch...@gmail.com writes:
 Alan Schmitt writes:

 Off topic question: what does ECM stands for? (I understand it's a small
 example showing a bug, but I could not find the meaning of the
 acronym.)

 Exemple Complet Minimal

 http://orgmode.org/worg/org-faq.html#ecm

 Very interesting, I was not expecting French here.

 Nobody expects the Spanish Inquisition^W^W^WSebastien Vauban :-)

My 15 minutes of fame... ;-)

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Keyboard shortcut - is there a principle behind them?

2013-12-06 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

one alternative subject could be because it is Friday...

I am using org-mode and ess regularly, and I use quite a few keyboard
shortcuts, but each time I read about a new one, I am wondering: why
the heck these specific (default!) keyboard shortcuts?

I am not asking why keyboard sequence, but e.g. why export in org is
C-c e and why tangle is C-c C-v t, and so on.

In other words: I am trying to *understand* why C-c and not C-o,
because I have tremendous problems to remember the shortcuts - if I
would know that there is s tree structure, where each following key
narrows it down to further *thematically linked* commands, it would
make it easier to learn these.

Any insight into this? Or is there a emacs function which returns a
random keyboard shortcut for a given function (some emacs shortcuts
really seem to be that way...).

Thanks,

Rainer


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSoZKpAAoJENvXNx4PUvmCyp8IAM2uzkocZLD0MVVw/DSI4w7f
ZPFqVBppkzvc5Ef4vuA0Om4ETWqsgYaAs9Tnz3Q3mDGnkZ01yl4/PDGNav/sRGGY
pJs+HElogJCulNrHibh0Ai8X9w29yWZQZnXmPr5lAdmSjTDziUSdUakXte2KkD7O
v+82YoTDAbycUcqK7CUAFNmyNqn5UsXf1h2wYfe6xYaQUPTXnEWsLJAuE3otVE1P
fbmTAbOy+mq+4+2krwp+kCyGU4hoynpJBH1DBUvQgtJeEGYNL2AxYCnm4BU2axwK
qSykHLineyacD4x4RWzEu8uya/P/Q7OSAWQmdsnOT7xqrJo9wxphfrBVefLJb1A=
=BbQi
-END PGP SIGNATURE-



Re: [O] Keyboard shortcut - is there a principle behind them?

2013-12-06 Thread Oleh
Initially the shortcuts were mnemonic, e.g.
C-e: `move-end-of-line'. Obviously the keys ran out pretty quick.
Now only few shortcuts are reserved for user space and plugins,
the most notable of which is the `C-c` prefix.
That's why most custom modes such as org-mode and ESS bind to shortcuts
with `C-c` prefix: there's a convention that Emacs core will not use `C-c`.

A nice way of remembering shortcuts only when you need them is to
call commands by name with `M-x`.
After a while, when you note that you're using one particular command
a lot, you'll want to learn the shortcut for it.

There's one package that might be of good use to you: `smex'.
It uses ido completion for `M-x`. You can install it from MELPA/Marmelade.
It binds automatically to `M-x` when you install, although I recommend:
(global-set-key \C-t 'smex)

As an example, say you want to tangle. Here's what you do:
C-t tang
Now you see a bunch of rectangle commands mixed into the bunch.
You can filter them out by noting that tangle commands have `org` in their name.
C-SPC org C-SPC
Now there's only 7 candidates left and you can select the one you want with C-m
either by cycling with C-s or continuing to type part of name.

`smex` logs the commands you use most. For them it usually takes less
than 2-3 characters
from the name to be recognized.
E.g. if you use `org-babel-tangle` a lot, you can usually call it with
C-t bab C-m.

Finally note that no shortcuts are set in stone. You can customize
all of them if you want to do so.
For instance, and probably a lot of people will disagree, it doesn't
make sense for me to have `previous-line' on C-p. So I swap C-p and C-h:
(keyboard-translate ?\C-h ?\C-p)
(keyboard-translate ?\C-p ?\C-h)

Oleh


On Fri, Dec 6, 2013 at 10:02 AM, Rainer M Krug rai...@krugs.de wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi

 one alternative subject could be because it is Friday...

 I am using org-mode and ess regularly, and I use quite a few keyboard
 shortcuts, but each time I read about a new one, I am wondering: why
 the heck these specific (default!) keyboard shortcuts?

 I am not asking why keyboard sequence, but e.g. why export in org is
 C-c e and why tangle is C-c C-v t, and so on.

 In other words: I am trying to *understand* why C-c and not C-o,
 because I have tremendous problems to remember the shortcuts - if I
 would know that there is s tree structure, where each following key
 narrows it down to further *thematically linked* commands, it would
 make it easier to learn these.

 Any insight into this? Or is there a emacs function which returns a
 random keyboard shortcut for a given function (some emacs shortcuts
 really seem to be that way...).

 Thanks,

 Rainer


 - --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
 Biology, UCT), Dipl. Phys. (Germany)

 Centre of Excellence for Invasion Biology
 Stellenbosch University
 South Africa

 Tel :   +33 - (0)9 53 10 27 44
 Cell:   +33 - (0)6 85 62 59 98
 Fax :   +33 - (0)9 58 10 27 44

 Fax (D):+49 - (0)3 21 21 25 22 44

 email:  rai...@krugs.de

 Skype:  RMkrug
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

 iQEcBAEBAgAGBQJSoZKpAAoJENvXNx4PUvmCyp8IAM2uzkocZLD0MVVw/DSI4w7f
 ZPFqVBppkzvc5Ef4vuA0Om4ETWqsgYaAs9Tnz3Q3mDGnkZ01yl4/PDGNav/sRGGY
 pJs+HElogJCulNrHibh0Ai8X9w29yWZQZnXmPr5lAdmSjTDziUSdUakXte2KkD7O
 v+82YoTDAbycUcqK7CUAFNmyNqn5UsXf1h2wYfe6xYaQUPTXnEWsLJAuE3otVE1P
 fbmTAbOy+mq+4+2krwp+kCyGU4hoynpJBH1DBUvQgtJeEGYNL2AxYCnm4BU2axwK
 qSykHLineyacD4x4RWzEu8uya/P/Q7OSAWQmdsnOT7xqrJo9wxphfrBVefLJb1A=
 =BbQi
 -END PGP SIGNATURE-




Re: [O] Keyboard shortcut - is there a principle behind them?

2013-12-06 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



On 12/06/13, 10:49 , Oleh wrote:
 Initially the shortcuts were mnemonic, e.g. C-e:
 `move-end-of-line'. Obviously the keys ran out pretty quick.

I can really imagine. But this explains some - but following your
example: C-a moves to the beginning of the line - the only a there
is in Anfang, which is German for beginning. So only partial luck
here.

 Now only few shortcuts are reserved for user space and plugins, the
 most notable of which is the `C-c` prefix. That's why most custom
 modes such as org-mode and ESS bind to shortcuts with `C-c` prefix:
 there's a convention that Emacs core will not use `C-c`.

Ah - very good to know.

 
 A nice way of remembering shortcuts only when you need them is to 
 call commands by name with `M-x`. After a while, when you note that
 you're using one particular command a lot, you'll want to learn the
 shortcut for it.

That's how I do it - but it involves learning sequences which do not
make any sense to me - and I am sure there is some sense in the
sequence, at least within each mode.

 
 There's one package that might be of good use to you: `smex'. It
 uses ido completion for `M-x`. You can install it from
 MELPA/Marmelade. It binds automatically to `M-x` when you install,
 although I recommend: (global-set-key \C-t 'smex)

Yes - smex and ido are *very* useful - I do not know how one can use
emacs without them.

 
 As an example, say you want to tangle. Here's what you do: C-t
 tang Now you see a bunch of rectangle commands mixed into the
 bunch. You can filter them out by noting that tangle commands have
 `org` in their name. C-SPC org C-SPC Now there's only 7 candidates
 left and you can select the one you want with C-m either by cycling
 with C-s or continuing to type part of name.
 
 `smex` logs the commands you use most. For them it usually takes
 less than 2-3 characters from the name to be recognized. E.g. if
 you use `org-babel-tangle` a lot, you can usually call it with C-t
 bab C-m.

Very true and very useful.

 
 Finally note that no shortcuts are set in stone. You can customize 
 all of them if you want to do so. For instance, and probably a lot
 of people will disagree, it doesn't make sense for me to have
 `previous-line' on C-p. So I swap C-p and C-h: (keyboard-translate
 ?\C-h ?\C-p) (keyboard-translate ?\C-p ?\C-h)

Absolutely true - but I usually try to keep the customization to a
minimum and to use the defaults.

Thanks,

Rainer

 
 Oleh
 
 
 On Fri, Dec 6, 2013 at 10:02 AM, Rainer M Krug rai...@krugs.de
 wrote: Hi
 
 one alternative subject could be because it is Friday...
 
 I am using org-mode and ess regularly, and I use quite a few
 keyboard shortcuts, but each time I read about a new one, I am
 wondering: why the heck these specific (default!) keyboard
 shortcuts?
 
 I am not asking why keyboard sequence, but e.g. why export in org
 is C-c e and why tangle is C-c C-v t, and so on.
 
 In other words: I am trying to *understand* why C-c and not C-o, 
 because I have tremendous problems to remember the shortcuts - if
 I would know that there is s tree structure, where each following
 key narrows it down to further *thematically linked* commands, it
 would make it easier to learn these.
 
 Any insight into this? Or is there a emacs function which returns
 a random keyboard shortcut for a given function (some emacs
 shortcuts really seem to be that way...).
 
 Thanks,
 
 Rainer
 
 
 

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSoaB0AAoJENvXNx4PUvmColIIAIy4AQTri6yZ6wVh8hp3/5gV
RnY8oAXfHTBGW136AwXe2H9fMwfuyc+UA6rqcGzKMx0L1SCdNBXpK3Tfn2gFjRph
iP/0TEqZgTXIwJurmn33yG6h9a0ABmEXVky+jOkHouldhjt7uuUyvT0LqmYw9pPs
NFQAU1zmVFgh/nEiJvP2VKilXPh+NXo6ulPjhtAIDb/KjGLTy0SkPJYAF6Do4WYY
wgbh+GCDzEWKgM+zQfzTq1CydX9FUdWw/zdbULhfu+f+J3/dZWtAlMfSsPi8N38g
tAVJA/ycKqIMX3/GPlN7FlscPIdYnHxvJRo45MP/3mxkiI5B5vTn9sG90/J1dwU=
=p6dh
-END PGP SIGNATURE-



[O] [babel] Can't write accented characters in R graphics

2013-12-06 Thread Sebastien Vauban
John Hendy wrote:
 Can you do it straight from R? Might be a better place to start? If not,
 I'd look into that first to avoid googling org and ESS stuff in vain!

The 1'42 demo on http://screencast.com/t/A9q6CQlLY6 clearly shows that:

- It (now [1]) works from the R terminal

- It works from the Org edit buffer (via C-c '), when sending the commands to
  the iESS process

- It does not work from the Org file itself...

Environment:
- Microsoft Windows 8
- GNU Emacs 24.3.50.1 (i686-pc-mingw32) of 2013-10-19 on LEG570
- Org-mode version 8.2.3c (release_8.2.3c-333-g487c74)
- R 3.0.2

Best regards,
  Seb

[1] I've added the following code in my .emacs to make it work:

#+begin_src emacs-lisp
(setq process-coding-system-alist
  '((R.* . iso-latin-1)))
#+end_src

-- 
Sebastien Vauban




Re: [O] [babel] how to pass data to gnuplot from another block

2013-12-06 Thread Eric S Fraga
Eric Schulte schulte.e...@gmail.com writes:

[...]

 Sounds like someone with an interest in octave support should take a
 look at ob-octave.el, this shouldn't be a difficult fix and there are
 many examples of other languages (e.g., sh) handling the combination of
 output and vectors.

Okay.  I'll add it to my todo list... but with low priority given that
using a value output works just fine.

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.2.3c-333-g487c74




[O] org-caldav: Syncing Error: Could not find UID...

2013-12-06 Thread Daniel Thom
Hi,

because of this error i switched from owncloud to baikal. But the error
stays the same

Every sync aborts with the message:
Could not find UID TS10-aa7e8257-c44f-47ef-b8ac-eb72130b8156.

The Message Buffer says:
Duplicate ID 29b80a9d-597d-459e-bea5-f5f671b59ea5, also in file
.
.

WARNING: 28 duplicate IDs found, check Messages buffer
progn: Could not find UID TS10-aa7e8257-c44f-47ef-b8ac-eb72130b8156.

I have also run C-u M-x org-caldav-delete-everything but it changed
nothing. :-(

How can i solve this error?

Emacs Version: GNU Emacs 24.3.50.1
orgmode Version: Org-mode version 8.2.1
org-caldav: fresh install (git clone)

-- 
Gruß
Daniel

Email: d...@netbunker.de
Blog: http:\\netbunker.de




Re: [O] Keyboard shortcut - is there a principle behind them?

2013-12-06 Thread Jonathan Leech-Pepin
Hello,

On 6 December 2013 05:01, Rainer M Krug rai...@krugs.de wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1



 On 12/06/13, 10:49 , Oleh wrote:
 Initially the shortcuts were mnemonic, e.g. C-e:
 `move-end-of-line'. Obviously the keys ran out pretty quick.

 I can really imagine. But this explains some - but following your
 example: C-a moves to the beginning of the line - the only a there
 is in Anfang, which is German for beginning. So only partial luck
 here.

I can't speak for the original developers however my take on this one
is as follows:

C-b (for beginning) is used for back
C-s (for start) is used for search, C-f (find) was forward.
C-a becomes beginning-of-line by virtue of being the beginning of the alphabet.

Regards,
Jonathan

 Now only few shortcuts are reserved for user space and plugins, the
 most notable of which is the `C-c` prefix. That's why most custom
 modes such as org-mode and ESS bind to shortcuts with `C-c` prefix:
 there's a convention that Emacs core will not use `C-c`.

 Ah - very good to know.


 A nice way of remembering shortcuts only when you need them is to
 call commands by name with `M-x`. After a while, when you note that
 you're using one particular command a lot, you'll want to learn the
 shortcut for it.

 That's how I do it - but it involves learning sequences which do not
 make any sense to me - and I am sure there is some sense in the
 sequence, at least within each mode.


 There's one package that might be of good use to you: `smex'. It
 uses ido completion for `M-x`. You can install it from
 MELPA/Marmelade. It binds automatically to `M-x` when you install,
 although I recommend: (global-set-key \C-t 'smex)

 Yes - smex and ido are *very* useful - I do not know how one can use
 emacs without them.


 As an example, say you want to tangle. Here's what you do: C-t
 tang Now you see a bunch of rectangle commands mixed into the
 bunch. You can filter them out by noting that tangle commands have
 `org` in their name. C-SPC org C-SPC Now there's only 7 candidates
 left and you can select the one you want with C-m either by cycling
 with C-s or continuing to type part of name.

 `smex` logs the commands you use most. For them it usually takes
 less than 2-3 characters from the name to be recognized. E.g. if
 you use `org-babel-tangle` a lot, you can usually call it with C-t
 bab C-m.

 Very true and very useful.


 Finally note that no shortcuts are set in stone. You can customize
 all of them if you want to do so. For instance, and probably a lot
 of people will disagree, it doesn't make sense for me to have
 `previous-line' on C-p. So I swap C-p and C-h: (keyboard-translate
 ?\C-h ?\C-p) (keyboard-translate ?\C-p ?\C-h)

 Absolutely true - but I usually try to keep the customization to a
 minimum and to use the defaults.

 Thanks,

 Rainer


 Oleh


 On Fri, Dec 6, 2013 at 10:02 AM, Rainer M Krug rai...@krugs.de
 wrote: Hi

 one alternative subject could be because it is Friday...

 I am using org-mode and ess regularly, and I use quite a few
 keyboard shortcuts, but each time I read about a new one, I am
 wondering: why the heck these specific (default!) keyboard
 shortcuts?

 I am not asking why keyboard sequence, but e.g. why export in org
 is C-c e and why tangle is C-c C-v t, and so on.

 In other words: I am trying to *understand* why C-c and not C-o,
 because I have tremendous problems to remember the shortcuts - if
 I would know that there is s tree structure, where each following
 key narrows it down to further *thematically linked* commands, it
 would make it easier to learn these.

 Any insight into this? Or is there a emacs function which returns
 a random keyboard shortcut for a given function (some emacs
 shortcuts really seem to be that way...).

 Thanks,

 Rainer




 - --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
 Biology, UCT), Dipl. Phys. (Germany)

 Centre of Excellence for Invasion Biology
 Stellenbosch University
 South Africa

 Tel :   +33 - (0)9 53 10 27 44
 Cell:   +33 - (0)6 85 62 59 98
 Fax :   +33 - (0)9 58 10 27 44

 Fax (D):+49 - (0)3 21 21 25 22 44

 email:  rai...@krugs.de

 Skype:  RMkrug
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

 iQEcBAEBAgAGBQJSoaB0AAoJENvXNx4PUvmColIIAIy4AQTri6yZ6wVh8hp3/5gV
 RnY8oAXfHTBGW136AwXe2H9fMwfuyc+UA6rqcGzKMx0L1SCdNBXpK3Tfn2gFjRph
 iP/0TEqZgTXIwJurmn33yG6h9a0ABmEXVky+jOkHouldhjt7uuUyvT0LqmYw9pPs
 NFQAU1zmVFgh/nEiJvP2VKilXPh+NXo6ulPjhtAIDb/KjGLTy0SkPJYAF6Do4WYY
 wgbh+GCDzEWKgM+zQfzTq1CydX9FUdWw/zdbULhfu+f+J3/dZWtAlMfSsPi8N38g
 tAVJA/ycKqIMX3/GPlN7FlscPIdYnHxvJRo45MP/3mxkiI5B5vTn9sG90/J1dwU=
 =p6dh
 -END PGP SIGNATURE-




Re: [O] Org mode and shunt exporters?

2013-12-06 Thread John Kitchin
that sounds like an interesting approach. xml seems like what you really
want, since looking at the parsetree there is a lot of information (e.g.
attributes, properties, etc...) that would be tricky to generate a fully
representative json scheme.

This page suggests at the bottom you could export to texinfo, and convert
that to docbook:
http://orgmode.org/worg/exporters/ox-overview.html


   - (1) DocBook export, available in previous Org-mode versions, has not
   currently been ported to the new exporter, however the new
ox-texinfobackend can generate DocBook format. Once
   file.texi is created via ox-texinfo, simply execute:

makeinfo --docbook file.texi




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



On Thu, Dec 5, 2013 at 3:30 PM, Brett Viren b...@bnl.gov wrote:

 Has anyone written any new-style exporter which will produce a common
 markup/data language format like JSON or YAML?  I'm looking for
 something that fully preserves the original org document structure and
 does no semantic interpretation along the way.

 What I really want is to parse arbitrary org files in Python.  I've
 looked at the entries at worg's org-tool node which do this but they
 seem out of date or make assumptions about what org elements exist or
 their URLs are not loading (NEO).  If any of that's a misrepresentation
 please correct me.

 In any case, using org's own exporter to produce JSON or YAML and then
 relying on these format's Python modules for parsing seems like the best
 way to go to let me author in org and process in Python.

 I'm not very good with elisp (which is why I want to get org data into
 Python) but I guess I can have a go at making such a shunt exporter.
 Before I try, I just wanted to check if someone had this wheel already
 spinning.

 Thanks,
 -Brett.



Re: [O] electric-pair-mode

2013-12-06 Thread Bastien
Hi Harald,

Harald Hanche-Olsen han...@math.ntnu.no writes:

 I am a new user of org-mode. But I have used electric-pair-mode for
 quite a long time, and marking some text and hitting left parenthesis
 to parenthesize the marked text has become second nature.

 However, if I try this in an org-mode buffer, it erases the marked
 text and replaces it with the backwards pair )( instead. Not useful!

 So is there a way to make org-self-insert-command compatible with
 electric-pair-mode?

it works fine for me.  What version of Org are you using?

-- 
 Bastien



Re: [O] org-babel-next-src-block respecting #+call lines

2013-12-06 Thread Bastien
Hi Andreas,

Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 how could I make org-babel-next-src-block (bound to 'C-c C-v n' by
 default) jump to the next src block or #+call line?

You can't.

 In its current form it skips over call lines.

The need seems peculiar, maybe you can write your own simple
function for this and share it?

2 cents,

-- 
 Bastien



Re: [O] Search to show only trees with no recent clock entries

2013-12-06 Thread Bastien
Hi Subhan,

Subhan Tindall subhan.tind...@rentrakmail.com writes:

 Looking for a search to show only first-level trees that meet the
 following criteria:

 all clock entries under the heading are older than a given date (IE 2
 weeks ago)
 clock entries may be under several different sub-headings, at levels
 ranging from * to 

 ONLY level-1 entries meeting this criteria should be returned.

You can't do this directly.

But you could use `org-clock-out-hook' to update a dedicated date
property of the entry, then only look for entries that are newer than
the value of the property.

Just quickly sketching this idea, sorry for not going into details.

-- 
 Bastien



Re: [O] Org-mode in windows fires Tramp without any intervention

2013-12-06 Thread Bastien
Hi Toni,

Toni Cebrián ance...@gmail.com writes:

 Do you know where to look or what to try? This same Org
 file, the same init.el and the same emacs version work without any
 problem in Linux.

This is weird: I would first try with a bare emacs -Q and only the
culprit link in Org.  Then with a more complex .emacs.el, bisecting
step by step.

-- 
 Bastien



Re: [O] Bug: The foreground color of List of stuck projects: in agenda cannot be change seperately. [8.2.3c (8.2.3c-dist @ /home/kuanyui/.emacs.d/lisps/org-8.2.3c/lisp/)]

2013-12-06 Thread Bastien
Hi Kuanyui,

kuanyui azazabc...@gmail.com writes:

 The foreground color of List of stuck projects: in agenda cannot be
 change separately.

 One screenshot to explain:
 https://dl.dropboxusercontent.com/u/1776218/org-agenda-column-dateline.png

M-x customize-face RET org-agenda-structure RET works fine here.

-- 
 Bastien



Re: [O] How can I convert a org file to a flowchart

2013-12-06 Thread Bastien
Hi Feng,

Feng Shu tuma...@gmail.com writes:

 I have to draw a flowchart with many many nodes (about 500) and less
 construct types(only sequence construct and condition construct),

 Now I use org file record all the node labels, How can I convert this
 org to a flowchar if i use tag and link to record all the construct?

AFAIK you can't.

-- 
 Bastien



Re: [O] How can I convert a org file to a flowchart

2013-12-06 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



On Fri Dec  6 15:07:56 2013, Bastien wrote:
 Hi Feng,

 Feng Shu tuma...@gmail.com writes:

 I have to draw a flowchart with many many nodes (about 500) and less
 construct types(only sequence construct and condition construct),

 Now I use org file record all the node labels, How can I convert this
 org to a flowchar if i use tag and link to record all the construct?

 AFAIK you can't.

True - but a custom exporter to do this (export to plantuml format?)
would rally be great

Cheers,

Rainer



- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSodtTAAoJENvXNx4PUvmCVg8H/jWP2fFy8h8EpId7f3+JzQ5g
vE3oLaOfJIwMaJsnn3+5ZdhbnYXHDgdCmEra1397NITMg3+kwaUYLtr8tJQDZ11C
v4lGMpZVEyPZSM83+CpQViidrFeQoZ1IG3UdadgyIQwD4sZGcTRX35oeffVzPkD2
A6+c4s3/oFs65/PbSy7rsPNbc20hrYoYt+NgmnglVEG+AiU/v0/1NCYQ+iPXRoaW
aFpM+GcYoLEDMCtbvjWiXVCkMuxkEsLg6vX7BDglN1u1pnW+o7JbKW6pi0q9Un6V
KvTshQMBFk+yFhRdZLX0jgAcN2f1zaxFKfMgz4qAdZwvfhxv3v8jA1Tl4SNJP2M=
=bqrB
-END PGP SIGNATURE-




Re: [O] Bug: Symbol's function definition is void: vc-git-root

2013-12-06 Thread Bastien
Hi Jonathan,

Jonathan Leech-Pepin jonathan.leechpe...@gmail.com writes:

 Using 8.2.2 I get the following error when using any org-attach-* commands:

 (From *Messages* buffer)

 Select command: [acmlzoOfFdD]
 org-attach-commit: Symbol's function definition is void: vc-git-root

 I don't have git installed on this Windows machine, so vc-git is
 never loaded.

This should be fixed, thanks.

-- 
 Bastien



Re: [O] hide leading starts in a specific sub-tree in an org file

2013-12-06 Thread Bastien
Hi Xebar,

Xebar Saram zelt...@gmail.com writes:

 i know there is an option to hiding leading stars in outline
 headings, and for indenting outlines. i was wondering if there is an
 option to do so for a specific header and sub headers (like can be
 done for some properties etc..

Nope, sorry!

-- 
 Bastien



Re: [O] Handshake: Org-mode + Emacs releases

2013-12-06 Thread Bastien
Nicolas Goaziou n.goaz...@gmail.com writes:

 FWIW, considering the 15 days time frame we have, I think 8.2.3 family
 is stable enough (modulo some features that might be cherry picked from
 master) and would be the obvious safe choice for a quiet end of
 year.

I just released 8.2.4 and merged it with Emacs.

We may have time for another merge for 8.2.5.

 8.3 release (i.e. built from master) has some interesting features, but
 may require more work from Org developers during pretest phase.

Indeed -- let's not rush and let's polish 8.3 outside Emacs for now.

-- 
 Bastien



Re: [O] multiple agenda custom commands causes tag-filter-preset not to work?

2013-12-06 Thread Bastien
Hi Miro,

Miro Bezjak bezjak.m...@gmail.com writes:

 It appears that `org-agenda-tag-filter-preset' does not work when I
 define
 multiple commands under one. The agenda is rendered as if filter was
 never set.

 On the other hand, if I remove `(alltodo)', thus defining only the
 agenda, then
 the filter works without problems.

Yes, that's by design -- or more precisely, by lack of a good way to
filter agenda blocks.

HTH,

-- 
 Bastien



Re: [O] org-indent-mode corrupted most of a big org file

2013-12-06 Thread Johann Spies
Hello Alexander,

Thanks for your attention.  The message I sent earlier was of my experience
on my work computer.

I have now tried the same on my home computer.  The files on both edited
was in /home/js/Dropbox/orgmode.

I have also edited ~/.emacs and saved it.

that is strange.  I cannot remember doing something else besides putting
 the mentioned code into my init file.  I can only think of these
 trivial reason why this does not work for you:

 - Did you evaluate the code or restarted your emacs?


I have killed and restarted emacs.  How do I evaluate (reload) .emacs when
emacs is running?


 - Are the files you are editing somewhere under /home/js/?
 - Did you really edit and save a file since adding the code to your init
   file?
 - In case you are editing files under version control: Did you turn on
   vc-make-backup-files?

 HTH,
 --
  Alexander Baier

 On 13-12-03 09:33 Johann Spies wrote:
  Thanks for sharing this. However, after adding this to my ~/.emacs I do
 not
  see anything appearing in my .emacs.d/backup directory.
 
  #+begin_src emacs-lisp
(setq make-backup-files t)
(setq backup-directory-alist '((/home/js/* .
 /home/js/.emacs.d/backup)))
(setq backup-by-copying t  ; don't use symlinks
  delete-old-versions t; don't ask me about deleting backups
  kept-new-versions 20
  kept-old-versions 5
  version-control t)   ; use versioned backups
  #+end_src
 
 
 
  Regards
  Johann
 
 
  On 2 December 2013 17:37, Alexander Baier lexi.ba...@gmail.com wrote:
 
  On 13-12-02 12:21 Rainer Stengele wrote:
   All,
  
   last week I played around with org-indent-mode in my biggest (37.000
  lines) org file.
   3 days later I detected that most of the file was corrupted.
   WHy so late? Using the agenda I only saw the todos and did not
 recognise
  the corrupted structures.
   Most * items had been placed at the beginning of the line and
  therefore now became headlines.
   I do not know how this happened. I am not sure if I myself was the
  reason somehow.
   Anyway I had to spend a fair amount of work to get the old file format
  from
   subversion and insert the changes since the corruption.
  
   This is just a warning to have backups at hand before changing to
  org-indent mode.
   Then immediately and check often the contents of the file until you
 are
  sure all is running well.
  
   Maybe someone has an idea.
  
   I will try to convert again later but then be much more careful.
  
   Rainer
  
  
 
  FWIW, I have the following snippet in my init file, that uses emacs'
  build-in backup machanism to save me from such things.  As emacs stuffs
  them all in one central location, I do not have to worry about polluting
  my filesystem.
 
  #+begin_src emacs-lisp
(setq make-backup-files t)
(setq backup-directory-alist '((/home/delexi/* .
  /home/delexi/.emacs.d/backup)))
(setq backup-by-copying t  ; don't use symlinks
  delete-old-versions t; don't ask me about deleting backups
  kept-new-versions 20
  kept-old-versions 5
  version-control t)   ; use versioned backups
  #+end_src
 
  If you want to make backups from files under version control, you also
  have to set the following:
 
  #+begin_src emacs-lisp
(setq vc-make-backup-files t)
  #+end_src
 
  This already saved me a couple of times.
 
  Regards,
  --
   Alexander Baier
 
 




-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)


Re: [O] [ESS] Keyboard shortcut - is there a principle behind them?

2013-12-06 Thread Tyler Smith
Rainer M Krug rai...@krugs.de wrote:
On 12/06/13, 10:49 , Oleh wrote:

 Now only few shortcuts are reserved for user space and plugins, the
 most notable of which is the `C-c` prefix. That's why most custom
 modes such as org-mode and ESS bind to shortcuts with `C-c` prefix:
 there's a convention that Emacs core will not use `C-c`.

To be clear, C-c followed by another modified key (C-x, for example) is 
reserved for major modes. C-c followed by a regular letter (e.g. C-c x) is 
reserved for use by the user, and should not be used by major modes.

Tyler






Re: [O] probable caching bug?

2013-12-06 Thread Nicolas Goaziou
Hello,

Eric Abrahamsen e...@ericabrahamsen.net writes:

 Yes, it's up to date -- after I sent this message I started wondering
 if it had been a while since I updated, so I pulled and reloaded, and
 not long after that saw the bug again.

Well, too bad.

 I expect to see this again, so I can run the function above, but will
 reporting the results be of any use to you? If I know which element is
 corrupted, what should I be reporting back?

The corrupted element is only interesting when there's a pattern (e.g.
only lists and items are corrupted). Another important information is
the action triggering the corruption. The function helps to find it out.


Regards,

-- 
Nicolas Goaziou



Re: [O] bug with :wrap when exporting

2013-12-06 Thread Alan Schmitt
n.goaz...@gmail.com writes:

 Hello,

 Alan Schmitt alan.schm...@polytechnique.org writes:

 I think I have found a bug with :wrap when exporting a block. Consider
 the following org file:

 #+name: mywrap
 #+BEGIN_SRC sh :exports none :results raw
 echo (+ 1 2)
 #+END_SRC

 Exporting with the result absent:

 #+name: testmywrap
 #+call: mywrap() :wrap src emacs-lisp

 #+results: testmywrap

 Exporting with the result present:

 #+name: testmywrap2
 #+call: mywrap() :wrap src emacs-lisp

 #+results: testmywrap2
 #+BEGIN_src emacs-lisp
 (+ 1 2)
 #+END_src

 If you export it, you'll see that the results for the second call are
 duplicated. Note that this only happens during export: evaluating the
 second call to mywrap does not duplicate the results below.

 The following patch (from maint) fixed the problem shown in the ECM.
 Does it still work in the general case?

Yes, it works great on the following example (which includes direct
printing, in the sense of echoing the #+BEGIN_SRC lines) as well as in
the :wrap case.

--8---cut here---start-8---
#+name: fetchcoq
#+BEGIN_SRC sh :exports none :results raw :var f=foo.v
echo #+BEGIN_SRC coq
head $f
echo
echo #+END_SRC
#+END_SRC

Test using direct printing

#+name: test1
#+call: fetchcoq(f=demo.v) :results raw

#+results: test1
#+BEGIN_SRC coq
Definition toto : forall x, exists y, x = y.

Lemma foo: forall x, x=x.
#+END_SRC

#+name: fetchcoq2
#+BEGIN_SRC sh :exports none :results raw :var f=foo.v
head $f
echo
#+END_SRC

Test using wrap

#+name: test2
#+call: fetchcoq2(f=demo.v) :wrap src coq

#+results: test2
#+BEGIN_src coq test
Definition toto : forall x, exists y, x = y.

Lemma foo: forall x, x=x.
#+END_src
--8---cut here---end---8---

Thanks,

Alan



Re: [O] bug with :wrap when exporting

2013-12-06 Thread Alan Schmitt
strom...@nexgo.de writes:

 Alan Schmitt writes:
 I tried to do this, and do a make clean to make sure old elc files
 would not be picked up, but then export fails with

 You would want to do make uncompiled and also (require 'org-loaddefs).

Thanks a lot, with this I was able to test the patch.

Alan



Re: [O] bug with :wrap when exporting

2013-12-06 Thread Nicolas Goaziou
Hello,

Alan Schmitt alan.schm...@polytechnique.org writes:

 Yes, it works great on the following example (which includes direct
 printing, in the sense of echoing the #+BEGIN_SRC lines) as well as in
 the :wrap case.

Applied, then. Thank you for your feedback.


Regards,

-- 
Nicolas Goaziou



[O] A small hack to document programs externally

2013-12-06 Thread Alan Schmitt
Hello,

I've just written a small hack to refer to code in other files from an
org-mode buffer, so that the referred code would be copied in the buffer
to be exported when exporting the org buffer. (Our use case is a large
Coq development which we want to document online. Our may constraint is
that we need the documentation to live in files outside the code, yet
still refer to the actual code.)

Here is a small test case showing the approach

--8---cut here---start-8---
#+OPTIONS: d:RESULTS

* utilities:noexport:
#+name: fetch
#+BEGIN_SRC emacs-lisp :results raw :var f=foo.v :var s=Definition :var n=0
  (defun fetchlines (file-path search-string nb-lines)
Searches for the SEARCH-STRING in FILE-PATH and returns the
  matching line and the following NB-LINES.
(let ((myBuffer (get-buffer-create fetchTemp)) result)
  (set-buffer myBuffer)
  (insert-file-contents file-path nil nil nil t)
  (goto-char 1)
  
  (setq result
(if (search-forward search-string nil t)
(let ((pos-beg (line-beginning-position))
  (pos-end
   (if ( nb-lines 0) 
   (line-end-position nb-lines) 
 (re-search-forward \\.$ nil t))
   ))
  (buffer-substring pos-beg pos-end))
  ))
  
  (kill-buffer myBuffer)
  result))
  
  (fetchlines f s n)
#+END_SRC

#+name: wrap-coq
#+BEGIN_SRC emacs-lisp :var text= :results raw
(concat #+BEGIN_SRC coq\n text \n#+END_SRC)
#+END_SRC

* example
:PROPERTIES:
:results: drawer
:post: wrap-coq(text=*this*)
:END:

#+call: fetch(f=/Users/schmitta/work/hocorecoq/coq/HOC01defs.v, s=Inductive 
process)

#+RESULTS:
:RESULTS:
#+BEGIN_SRC coq
Inductive process : Set :=
| Send : chan - process - process
| Receive : chan - lvar - process - process
| Lvar : lvar - process
| Gvar : var - process
| Par : process - process - process
| Nil : process.
#+END_SRC
:END:
--8---cut here---end---8---

The ~fetch~ function takes as arguments the file where to search, the
string to be searched, and the number of lines to print. If this last
argument is omitted (or equal to 0), then everything until a final dot
('.' followed by a newline) is printed (this corresponds to the end of a
definition or statement in Coq).

Thanks to everyone who answered my recent questions on the list. And if
you have suggestions to improve this (including ways it may already be
doable natively), please don't hesitate to send them.

Best,

Alan



Re: [O] electric-pair-mode

2013-12-06 Thread Harald Hanche-Olsen
[Bastien b...@gnu.org (2013-12-06 13:50:58 UTC)]

  So is there a way to make org-self-insert-command compatible with
  electric-pair-mode?
 
 it works fine for me.

I have been told (off list) that delete-selection-mode could be the
culprit. And indeed, turning it off fixes the problem. But I don't
want to du that, as I have gotten quite fond of it. But it could
explain why it works for you. The same person told me that autopair
might be a good alternativ to electric-pair-mode. So I will give that
a shot.

 What version of Org are you using?

It's version 7.9.3f, bundled with the GNU emacs development sources
(as of a month or so ago). That appears to be quite old? I would like
a newer one anyhow, if only for the improved orgstruct-mode.

– Harald



[O] bash alias and history in code block

2013-12-06 Thread OSiUX
How to use alias and bash builtin functions?

 #+BEGIN_SRC sh :session :results output
   echo $SHELL
   echo $HOME
   source ~/.bashrc
   alias | wc
   env | grep HISTTIMEFORMAT
   history | wc
 #+END_SRC

 #+RESULTS:
 : /bin/bash
 : /home/osiris
 :   0   0   0
 : HISTTIMEFORMAT=%Y-%m-%d %H:%M
 :   0   0   0

Thanks!

--

::

  Osiris Alejandro Gomez (OSiUX) os...@osiux.com.ar
  DC44 95D2 0D5D D544 FC1A F00F B308 A671 9237 D36C
  http://www.osiux.com.ar http://www.altermundi.net


signature.asc
Description: Digital signature


Re: [O] [Babel] [Bug] Cache

2013-12-06 Thread Eric Schulte
Sebastien Vauban sva-n...@mygooglest.com writes:

 Hi Eric,

 Eric Schulte wrote:
 Sebastien Vauban sva-n...@mygooglest.com writes:

 IIRC, some time ago, a bug involving the computation of the hash (when
 option cache is enabled) and NoWeb code blocks. I remember that it had been
 fixed.

 However, the following example shows it's not (true anymore):

 --8---cut here---start-8---
 #+PROPERTY: cache yes

 #+name: common-code
 #+begin_src R :eval no
 s - Hello
 #+end_src

 #+begin_src R :noweb yes
 common-code

 print(s)
 #+end_src

 #+results[f472c44e64e310a6d06544dbdfba558a709873a7]:
 : Hello
 --8---cut here---end---8---

 Change the common code block: edit Hello, for example, and you'll see
 that the evaluation of the other code block is not redone (like if the NoWeb
 code was not expanded for computing the hash). It stays printing Hello.

 Could you git bisect this breakage to isolate the offending commit?

 I couldn't find any version where my ECM would work. Though, I was sure to 
 have
 read comments about that problem -- I never used that situation myself in the
 past, so I just assumed it had been fixed in the meanwhile. It seems not.

 And here the post of Achim where he explains that problem:

   ╭
   │ From: Achim Gratz strom...@nexgo.de
   │ Subject: Re: [PATCH] * lisp/ob-core.el (org-babel-execute-src-block):
   │   insert hash for silent results
   │ Date: Sun, 10 Mar 2013 09:52:10 +0100 (38 weeks, 1 day, 6 hours ago)
   │
   │ [...]
   │
   │ But back to my earlier remark about the hash value actually being a
   │ signature of the source block and not the result.  If I use noweb
   │ references, the reference text is cached, not its expansion.
   ╰


In that thread we agreed that the expansion of no-web references
*should* be included in code blocks for hashing, but no-one has had the
time to implement this.

I believe this is still the case.

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



Re: [O] words starting with call_ confuse C-c C-c and export

2013-12-06 Thread Eric Schulte

 We may tweak `org-babel-inline-lob-one-liner-regexp' in order to make it
 harder to trigger it unwillingly. 


The trade-off here is between raising an error when e.g., a like
matching the call line syntax has a problem or failing silently.  The
former is preferable in the case where you intend the syntax to be a
call and you *do* want to know if there is a problem, and the latter is
preferable if you aren't trying to issue a call and just stumbled upon
the syntax.

I'm open to either solution, it's just a question of which use case is
more important and which failure condition is more onerous.

Best,

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



Re: [O] bash alias and history in code block

2013-12-06 Thread Eric Schulte
OSiUX xu...@osiux.com.ar writes:

 How to use alias and bash builtin functions?

  #+BEGIN_SRC sh :session :results output
echo $SHELL
echo $HOME
source ~/.bashrc
alias | wc
env | grep HISTTIMEFORMAT
history | wc
  #+END_SRC

  #+RESULTS:
  : /bin/bash
  : /home/osiris
  :   0   0   0
  : HISTTIMEFORMAT=%Y-%m-%d %H:%M
  :   0   0   0

 Thanks!


I get the following.  Note that I define my alia in a separate file
which I had to load explicitly for the alia to be defined (it should be
sourced from my ~/.bashrc, but shells can be weird about loading things
they think might be profile related when you're not logging in).

#+BEGIN_SRC sh :session :results output
  echo $SHELL
  echo $HOME
  source ~/.bashrc
  alias | wc
  env | wc
  history | wc
#+END_SRC

#+RESULTS:
: /bin/zsh
: /home/eschulte
:   0   0   0
:  28  28 715
:   0   0   0

#+BEGIN_SRC sh :session :results output
  echo $SHELL
  echo $HOME
  source ~/.alia
  source ~/.bashrc
  alias | wc
  env | wc
  history | wc
#+END_SRC

#+RESULTS:
: /bin/zsh
: /home/eschulte
:  19  99 814
:  28  28 715
:   0   0   0

My guess with the empty history is that bash can tell it isn't an
interactive session, which you might be able to fake with tty pipe STDIN
and STDOUT nonsense in ob-sh.  But in general I don't see the utility of
history in a code block.

Best,

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



Re: [O] [Bug] commit 39070b7fc7 breaks babel test

2013-12-06 Thread Eric Schulte
Skip Collins skip.coll...@gmail.com writes:

 It's been a week and this test still fails.


Fixed.


 Would it make sense to automatically enforce passing all tests before
 git accepts a change?


I for one would strongly oppose this change.  This would only make it
take longer and thus make it less likely that new code is committed.
This is the master branch where development should be fast and
experimentation should take place, not the maintenance branch.

Best,


 On Wed, Nov 27, 2013 at 2:58 AM, Achim Gratz strom...@nexgo.de wrote:

 Hi Eric,

 this change seems to introduce additional line breaks in the following
 test:

 --8---cut here---start-8---
 Test test-ob/catches-all-references condition:
 (ert-test-failed
  ((should
(string=
 (org-babel-execute-src-block)
 A literal example\non two lines for me.))
   :form
   (string= A literal example\non two lines\n for me. A literal 
 example\non two lines for me.)
   :value nil))
FAILED  1/1  test-ob/catches-all-references
 --8---cut here---end---8---

 This seems to happen because the final \n from the babel result is not
 stripped anymore, pointing to the change in ob-core.  IIRC we
 flip-flopped a few times already with including or not including this
 final newline, so I don't know whether the code or the test should
 change.


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



[O] Exams with Org?

2013-12-06 Thread Roger Mason

Hello,

Has anyone used Org to create exams?  It would be useful to have the 
value per question totalled to provide the total per section etc and to 
be able to embed the answers in the exam and expose them in the final 
document using some kind of conditional processing.


If anyone has done this kind of thing I'd be interested to see an 
example file.


Thanks,
Roger





Re: [O] bash alias and history in code block

2013-12-06 Thread Sebastien Vauban
OSiUX wrote:
 How to use alias and bash builtin functions?

  #+BEGIN_SRC sh :session :results output
echo $SHELL
echo $HOME
source ~/.bashrc
alias | wc
env | grep HISTTIMEFORMAT
history | wc
  #+END_SRC

  #+RESULTS:
  : /bin/bash
  : /home/osiris
  :   0   0   0
  : HISTTIMEFORMAT=%Y-%m-%d %H:%M
  :   0   0   0

Just throwing an idea (as I don't know enough about that): play with the
variable `org-babel-sh-command' (default: bash) and add options such as
--login or --interactive (or stuff like that)?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] words starting with call_ confuse C-c C-c and export

2013-12-06 Thread Nicolas Goaziou
Hello,

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

 We may tweak `org-babel-inline-lob-one-liner-regexp' in order to make it
 harder to trigger it unwillingly. 


 The trade-off here is between raising an error when e.g., a like
 matching the call line syntax has a problem or failing silently.  The
 former is preferable in the case where you intend the syntax to be a
 call and you *do* want to know if there is a problem, and the latter is
 preferable if you aren't trying to issue a call and just stumbled upon
 the syntax.

 I'm open to either solution, it's just a question of which use case is
 more important and which failure condition is more onerous.

Just to be clear, I thought about making parens mandatory in inline
Babel call syntax. Underscore is overloaded already: underline,
subscript...

Note that OP's problem can be solved once we have escaped underscores
(again). But I'm not there yet.


Regards,

-- 
Nicolas Goaziou



Re: [O] [Bug] commit 39070b7fc7 breaks babel test

2013-12-06 Thread Achim Gratz
Eric Schulte writes:
 Fixed.

The test was trying to ascertain that an inline babel codeblock didn't
force a newline at the end.  You've just made it test that there is a
trailing newline introduced by the inline babel call, which is clearly
against its intent.  You could have marked it as a known fail if you
were planning to have this as a transitory failure only.  I can't find
the discussion that led to the former implementation at the moment, but
I'm fairly certain that there was a bug report against trailing newlines
from inline babel calls.  So what is the rationale of re-introducing the
trailing newline this time around?


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

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




Re: [O] [Babel] [Bug] Cache

2013-12-06 Thread Achim Gratz
Eric Schulte writes:
 In that thread we agreed that the expansion of no-web references
 *should* be included in code blocks for hashing, but no-one has had the
 time to implement this.

I think we may have discussed this before, but if you make the hashes
dependent on the possibly recursive noweb expansions this would require
that all expansions be re-computed all the time or you would need to
discern which of the expansions are pure (i.e. depend only on their
arguments, functional-style), which have session semantics and which of
the ones that have session semantics should possibly not be
re-evaluated.  I'm not sure that opening this can of worms is worth the
trouble.


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] [Babel] [Bug] Cache

2013-12-06 Thread Sebastien Vauban
Achim Gratz wrote:
 Eric Schulte writes:
 In that thread we agreed that the expansion of no-web references
 *should* be included in code blocks for hashing, but no-one has had the
 time to implement this.

 I think we may have discussed this before, but if you make the hashes
 dependent on the possibly recursive noweb expansions this would require
 that all expansions be re-computed all the time

I did not think at recursive Noweb expansions. But, yes, that problem could
come up as well.

 or you would need to discern which of the expansions are pure (i.e. depend
 only on their arguments, functional-style), which have session semantics and
 which of the ones that have session semantics should possibly not be
 re-evaluated. I'm not sure that opening this can of worms is worth the
 trouble.

Maybe a solution to avoid recomputing too much things (in number, and in taken
time to do that) would be to only compute the hash for static expansions --
the ones without parameters, where it's simply a copy/paste of text in multiple
spots.

If even that is not done/doable, then some error should be triggered when one
uses both the cache and the noweb header arguments. Because, in the current
situation, we think that the graphs (or, in a general way, the results) are
up-to-date while it's wrong -- you've changed some piece of code somewhere, and
the cached results are still used.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] bash alias and history in code block

2013-12-06 Thread OSiUX
El vie, 06 dic 2013, Sebastien Vauban decía:

 OSiUX wrote:
  How to use alias and bash builtin functions?
 
   #+BEGIN_SRC sh :session :results output
 echo $SHELL
 echo $HOME
 source ~/.bashrc
 alias | wc
 env | grep HISTTIMEFORMAT
 history | wc
   #+END_SRC
 
   #+RESULTS:
   : /bin/bash
   : /home/osiris
   :   0   0   0
   : HISTTIMEFORMAT=%Y-%m-%d %H:%M
   :   0   0   0

 Just throwing an idea (as I don't know enough about that): play with the
 variable `org-babel-sh-command' (default: bash) and add options such as
 --login or --interactive (or stuff like that)?

Ok, add a bash -i and now is working well:

   #+BEGIN_SRC sh :session :results output
 grep bash ~/.emacs
 echo $SHELL
 echo $HOME
 alias | wc
 env | grep HISTTIMEFORMAT
 echo $BASH_VERSION
 shopt -s histappend
 set -o | grep history
 history | wc
 alias dia
 alias hh
 hh | tail
 history -a
   #+END_SRC

   #+RESULTS:
   #+begin_example
   (setq org-babel-sh-command bash -i)
   /bin/bash
   /home/osiris
   5343236   29894
   HISTTIMEFORMAT=%Y-%m-%d %H:%M
   4.2.37(1)-release
   history  on
  8275   44194  338107
   alias dia='date +%Y-%m-%d'
   alias hh='history | egrep $(dia)  | cut -c 19- | sort -u'
   17:10 set -o | grep history
   17:10 shopt -s histappend
   17:10 ssh sugar-mant
   17:10 sudo chown osiris.osiris config -R
   17:10 sudo chown osiris.osiris .* -R
   17:10 sudo chown osiris.osiris /var/run/screen/S-osiris
   17:10 sudo chown osiris.osiris /var/run/screen/S-osiris.*
   17:10 sudo -s
  #+end_example

Sometimes I forget to start clock in a task,
then I use the history to know the timestamp
:-P

--

::

  Osiris Alejandro Gomez (OSiUX) os...@osiux.com.ar
  DC44 95D2 0D5D D544 FC1A F00F B308 A671 9237 D36C
  http://www.osiux.com.ar http://www.altermundi.net


signature.asc
Description: Digital signature


Re: [O] [Bug] commit 39070b7fc7 breaks babel test

2013-12-06 Thread Skip Collins
On Fri, Dec 6, 2013 at 2:05 PM, Eric Schulte schulte.e...@gmail.com wrote:
 Skip Collins skip.coll...@gmail.com writes:
 Would it make sense to automatically enforce passing all tests before
 git accepts a change?

 I for one would strongly oppose this change.  This would only make it
 take longer and thus make it less likely that new code is committed.
 This is the master branch where development should be fast and
 experimentation should take place, not the maintenance branch.

Designating something as an expected failure seems to be a good way to
track minor issues that need eventually to be resolved. As a user, I
frequently update with make up2 just to avoid getting bitten by stupid
errors that might sneak into master. Is it really that much extra work
for a developer to run the same command before committing and either
fix the error or mark it as a known failure?



Re: [O] Exams with Org?

2013-12-06 Thread Suvayu Ali
On Fri, Dec 06, 2013 at 03:53:45PM -0330, Roger Mason wrote:
 Hello,
 
 Has anyone used Org to create exams?  It would be useful to have the value
 per question totalled to provide the total per section etc and to be able to

You could try to reuse the effort property; or a new property of your
choosing with some custom lisp source blocks.

 embed the answers in the exam and expose them in the final document using
 some kind of conditional processing.

EXCLUDE_TAGS should help you there.  Tag your answers, say with ans,
and put it in EXCLUDE_TAGS; and later remove it from EXCLUDE_TAGS.

 
 If anyone has done this kind of thing I'd be interested to see an example
 file.

I believe there was someone who started a thread like this; try within
the last 2-3 months.

If you find a solution, please let us know.  A Worg article would be
even better!

GL,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [Bug] commit 39070b7fc7 breaks babel test

2013-12-06 Thread Bastien
Hi Skip,

Skip Collins skip.coll...@gmail.com writes:

 Designating something as an expected failure seems to be a good way to
 track minor issues that need eventually to be resolved. As a user, I
 frequently update with make up2 just to avoid getting bitten by stupid
 errors that might sneak into master. Is it really that much extra work
 for a developer to run the same command before committing and either
 fix the error or mark it as a known failure?

I'm for a relaxed policy here.

Users living on the master branch know they are testing an unstable
version of Org, and such hiccups just happen.

-- 
 Bastien



Re: [O] A small hack to document programs externally

2013-12-06 Thread Suvayu Ali
On Fri, Dec 06, 2013 at 05:26:05PM +0100, Alan Schmitt wrote:
 Hello,
 
 I've just written a small hack to refer to code in other files from an
 org-mode buffer, so that the referred code would be copied in the buffer
 to be exported when exporting the org buffer. (Our use case is a large
 Coq development which we want to document online. Our may constraint is
 that we need the documentation to live in files outside the code, yet
 still refer to the actual code.)

This sounds interesting.  I have been wanting to do this for a while.
I'll have a look at your solution when I find some time, maybe this
weekend.

-- 
Suvayu

Open source is the future. It sets us free.



[O] html checkbox output

2013-12-06 Thread Rick Frankel
So, here's a patch I would like a couple of people to try before i
commit it. It provides customization of checkbox formatting for html
output (unicode, ascii, checkbox input fields or custom). I couldn't
figure out how to add an association list customization with preset
options to a customization choice, so the custom option is a
partilally pre-filled sexp.

The default is still ascii, partially so that the checkbox tests don't
fail w/o being changed.

Let me know if this works for every of if it is too complex a solution
befor I apply it to master.

tia
rick
From 41da34c352f9c3899ece8294c3f618b665f12281 Mon Sep 17 00:00:00 2001
From: Rick Frankel r...@rickster.com
Date: Tue, 3 Dec 2013 14:37:30 -0500
Subject: [PATCH] Add customization options for html checkboxes.

* lisp/ox-html.el (html): Add in-buffer option HTML_CHECKBOX_TYP
(org-html-checkbox-types): New constant. Contains unicode, ascii and html
checkbox alists.
(org_html_checkbox_type): New customzation variable can be set to one
of the above choices or a user-entered alist.
(org_html_checkbox): Use of `:html-checkbox-type' export option.
---
 lisp/ox-html.el | 62 ++---
 1 file changed, 55 insertions(+), 7 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 9fa0a8c..8d0e3e3 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -126,6 +126,7 @@
 (:html-head-include-scripts nil html-scripts 
org-html-head-include-scripts)
 (:html-table-attributes nil nil org-html-table-default-attributes)
 (:html-table-row-tags nil nil org-html-table-row-tags)
+(:html-checkbox-type HTML_CHECKBOX_TYPE nil org-html-checkbox-type)
 (:html-xml-declaration nil nil org-html-xml-declaration)
 (:html-inline-images nil nil org-html-inline-images)
 (:infojs-opt INFOJS_OPT nil nil)
@@ -973,6 +974,42 @@ org-info.js for your website.
   (list :tag Postamble (const :format  postamble)
 (string :tag  id) (string :tag element
 
+(defconst org-html-checkbox-types
+  '((unicode .
+ ((on . #x2611;) (off . #x2610;) (trans . #x2610;)))
+(ascii .
+ ((on . code[X]/code)
+  (off . code[#xa0;]/code)
+  (trans . code[-]/code)))
+(html .
+ ((on . input type='checkbox' checked='checked' /)
+ (off . input type='checkbox' /)
+ (trans . input type='checkbox' /
+  Alist of checkbox types.
+The cdr of each entry is an alist list three checkbox types for
+html export: \on\, \off\ and \trans\.
+
+The choices are:
+  - unicode characters (html entities)
+  - ascii characters
+  - html checkboxes
+  - a user defined alist
+Note that only the ascii characters implement tri-state
+checkboxes. The other two use the \off\ checkbox for \trans\.)
+
+(defcustom org-html-checkbox-type ascii
+  The type of checkboxes to use for html export. See
+`org-html-checkbox-types' for for the preset values.
+  :group 'org-export-html
+  :version 24.4
+  :package-version '(Org . 8.0)
+  :type '(choice
+ (const :tag Unicode characters unicode)
+ (const :tag Ascii characters ascii)
+ (const :tag HTML checkboxes html)
+ (sexp :tag Custom alist
+   ((on . ) (off . ) (trans . )
+
 (defcustom org-html-metadata-timestamp-format %Y-%m-%d %a %H:%M
   Format used for timestamps in preamble, postamble and metadata.
 See `format-time-string' for more information on its components.
@@ -2415,18 +2452,29 @@ contextual information.
 
  Item
 
-(defun org-html-checkbox (checkbox)
-  Format CHECKBOX into HTML.
-  (case checkbox (on code[X]/code)
-   (off code[#xa0;]/code)
-   (trans code[-]/code)
-   (t )))
+(defun org-html-checkbox (checkbox info)
+  Format CHECKBOX into HTML. This can be overriden on a
+per-buffer basis with the \HTML_CHECKBOX_TYPE\ property,
+which can be either the name of one of the entries in the
+`org-html-checkbox-types' variable or an alist of the form:
+   ((on . \\) (off . \\) (trans . \\).
+See `org-html-checkbox-type' for customization.
+  (let ((checkboxes (plist-get info :html-checkbox-type)))
+(cdr
+ (assoc checkbox
+   (if (listp checkboxes) checkboxes
+ (if (string-equal (substring checkboxes 0 1) ()
+ (read checkboxes)
+   (cdr (assoc
+   (intern checkboxes)
+   org-html-checkbox-types
 
 (defun org-html-format-list-item (contents type checkbox info
 optional term-counter-id
 headline)
   Format a list item into HTML.
-  (let ((checkbox (concat (org-html-checkbox checkbox) (and checkbox  )))
+  (let ((checkbox (concat (org-html-checkbox checkbox info)
+ (and checkbox  )))
(br (org-html-close-tag br nil info)))
 (concat
  (case type
-- 
1.8.0



Re: [O] Exams with Org?

2013-12-06 Thread John Kitchin
you find this along the lines you are thinking about:

http://kitchingroup.cheme.cmu.edu/blog/2013/10/23/Writing-exams-in-org-mode/

I have not advanced the idea past this, and it doesn't do everything you
mentioned. I had in mind to generate a grading table at the end.

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



On Fri, Dec 6, 2013 at 2:23 PM, Roger Mason rma...@mun.ca wrote:

 Hello,

 Has anyone used Org to create exams?  It would be useful to have the value
 per question totalled to provide the total per section etc and to be able
 to embed the answers in the exam and expose them in the final document
 using some kind of conditional processing.

 If anyone has done this kind of thing I'd be interested to see an example
 file.

 Thanks,
 Roger






Re: [O] html checkbox output

2013-12-06 Thread Nicolas Goaziou
Hello,

Rick Frankel r...@rickster.com writes:

 So, here's a patch I would like a couple of people to try before i
 commit it. It provides customization of checkbox formatting for html
 output (unicode, ascii, checkbox input fields or custom). I couldn't
 figure out how to add an association list customization with preset
 options to a customization choice, so the custom option is a
 partilally pre-filled sexp.

 The default is still ascii, partially so that the checkbox tests don't
 fail w/o being changed.

 Let me know if this works for every of if it is too complex a solution
 befor I apply it to master.

A new buffer keyword (which needs to be documented in org.texi),
a defcustom with a completely free sexp... Isn't it a bit too much for
mere checkboxes? Filters provide almost the same functionality:

  (defun my-checkbox-filter (item backend info)
(when (org-export-derived-backend-p backend 'html)
  (replace-regexp-in-string 
\\`.*\\(code\\[\\(X\\|#xa0;\\|-\\)\\]/code\\).*$
(lambda (rep)
  (let ((check (match-string 2 rep)))
(cond ((equal check X) #x2611;)
  ((equal check -) #x2610;)
  (t #x2610;
item
nil nil 1)))
  (add-to-list 'org-export-filter-item-functions 'my-checkbox-filter)

Anyway, here are a few comments.

 +(defcustom org-html-checkbox-type ascii
 +  The type of checkboxes to use for html export. See

First line of a docstring has to be a single complete sentence.

 +(defun org-html-checkbox (checkbox info)
 +  Format CHECKBOX into HTML. This can be overriden on a

Ditto.

 +(cdr
 + (assoc checkbox

  (assq checkbox

 + (if (listp checkboxes) checkboxes
 +   (if (string-equal (substring checkboxes 0 1) ()

  (if (eq (aref checkboxes 0) ?\()

 +   (read checkboxes)

This looks cheesy. `read'? Do you really want to parse arbitrary Sexps?


Regards,

-- 
Nicolas Goaziou






Re: [O] [ESS] Keyboard shortcut - is there a principle behind them?

2013-12-06 Thread Vitalie Spinu

Try https://github.com/emacs-helm/helm-descbinds . It will make your
life with million emacs keys much easier.

I can comment on ESS. Most of the shortcuts are actually mnemonic and
hierarchical (C-c C-d for doc-map,  C-c C-e for extra-map, C-c C-t for
dev-map which includes mostly [t]racebug). Some common shortcuts are
there because they are easy to type like C-c C-z to switch to subprocess
and back; C-RET to send a line etc


  Vitalie


  Rainer M Krug on Fri, 06 Dec 2013 10:02:33 +0100 wrote:

  Hi

  one alternative subject could be because it is Friday...

  I am using org-mode and ess regularly, and I use quite a few keyboard
  shortcuts, but each time I read about a new one, I am wondering: why
  the heck these specific (default!) keyboard shortcuts?

  I am not asking why keyboard sequence, but e.g. why export in org is
  C-c e and why tangle is C-c C-v t, and so on.

  In other words: I am trying to *understand* why C-c and not C-o,
  because I have tremendous problems to remember the shortcuts - if I
  would know that there is s tree structure, where each following key
  narrows it down to further *thematically linked* commands, it would
  make it easier to learn these.

  Any insight into this? Or is there a emacs function which returns a
  random keyboard shortcut for a given function (some emacs shortcuts
  really seem to be that way...).

  Thanks,

  Rainer



Re: [O] How can I convert a org file to a flowchart

2013-12-06 Thread Feng Shu
Rainer M Krug rai...@krugs.de writes:

 On Fri Dec  6 15:07:56 2013, Bastien wrote:
 Hi Feng,

 Feng Shu tuma...@gmail.com writes:

 I have to draw a flowchart with many many nodes (about 500) and less
 construct types(only sequence construct and condition construct),

 Now I use org file record all the node labels, How can I convert this
 org to a flowchar if i use tag and link to record all the construct?

 AFAIK you can't.

 True - but a custom exporter to do this (export to plantuml format?)
 would rally be great

Good idea! Maybe I can export org file  to graphviz's dot file then convert it 
to
a picture...


 Cheers,

 Rainer



 --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
 Biology, UCT), Dipl. Phys. (Germany)

 Centre of Excellence for Invasion Biology
 Stellenbosch University
 South Africa

 Tel :   +33 - (0)9 53 10 27 44
 Cell:   +33 - (0)6 85 62 59 98
 Fax :   +33 - (0)9 58 10 27 44

 Fax (D):+49 - (0)3 21 21 25 22 44

 email:  rai...@krugs.de

 Skype:  RMkrug

-- 



Re: [O] probable caching bug?

2013-12-06 Thread Eric Abrahamsen
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 Yes, it's up to date -- after I sent this message I started wondering
 if it had been a while since I updated, so I pulled and reloaded, and
 not long after that saw the bug again.

 Well, too bad.

 I expect to see this again, so I can run the function above, but will
 reporting the results be of any use to you? If I know which element is
 corrupted, what should I be reporting back?

 The corrupted element is only interesting when there's a pattern (e.g.
 only lists and items are corrupted). Another important information is
 the action triggering the corruption. The function helps to find it out.

Ah, so you use it in after-change-functions?




Re: [O] Exams with Org?

2013-12-06 Thread Marvin Doyley
Hi there,

I have been using the latex exam.cls and org-latex-classes. Just us add the 
following to your .emacs file (for more details see 
http://comments.gmane.org/gmane.emacs.orgmode/74512)

(add-to-list 'org-latex-classes
'(Prob
\\documentclass[t]{exam}
[NO-DEFAULT-PACKAGES]
\\usepackage{hyperref}
\\usepackage{graphicx}
\\usepackage{color}
\\usepackage{amssymb,amsmath}
\\usepackage{palatino}
\\usepackage[mathscr]{eucal}
\\usepackage[margin=1in]{geometry} % PAGE LAYOUT 
\\setlength{\\parskip}{-1ex}%
\\setlength{\\parskip}{0ex}%
\\setlength{\\itemsep}{0ex}%
\\pagestyle{headandfoot}
\\sloppy
\\extraheadheight{.5in}
\\runningheadrule
\\firstpageheadrule
\\firstpagefootrule
\\runningfootrule
\\lhead{} 
\\chead{} 
\\lfoot{} 
\\cfoot{} 
\\renewcommand\\thequestion{\\Roman{question}}
\\renewcommand\\thepartno{\\arabic{partno}}
“
(\\begin{questions}{%s} \\end{questions})
))


Note that this assumes that you have installed the exam latex class on your 
system. Here is a simple test file


#+LaTeX_CLASS: Prob
#+TITLE: 
#+LaTeX_CLASS_OPTIONS: [12pt,letterpaper,answers]
#+DATE: 
#+OPTIONS: toc:nil  texht:nil
#+BIND: org-export-latex-title-command 

* 
** We can demodulate a DSB-SC signal by first multiplying the modulated signal 
will a locally generated carrier, and then applying a low pass filter to the 
resulting signal.
*** Verify in time-domain that this produce the message signal $m(t)$ 
*** Describe the demodulation process in frequency domain   

I hope this help

Cheers,
M


Re: [O] words starting with call_ confuse C-c C-c and export

2013-12-06 Thread Eric Schulte
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

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

 We may tweak `org-babel-inline-lob-one-liner-regexp' in order to make it
 harder to trigger it unwillingly. 


 The trade-off here is between raising an error when e.g., a like
 matching the call line syntax has a problem or failing silently.  The
 former is preferable in the case where you intend the syntax to be a
 call and you *do* want to know if there is a problem, and the latter is
 preferable if you aren't trying to issue a call and just stumbled upon
 the syntax.

 I'm open to either solution, it's just a question of which use case is
 more important and which failure condition is more onerous.

 Just to be clear, I thought about making parens mandatory in inline
 Babel call syntax. Underscore is overloaded already: underline,
 subscript...


I'm open to this change.

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



Re: [O] [Bug] commit 39070b7fc7 breaks babel test

2013-12-06 Thread Eric Schulte
Skip Collins skip.coll...@gmail.com writes:

 On Fri, Dec 6, 2013 at 2:05 PM, Eric Schulte schulte.e...@gmail.com wrote:
 Skip Collins skip.coll...@gmail.com writes:
 Would it make sense to automatically enforce passing all tests before
 git accepts a change?

 I for one would strongly oppose this change.  This would only make it
 take longer and thus make it less likely that new code is committed.
 This is the master branch where development should be fast and
 experimentation should take place, not the maintenance branch.

 Designating something as an expected failure seems to be a good way to
 track minor issues that need eventually to be resolved. As a user, I
 frequently update with make up2 just to avoid getting bitten by stupid
 errors that might sneak into master. Is it really that much extra work
 for a developer to run the same command before committing and either
 fix the error or mark it as a known failure?

If it increases the time taken to make a change by say 25%, then it will
result in me addressing only 4/5 as many issues.  I personally favor

1. a flexible master branch where we can try things out and spur
   discussion

2. a setup with less hurdles to committing---it's easy to revert a
   commit, but impossible recover a commit which is never made

Best,

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



Re: [O] [Bug] commit 39070b7fc7 breaks babel test

2013-12-06 Thread Eric Schulte
Achim Gratz strom...@nexgo.de writes:

 Eric Schulte writes:
 Fixed.

 The test was trying to ascertain that an inline babel codeblock didn't
 force a newline at the end.

What makes this code block inline?

 You've just made it test that there is a trailing newline introduced
 by the inline babel call, which is clearly against its intent.  You
 could have marked it as a known fail if you were planning to have this
 as a transitory failure only.  I can't find the discussion that led to
 the former implementation at the moment, but I'm fairly certain that
 there was a bug report against trailing newlines from inline babel
 calls.  So what is the rationale of re-introducing the trailing
 newline this time around?


This test (test-ob/catches-all-references) is from commit c21692506d8,
which doesn't have anything to do with newlines (judging from the commit
message).

To me the more natural behavior is to include the newline in the
expansion.  Maybe we have discussed this before on list, and decided
stripping the newline was preferable, but I don't recall that
discussion.

Just because behavior ends up being encoded in a test doesn't
necessarily mean the behavior is correct.  I think as test suites
attempt to protect the desired behavior they often end up also
protecting incidental behavior of the implementation at the time the
test was written.

Best,



 Regards,
 Achim.

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



Re: [O] [Babel] [Bug] Cache

2013-12-06 Thread Eric Schulte
Achim Gratz strom...@nexgo.de writes:

 Eric Schulte writes:
 In that thread we agreed that the expansion of no-web references
 *should* be included in code blocks for hashing, but no-one has had the
 time to implement this.

 I think we may have discussed this before, but if you make the hashes
 dependent on the possibly recursive noweb expansions

What is a recursive noweb expansion?  I think of the following, which
will cause errors in any situation.

#+name: a
#+begin_src sh
  echo hi b
#+end_src

#+name: b
#+begin_src sh
  echo hi a
#+end_src

 this would require that all expansions be re-computed all the time or
 you would need to discern which of the expansions are pure
 (i.e. depend only on their arguments, functional-style), which have
 session semantics and which of the ones that have session semantics
 should possibly not be re-evaluated.  I'm not sure that opening this
 can of worms is worth the trouble.


I still (and I think this was my issue last time) don't see how noweb
expansions are more complicated than :var arguments.  That said I agree
that this is an edge case, and I certainly don't have time to make this
change (which you right could be complex) at the moment.

Best,



 Regards,
 Achim.

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


[O] Changing capture frame/window behavior depending on source

2013-12-06 Thread Josiah Schwab
Hi All,

I have some bookmarks in chrome which trigger capture via org-protocol.
I would like the windowing behavior of capture to be different depending
where it is invoked.

For example, when I invoke capture from my bookmark, I want the frame
that the capture used to vanish after C-c C-c or C-c C-k.  I achieved
this via the following code.


(defun jws/org-protocol-capture-p ()
  Return true if this capture was initiated via org-protocol.
  (equal (buffer-name (org-capture-get :original-buffer))  *server*))

(defun jws/org-capture-after-finalize ()
  Delete frame if capture was initiated via org-protocol
  (if (jws/org-protocol-capture-p) (delete-frame)))

(add-hook 'org-capture-after-finalize-hook 'jws/org-capture-after-finalize)


When I invoke the capture from my bookmark, I also want capture to be
the only window in the frame.  I can make all captures act that way by
setting (add-hook 'org-capture-mode-hook 'delete-other-windows)

But when I tried to have this part be source dependent with

(defun jws/org-capture-initialize ()
  (if (jws/org-protocol-capture-p) 'delete-other-windows))

(add-hook 'org-capture-mode-hook 'jws/org-capture-initialize)

it still gave me a frame with two windows, for reasons I don't
understand.  I stepped through the code with edebug and confirmed that
jws/org-protocol-capture-p was evaluating to true.


Or perhaps there is there something more suitable for my hook than
'delete-other-windows?  Has anyone successfully done something similar?

Best,
Josiah



Re: [O] How can I convert a org file to a flowchart

2013-12-06 Thread Feng Shu
Rainer M Krug rai...@krugs.de writes:

 On Fri Dec  6 15:07:56 2013, Bastien wrote:
 Hi Feng,

 Feng Shu tuma...@gmail.com writes:

 I have to draw a flowchart with many many nodes (about 500) and less
 construct types(only sequence construct and condition construct),

 Now I use org file record all the node labels, How can I convert this
 org to a flowchar if i use tag and link to record all the construct?

 AFAIK you can't.

 True - but a custom exporter to do this (export to plantuml format?)
 would rally be great

I find the new activity format of plantuml is very interesting

#+begin_src plantuml :file test.png
start
:the first node;
if (do you like org-mode?) then (Yes)
  :Hello friend;
else (I don't like it)
  :Goodbye;
endif
:the last node;
stop
#+end_src


 Cheers,

 Rainer



 --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
 Biology, UCT), Dipl. Phys. (Germany)

 Centre of Excellence for Invasion Biology
 Stellenbosch University
 South Africa

 Tel :   +33 - (0)9 53 10 27 44
 Cell:   +33 - (0)6 85 62 59 98
 Fax :   +33 - (0)9 58 10 27 44

 Fax (D):+49 - (0)3 21 21 25 22 44

 email:  rai...@krugs.de

 Skype:  RMkrug

-- 



Re: [O] [ESS] Keyboard shortcut - is there a principle behind them?

2013-12-06 Thread Matthew Fidler
See

http://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html
On Dec 6, 2013 3:02 AM, Rainer M Krug rai...@krugs.de wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi

 one alternative subject could be because it is Friday...

 I am using org-mode and ess regularly, and I use quite a few keyboard
 shortcuts, but each time I read about a new one, I am wondering: why
 the heck these specific (default!) keyboard shortcuts?

 I am not asking why keyboard sequence, but e.g. why export in org is
 C-c e and why tangle is C-c C-v t, and so on.

 In other words: I am trying to *understand* why C-c and not C-o,
 because I have tremendous problems to remember the shortcuts - if I
 would know that there is s tree structure, where each following key
 narrows it down to further *thematically linked* commands, it would
 make it easier to learn these.

 Any insight into this? Or is there a emacs function which returns a
 random keyboard shortcut for a given function (some emacs shortcuts
 really seem to be that way...).

 Thanks,

 Rainer


 - --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
 Biology, UCT), Dipl. Phys. (Germany)

 Centre of Excellence for Invasion Biology
 Stellenbosch University
 South Africa

 Tel :   +33 - (0)9 53 10 27 44
 Cell:   +33 - (0)6 85 62 59 98
 Fax :   +33 - (0)9 58 10 27 44

 Fax (D):+49 - (0)3 21 21 25 22 44

 email:  rai...@krugs.de

 Skype:  RMkrug
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

 iQEcBAEBAgAGBQJSoZKpAAoJENvXNx4PUvmCyp8IAM2uzkocZLD0MVVw/DSI4w7f
 ZPFqVBppkzvc5Ef4vuA0Om4ETWqsgYaAs9Tnz3Q3mDGnkZ01yl4/PDGNav/sRGGY
 pJs+HElogJCulNrHibh0Ai8X9w29yWZQZnXmPr5lAdmSjTDziUSdUakXte2KkD7O
 v+82YoTDAbycUcqK7CUAFNmyNqn5UsXf1h2wYfe6xYaQUPTXnEWsLJAuE3otVE1P
 fbmTAbOy+mq+4+2krwp+kCyGU4hoynpJBH1DBUvQgtJeEGYNL2AxYCnm4BU2axwK
 qSykHLineyacD4x4RWzEu8uya/P/Q7OSAWQmdsnOT7xqrJo9wxphfrBVefLJb1A=
 =BbQi
 -END PGP SIGNATURE-

 __
 ess-h...@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/ess-help



Re: [O] electric-pair-mode

2013-12-06 Thread Bastien
Hi Harald,

Harald Hanche-Olsen han...@math.ntnu.no writes:

 [Bastien b...@gnu.org (2013-12-06 13:50:58 UTC)]

  So is there a way to make org-self-insert-command compatible with
  electric-pair-mode?
 
 it works fine for me.

 I have been told (off list) that delete-selection-mode could be the
 culprit. And indeed, turning it off fixes the problem. But I don't
 want to du that, as I have gotten quite fond of it. But it could
 explain why it works for you. The same person told me that autopair
 might be a good alternativ to electric-pair-mode. So I will give that
 a shot.

 What version of Org are you using?

 It's version 7.9.3f, bundled with the GNU emacs development sources
 (as of a month or so ago). That appears to be quite old? I would like
 a newer one anyhow, if only for the improved orgstruct-mode.

The bug was present in recent versions of Org too (including 8.2.4),
I just fixed it.

Thanks a lot for reporting this!

-- 
 Bastien