Re: [O] export of src block ignores :results

2016-09-29 Thread Thomas Alexander Gerds

thanks for looking into this. it would be great if the regexp could be
changed to catch the show-time variant. the regexp you sent in your
previous mail works for me, i.e., the result of
(progn (looking-at org-babel-result-regexp)(match-string 1))
is the same with and without the show-time option.

anyway, the original problem is not solved yet.
org-babel-current-result-hash is related to the execution of the src
block which is independent of the export process since I have

(setq org-export-babel-evaluate nil). 

and the problem that the results are exported in case of ":results code"
persists when I set (setq org-babel-hash-show-time nil)

so, unfortunately my question remains. which function in the export
process interprets the "results code" option?

Thomas

"Charles C. Berry"  writes:

> On Thu, 29 Sep 2016, Charles C. Berry wrote:
> 
>> On Thu, 29 Sep 2016, Thomas Alexander Gerds wrote:
>>
>>> Hi Chuck
>>> 
>>> thanks for checking. my org-version is the same
>>> release_8.3.6-1178-g2b22d5
>>> 
>>> to get the date and time of the in the results:
>>> 
>>> (setq org-babel-hash-show-time t)
>>> 
>>> but even without this option the results of the block are exported
>>> no matter what. could someone point to the place in the export
>>> process where the :results option is interpreted?
>> You probably want `org-babel-current-result-hash', which AFAICS does
>> not recognize the `show-time' variant.
>> I think you'll need some regexp magic to make it work.
>
> You might try this:
>
> #+BEGIN_SRC emacs-lisp
>(setq org-babel-result-regexp
>   (concat
>"^[]*#\\+RESULTS\\[\\(?:<[0-9]"
>"\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?"
>"[0-2][0-9]:[0-6][0-9]:[0-6][0-9]> ?"
>"[^
> \n[:alnum:]]*\\)?\\([[:alnum:]]+\\)"
>"\\]?:[]*"))
> #+END_SRC
>
> The line wrap after "[^ is due to C-M (you type C-q C-M to insert it
> if your email client messes with it and you need to redo it)
>
> This seems like an innocuous change, but I haven't yet run this thru
> `make test' so beware.
>
> Chuck
>
>

-- 
Thomas A. Gerds -- Department of Biostatistics Copenhagen
University of Copenhagen, Oester Farimagsgade 5, 1014 Copenhagen,
Denmark



Re: [O] export of src block ignores :results

2016-09-29 Thread Charles C. Berry

On Thu, 29 Sep 2016, Charles C. Berry wrote:


On Thu, 29 Sep 2016, Thomas Alexander Gerds wrote:


Hi Chuck

thanks for checking. my org-version is the same
release_8.3.6-1178-g2b22d5

to get the date and time of the in the results:

(setq org-babel-hash-show-time t)

but even without this option the results of the block are exported no
matter what. could someone point to the place in the export process
where the :results option is interpreted?


You probably want `org-babel-current-result-hash', which AFAICS does not 
recognize the `show-time' variant.


I think you'll need some regexp magic to make it work.


You might try this:


#+BEGIN_SRC emacs-lisp
  (setq org-babel-result-regexp
(concat
 "^[   ]*#\\+RESULTS\\[\\(?:<[0-9]"
 "\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?"
 "[0-2][0-9]:[0-6][0-9]:[0-6][0-9]> ?"
 "[^
\n[:alnum:]]*\\)?\\([[:alnum:]]+\\)"
 "\\]?:[   ]*"))
#+END_SRC


The line wrap after "[^ is due to C-M (you type C-q C-M to insert it if 
your email client messes with it and you need to redo it)


This seems like an innocuous change, but I haven't yet run this thru `make 
test' so beware.



Chuck



Re: [O] bug with special entities and (setq org-catch-invisible-edits t)?

2016-09-29 Thread John Kitchin
>> Is that a bug, or expected?
>
> Somewhere in-between. It's broken, editing sub/super-script can be very
> tedious, but the proper behaviour is yet to be defined. The proof is all
> the possible values for `org-catch-invisible-edits' (which is mostly
> focused on preventing edition of folded contents, and is unrelated to
> invisible text like links and sub/super-script).
>
> Maybe brackets in sub/super-scripts not be made invisible, only
> minified.
>
> What do you expect instead?

It seems like you should be able to type F_{A} and keep on typing.
Minified would be ok by me.

>
>
> Regards,


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



Re: [O] Bug when both a link and tags are in a headline

2016-09-29 Thread Nicolas Goaziou
Hello,

Michael Fiano  writes:

> Steps to reproduce:
>
> 1. Start stock emacs 25.1:
> $ emacs -Q test.org
>
> 2. Write a headline
> * Test
>
> 3. Issue C-c C-c and the headline to add a tag
> * Test   :test:
>
> 4. Modify the headline to include a link.
> * Test [[http://test][test]]  :test:
>
> 5. Everything appears to be rendered correctly, but when viewing the
> source, it really looks like:
> [[http://test][te]]st
>
> 6. To make it render wrong and become very obvious, change the link
> description to have multiple words.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Making DocBook xml books from org mode?

2016-09-29 Thread Peter Davis
Dear Joost,

On Thu, Sep 29, 2016, at 03:23 PM, Joost Kremers wrote:
> 
> On Thu, Sep 29 2016, Peter Davis wrote:
> >
> > but the PDFs I'm getting still look like articles. (I copied the
> > above from some examples posted on this list a while ago. Thanks!)
> 
> Your LaTeX_CLASS is set to `koma-article', so that makes sense.
>

Ah, yes! Thanks.

> 
> >  2. Are there any advantages to considering MarkDown or AsciiDoc as
> >  opposed to org markup? (Again, my familiarity with org is a strong
> >  incentive here, but I'm willing to consider other options.)
> 
> There is a (IMHO) excellent markdown-mode available on Melpa, and if you
> use Pandoc[1] to convert your documents you have a lot of flexibility.
> There's also `pandoc-mode' (of which I'm the author), a minor mode that
> makes interacting with pandoc from within Emacs easier.
>

Bravo! Thank you again.

> 
> >  3. The direct route from org to DocBook xml seems to be missing. From
> >  what I gather, I can get there somehow via texi (but I don't even have
> >  that in org currently), or perhaps export to HTML and then convert that
> >  to db xml. Am I missing something? Is there some other route I should
> >  consider?
> 
> Pandoc can convert to Docbook, so that might be an option. Note that
> Pandoc also converts *from* Org, (although it cannot handle all of Org's
> capabilities), so depending on your needs, that might be a way to go
> directly from Org to Docbook.
>

Thank you. I did succeed in exporting from org to texi, and then
makeinfo'ing that into a DocBook xml, though a bit of hand editing was
necessary.

> 
> >  4. [LONGSHOT] Is there any way to /import/ docbook xml into org mode?
> 
> Pandoc also converts *from* Docbook, and can convert *to* Org, so again,
> that might be of help.
> 
> Of course, whether Pandoc can be useful to you really depends on your
> needs. Pandoc's internal document representation is based on Markdown,
> and by its very nature Markdown is more limited in it capabilities than
> Org. In essence, anything that cannot be handled by (Pandoc's version
> of) Markdown, cannot be handled by Pandoc in other formats.
>

Thanks. Sounds like Pandoc should really be in my toolkit.

> 
> HTH

Definitely!

Thanks,
-pd


-- 
  Peter Davis
  www.techcurmudgeon.com



[O] Possible bug on ob-python.el

2016-09-29 Thread drymer

Hi,

I'm not sure if it's a bug or if it's something I have missconfigured, but 
there it goes.

I'm using maint Org-mode version 8.3.6, release_8.3.6-4-g4835be.dirty. The init 
file I'm using to debug is:

#+BEGIN_SRC emacs-lisp
(add-to-list 'load-path "~/.emacs.d/lisp/org-mode/lisp/")
(add-to-list 'load-path "~/.emacs.d/elpa/python-mode-20160114.2307/")
(require 'python-mode)
(require 'org)
(setq py-shell-name "/usr/local/bin/python3")
(setq org-babel-python-mode 'python-mode)

(org-babel-do-load-languages
'org-babel-load-languages
'((python . t)))
#+END_SRC

I have a tree with the SESSION propertie set to "exercici". Under that tree, 
two source blocks:

#+BEGIN_SRC python
import base64
#+END_SRC

#+BEGIN_SRC python
hex_string = 
"49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d"
print(base64.b64encode(bytes(hex_string)))
#+END_SRC

When evaluating the first one, in the message buffer appears: "if: Buffer *Python-set* does not exist or has no 
process". Also, a buffer called "*ulb Python3*" has appeared. What it seems to happen is that the 
"ulb" buffer is created instead of the one called "Python-$sessionName". It only happens when using 
python-mode set on 'org-babel-load-languages.

I'll add the complete backtrace at the end of the e-mail. If I can add more 
information, just ask for it.

Thanks

#+BEGIN_SRC emacs-lisp
Debugger entered--Lisp error: (error "Buffer *Python-set* does not exist or has no 
process")
 signal(error ("Buffer *Python-set* does not exist or has no process"))
 error("Buffer %s does not exist or has no process" "*Python-set*")
 (if (org-babel-comint-buffer-livep session) nil (error "Buffer %s does not exist or 
has no process" session))
 (progn (if (org-babel-comint-buffer-livep session) nil (error "Buffer %s does not 
exist or has no process" session)) (let ((save-match-data-internal (match-data))) 
(unwind-protect (progn (save-current-buffer (set-buffer session) (let 
((comint-input-filter ...)) (let* (... ... dangling-text raw) (goto-char ...) (let ... 
... ...) (let ... ... ... ... ... ... ...) (while ... ...) (goto-char ...) (insert 
dangling-text) (if ... ...) (split-string string-buffer comint-prompt-regexp) 
(set-match-data save-match-data-internal (quote evaporate)
 (let ((tmp-file (org-babel-temp-file "python-"))) (progn (if 
(org-babel-comint-buffer-livep session) nil (error "Buffer %s does not exist or has no 
process" session)) (let ((save-match-data-internal (match-data))) (unwind-protect (progn 
(save-current-buffer (set-buffer session) (let (...) (let* ... ... ... ... ... ... ... ... ... 
(set-match-data save-match-data-internal (quote evaporate) (org-babel-eval-read-file tmp-file))
 (cond ((eql result-type (quote output)) (mapconcat (function org-babel-trim) (butlast (progn (if 
(org-babel-comint-buffer-livep session) nil (error "Buffer %s does not exist or has no process" session)) 
(let ((save-match-data-internal ...)) (unwind-protect (progn ...) (set-match-data save-match-data-internal ... 2) 
"\n")) ((eql result-type (quote value)) (let ((tmp-file (org-babel-temp-file "python-"))) (progn 
(if (org-babel-comint-buffer-livep session) nil (error "Buffer %s does not exist or has no process" session)) 
(let ((save-match-data-internal (match-data))) (unwind-protect (progn (save-current-buffer ... ...)) (set-match-data 
save-match-data-internal (quote evaporate) (org-babel-eval-read-file tmp-file
 (let* ((send-wait (function (lambda nil (comint-send-input nil t) (sleep-for 0 5 
(dump-last-value (function (lambda (tmp-file pp) (mapc (function (lambda ... ... ...)) (if pp 
(list "import pprint" ...) (list ...)) (input-body (function (lambda (body) 
(mapc (function (lambda ... ... ...)) (split-string body "[
\n]")) (funcall send-wait (results (cond ((eql result-type (quote output)) (mapconcat (function org-babel-trim) (butlast (progn ... ...) 2) 
"\n")) ((eql result-type (quote value)) (let ((tmp-file ...)) (progn (if ... nil ...) (let ... ...)) (org-babel-eval-read-file tmp-file)) (if (string= 
(substring org-babel-python-eoe-indicator 1 -1) results) nil (let ((--params result-params)) (if (member "none" --params) nil (if (or (member 
"scalar" --params) (member "verbatim" --params) (member "html" --params) (member "code" --params) (member "pp" 
--params) (member "file" --params) (and (or ... ... ... ...) (not ...))) results (org-babel-python-table-or-string results))
 org-babel-python-evaluate-session("*Python-set*" "import base64" value 
("replace"))
 (if session (org-babel-python-evaluate-session session body result-type 
result-params) (org-babel-python-evaluate-external-process body result-type 
result-params preamble))
 org-babel-python-evaluate("*Python-set*" "import base64" value ("replace") nil)
 (let* ((session (org-babel-python-initiate-session (cdr (assoc :session params (result-params 
(cdr (assoc :result-params params))) (result-type (cdr (assoc 

[O] Bug when both a link and tags are in a headline

2016-09-29 Thread Michael Fiano
Steps to reproduce:

1. Start stock emacs 25.1:
$ emacs -Q test.org

2. Write a headline
* Test

3. Issue C-c C-c and the headline to add a tag
* Test   :test:

4. Modify the headline to include a link.
* Test [[http://test][test]]  :test:

5. Everything appears to be rendered correctly, but when viewing the
source, it really looks like:
[[http://test][te]]st

6. To make it render wrong and become very obvious, change the link
description to have multiple words.


Re: [O] export of src block ignores :results

2016-09-29 Thread Charles C. Berry

On Thu, 29 Sep 2016, Thomas Alexander Gerds wrote:


Hi Chuck

thanks for checking. my org-version is the same
release_8.3.6-1178-g2b22d5

to get the date and time of the in the results:

(setq org-babel-hash-show-time t)

but even without this option the results of the block are exported no
matter what. could someone point to the place in the export process
where the :results option is interpreted?


You probably want `org-babel-current-result-hash', which AFAICS does not 
recognize the `show-time' variant.


I think you'll need some regexp magic to make it work.

Chuck




Re: [O] bug with special entities and (setq org-catch-invisible-edits t)?

2016-09-29 Thread Nicolas Goaziou
Hello,

John Kitchin  writes:

> If I have (setq org-catch-invisible-edits t) and run
> (org-toggle-pretty-entities), then I get an error if I type: F_{A} and
> try to continue typing.
>
> user-error: Edit in invisible region aborted, repeat to confirm with text 
> visible
>
> If I set that variable to nil, it works fine, and it also works fine for
> F_A.
>
> This is with:
> Org-mode version 8.3.5 (8.3.5-1-g589e96-elpaplus @ 
> /Users/jkitchin/vc/jkitchin-github/scimax/elpa/org-plus-contrib-20160822/)
>
>
> Is that a bug, or expected?

Somewhere in-between. It's broken, editing sub/super-script can be very
tedious, but the proper behaviour is yet to be defined. The proof is all
the possible values for `org-catch-invisible-edits' (which is mostly
focused on preventing edition of folded contents, and is unrelated to
invisible text like links and sub/super-script).

Maybe brackets in sub/super-scripts not be made invisible, only
minified.

What do you expect instead?


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Several small documentation problems [8.3.6 (8.3.6-4-g4835be-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160926/)]

2016-09-29 Thread Nicolas Goaziou
Hello,

Jorge  writes:

> This is the first batch of documentation problems.  I will report the rest
> later, because preparing this first batch already took several hours.

Those are fixed, except the points below.

>   • When describing the behavior with C-u C-u, it wrongly substitutes
> "grandparent" for "parent".

I think "grandparent" is correct. In the following document

  * H1
  ** H2
  Text<--point

"H2" is the parent headline of "Text" and as a consequence, "H1" is its
grandparent.

> • [info:org#Structure editing]
>   I looked at the code, and C- (org-insert-heading-respect-content) just
>   calls (org-insert-heading '(4) invisible-ok), so it has the same effect as
>   C-u M-.  The manual could mention that C- has the same effect as
>   C-u M-, to aid the user's learning process, as she would just need to
>   memorize this quick fact, instead of understanding both behaviors and
>   deducing they're equal).  Also the manual doesn't adequately explain the
>   effect of C-u M-.  And the description of C- is actually wrong:
> Just like `M-', except when adding a new heading below the
> current heading, the new heading is placed after the body instead
> of before it.  This command works from anywhere in the entry.
>   /After the body/?  Doesn't it mean /after the entry/?  Besides, there are
>   additional differences: that M- may create a new plain list item, while
>   C- always creates a new heading, and that C- never splits the
>   heading.  Please rewrite the whole description.

You are right, M-RET and C-RET are confusing, and making C-u M-RET
a duplicate of C-RET is wasting some important keybinding. This was
discussed on this ML already (with Rasmus) but led nowhere so far.

In any case, it is more future-proof to not insist on the fact that
C-RET is C-u M-RET.

Thank you for this tedious, yet very important work.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug? org-export-babel-evaluate setting breaks :exports results

2016-09-29 Thread Charles C. Berry

On Thu, 29 Sep 2016, William Denton wrote:

I'm working on a big Org file on a slow machine, so I set 
org-export-babel-evaluate to nil so exporting to PDF just generates the file 
from what's in the buffer, without doing any calculating.




Actually it does a lot LESS than that.

The docstring notes that:

"When set to nil no code will be evaluated as part of the export
process and no header argumentss will be obeyed."

and advises:

"Users who wish to avoid evaluating code on export should use the header
argument ‘:eval never-export’."

which sounds like what you wanted.

Chuck

Re: [O] export of src block ignores :results

2016-09-29 Thread Thomas Alexander Gerds
Hi Chuck

thanks for checking. my org-version is the same
release_8.3.6-1178-g2b22d5

to get the date and time of the in the results:

(setq org-babel-hash-show-time t)

but even without this option the results of the block are exported no
matter what. could someone point to the place in the export process
where the :results option is interpreted?

Thomas

"Charles C. Berry"  writes:

> On Thu, 29 Sep 2016, Thomas Alexander Gerds wrote:
>
>> Hi
>> org's development version (I am using the one updated yesterday:
>> 2b22d50 Nicolas Go 2016-09-28) seems to ignore the :results setting
>> of a src block. more specifically, the export of this
>> #+BEGIN_SRC R :results output :exports code :session *R* :cache yes
>> 2+2 #+END_SRC
>> #+RESULTS[<2016-09-29 08:32:48>
>> e8e7ff579309fc6cacb1e75a0c1c671366c2eaf8]: : [1] 4
>> should *not* include the results, but it does.
>
> Using latest (release_8.3.6-1178-g2b22d5), I cannot reproduce.
>
> Does `org-babel-sha1-hash' (C-c C-v a with point in the src block)
> really yield "<2016-09-29 08:32:48> e8e7ff..." ??
>
> I get "e8e7ff..." which causes no problems.
>
> HTH,
>
> Chuck
>
>

-- 
Thomas A. Gerds -- Department of Biostatistics Copenhagen
University of Copenhagen, Oester Farimagsgade 5, 1014 Copenhagen,
Denmark



Re: [O] Making DocBook xml books from org mode?

2016-09-29 Thread Joost Kremers

On Thu, Sep 29 2016, Peter Davis wrote:
> I've started a new position in which I have to create and maintain a
> large set of documents in DocBook xml format. For new books, I'd really
> like to use org mode, since a) I'm already familiar with it, b) I love
> it, and c) I believe it does (or can be made to do) nearly everything I
> need.
>
> However, after Googling around the org-mode/DocBook space, I'm left with
> some questions.
>
> 1. I'm going to be creating books, as opposed to articles. My org-header
> looks like this:
>
> #+STARTUP: showeverything logdone
> #+OPTIONS:   H:5 num:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t
> #+LaTeX_CLASS: koma-article
> #+LaTeX_HEADER: \usepackage{listings}
> #+LATEX_HEADER: \setlength{\parskip}{2ex plus 4pt minus 2pt}
> #+LATEX_HEADER: \setlength{\parindent}{0pt}
> #+LATEX_HEADER: \renewcommand{\baselinestretch}{1.0}
> #+LATEX_HEADER: \setlength{\topsep}{-10pt}
> #+LATEX_HEADER: \setlength{\partopsep}{0pt}
> #+LaTeX_HEADER: \usepackage{xcolor}
> #+LaTeX_HEADER: \lstset{
> #+LaTeX_HEADER: basicstyle=\ttfamily,
> #+LaTeX_HEADER: breaklines=true,
> #+LaTeX_HEADER:
> prebreak=\mbox{\ensuremath{\color{red}\hookleftarrow}},
> #+LaTeX_HEADER:
> postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{red}\hookrightarrow\space}},
> #+LaTeX_HEADER: columns=fullflexible,
> #+LaTeX_HEADER: keepspaces=true
> #+LaTeX_HEADER: }
> #+LaTeX_CLASS_OPTIONS:
> [book,letterpaper,times,12pt,listings-bw,microtype]
>
> but the PDFs I'm getting still look like articles. (I copied the
> above from some examples posted on this list a while ago. Thanks!)

Your LaTeX_CLASS is set to `koma-article', so that makes sense.

>  2. Are there any advantages to considering MarkDown or AsciiDoc as
>  opposed to org markup? (Again, my familiarity with org is a strong
>  incentive here, but I'm willing to consider other options.)

There is a (IMHO) excellent markdown-mode available on Melpa, and if you
use Pandoc[1] to convert your documents you have a lot of flexibility.
There's also `pandoc-mode' (of which I'm the author), a minor mode that
makes interacting with pandoc from within Emacs easier.

>  3. The direct route from org to DocBook xml seems to be missing. From
>  what I gather, I can get there somehow via texi (but I don't even have
>  that in org currently), or perhaps export to HTML and then convert that
>  to db xml. Am I missing something? Is there some other route I should
>  consider?

Pandoc can convert to Docbook, so that might be an option. Note that
Pandoc also converts *from* Org, (although it cannot handle all of Org's
capabilities), so depending on your needs, that might be a way to go
directly from Org to Docbook.

>  4. [LONGSHOT] Is there any way to /import/ docbook xml into org mode?

Pandoc also converts *from* Docbook, and can convert *to* Org, so again,
that might be of help.

Of course, whether Pandoc can be useful to you really depends on your
needs. Pandoc's internal document representation is based on Markdown,
and by its very nature Markdown is more limited in it capabilities than
Org. In essence, anything that cannot be handled by (Pandoc's version
of) Markdown, cannot be handled by Pandoc in other formats.

HTH

--
Joost Kremers
Life has its moments



[O] Bug: Several small documentation problems [8.3.6 (8.3.6-4-g4835be-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160926/)]

2016-09-29 Thread Jorge
To confirm those bugs that needed confirming by testing, I started Emacs with
an empty init file.  I also used this Emacs instance to compose this email.

This is the first batch of documentation problems.  I will report the rest
later, because preparing this first batch already took several hours.

• org-id-update-id-locations docstring
  The only real formal parameters are `files' and `silent', but the docstring
  mentions parameter `check'.
• `org-insert-heading' docstring
  • In the 4th paragraph:
  With one universal prefix argument, set the user option
  ‘org-insert-heading-respect-content’ to t for the duration of
  the command.  This modifies the behavior described above in
  this ways: on list items and at the /beginning/ of normal
  lines, force the insertion of a heading after the current
  subtree.
According to my quick test, this behavior actually occurs /almost anywhere/
within normal lines, except at column 0; in the latter case, it creates the
new heading /before/ the original heading.
  • When describing the behavior with C-u C-u, it wrongly substitutes
"grandparent" for "parent".
  • Finally, the following two paragraphs near the end of the docstring seem
redundant (see the 2nd and 3rd paragraphs):
  If point is at the beginning of a headline, insert a sibling
  before the current headline.  If point is not at the beginning,
  split the line and create a new headline with the text in the
  current line after point (see ‘org-M-RET-may-split-line’ on how
  to modify this behavior).

  If point is at the beginning of a normal line, turn this line
  into a heading.
• [info:org#Structure editing]
  I looked at the code, and C- (org-insert-heading-respect-content) just
  calls (org-insert-heading '(4) invisible-ok), so it has the same effect as
  C-u M-.  The manual could mention that C- has the same effect as
  C-u M-, to aid the user's learning process, as she would just need to
  memorize this quick fact, instead of understanding both behaviors and
  deducing they're equal).  Also the manual doesn't adequately explain the
  effect of C-u M-.  And the description of C- is actually wrong:
Just like `M-', except when adding a new heading below the
current heading, the new heading is placed after the body instead
of before it.  This command works from anywhere in the entry.
  /After the body/?  Doesn't it mean /after the entry/?  Besides, there are
  additional differences: that M- may create a new plain list item, while
  C- always creates a new heading, and that C- never splits the
  heading.  Please rewrite the whole description.
• org-insert-todo-heading docstring
  omits the behavior of inserting a new item with an unchecked checkbox when
  invoked at a plain list.
• [info:org#Initial visibility]
The startup visibility options are ignored when the file is open
for the first time during the agenda generation: if you want the
agenda to honor the startup visibility, set
`org-agenda-inhibit-startup' to `nil'.
  This implies that org-agenda-inhibit-startup defaults to non-nil.  Actually
  it defaults to nil.
• [info:org#Plain lists], paragraph about "C-c -"
If there is an active region when calling this, selected text
will be changed into an item.  With a prefix argument, all lines
will be converted to list items.  If the first line already was a
list item, any item marker will be removed from the list.
  The manual switched the effect of the prefix argument.  Actually if there is
  an active region and no prefix argument, it converts all lines into list
  items, and with an active region and a prefix argument, it converts the
  entire region into one item.
• [info:org#Checkboxes]
  • The manual says that if "C-c C-x C-b" is invoked in a headline, Org toggles
checkboxes in the region between this headline and the next.  Actually it
does not.  For example, if the list started like this:
1. ☐

2. ☑
One invocation will actually turn it into
1. ☑

2. ☑
  • A footnote says that "C-u C-c C-c" is invoked on the first item of a list
with no checkbox, Org adds checkboxes to the rest of the list.  In my quick
testing, this only happens if the invocation happens at column 0.
• [info:org#Agenda commands]
  Misreports the effect of C-u on  (see the docstring).
• [info:org#Countdown timer]
  "prefix numeric argument" → "numeric prefix argument"
• [info:org#Conventions]
  says "Easy templates insert lowercase keywords".  Actually, according to my
  quick test they insert all-capitals keywords.
• Mentions of obsolete aliases
  I don't know if this is intentional for compatibility with earlier Emacs
  releases or an error, but I thought I should report just in case:
  1. [info:org#Global and local cycling]:
 1. "show-branches" ("outline-show-branches").
 2. 

[O] Making DocBook xml books from org mode?

2016-09-29 Thread Peter Davis
I've started a new position in which I have to create and maintain a
large set of documents in DocBook xml format. For new books, I'd really
like to use org mode, since a) I'm already familiar with it, b) I love
it, and c) I believe it does (or can be made to do) nearly everything I
need.

However, after Googling around the org-mode/DocBook space, I'm left with
some questions.

1. I'm going to be creating books, as opposed to articles. My org-header
looks like this:

#+STARTUP: showeverything logdone
#+OPTIONS:   H:5 num:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t
#+LaTeX_CLASS: koma-article
#+LaTeX_HEADER: \usepackage{listings}
#+LATEX_HEADER: \setlength{\parskip}{2ex plus 4pt minus 2pt}
#+LATEX_HEADER: \setlength{\parindent}{0pt}
#+LATEX_HEADER: \renewcommand{\baselinestretch}{1.0}
#+LATEX_HEADER: \setlength{\topsep}{-10pt}
#+LATEX_HEADER: \setlength{\partopsep}{0pt}
#+LaTeX_HEADER: \usepackage{xcolor}
#+LaTeX_HEADER: \lstset{
#+LaTeX_HEADER: basicstyle=\ttfamily,
#+LaTeX_HEADER: breaklines=true,
#+LaTeX_HEADER:
prebreak=\mbox{\ensuremath{\color{red}\hookleftarrow}},
#+LaTeX_HEADER:
postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{red}\hookrightarrow\space}},
#+LaTeX_HEADER: columns=fullflexible,
#+LaTeX_HEADER: keepspaces=true
#+LaTeX_HEADER: }
#+LaTeX_CLASS_OPTIONS:
[book,letterpaper,times,12pt,listings-bw,microtype]

but the PDFs I'm getting still look like articles. (I copied the
above from some examples posted on this list a while ago. Thanks!)

 2. Are there any advantages to considering MarkDown or AsciiDoc as
 opposed to org markup? (Again, my familiarity with org is a strong
 incentive here, but I'm willing to consider other options.)

 3. The direct route from org to DocBook xml seems to be missing. From
 what I gather, I can get there somehow via texi (but I don't even have
 that in org currently), or perhaps export to HTML and then convert that
 to db xml. Am I missing something? Is there some other route I should
 consider?

 4. [LONGSHOT] Is there any way to /import/ docbook xml into org mode?

Thank you very much.

-pd

-- 
  Peter Davis
  www.techcurmudgeon.com



[O] Bug? org-export-babel-evaluate setting breaks :exports results

2016-09-29 Thread William Denton
I'm working on a big Org file on a slow machine, so I set 
org-export-babel-evaluate to nil so exporting to PDF just generates the file 
from what's in the buffer, without doing any calculating.


I have a mix of source blocks, and all of a sudden the code began to appear in 
the PDF when all I wanted were the results.  I boiled it down to the example 
below.  If you save that to a file, load it, ~C-c C-e l o RET~ to export to PDF, 
you will see the ls command and the output, even though the setting is ":exports 
results".


Now delete the org-export-babel-evaluate line, ~C-x C-v RET~ to reload the 
file and pick up the new setting, then export to PDF.  You will not see the ls 
command, just the output.


## BEGIN
# -*- org-export-babel-evaluate: nil -*-

#+BEGIN_SRC shell :results value :exports results
ls /etc | wc -l
#+END_SRC

#+RESULTS:
: 307
## END

I'm not sure what's happening, but it seems like a bug.

(This is on Emacs 25.2.50.2 with Org compiled from source today, up to 
Nicolas's 2b22d503e1ee83f3a2681964f9de8405438a6385 commit yesterday).


Bill
--
William Denton :: Toronto, Canada :: https://www.miskatonic.org/
Caveat lector.



Re: [O] export of src block ignores :results

2016-09-29 Thread Charles C. Berry

On Thu, 29 Sep 2016, Thomas Alexander Gerds wrote:


Hi

org's development version (I am using the one updated yesterday: 2b22d50
Nicolas Go 2016-09-28) seems to ignore the :results setting of a src
block. more specifically, the export of this

#+BEGIN_SRC R  :results output :exports code  :session *R* :cache yes
2+2
#+END_SRC

#+RESULTS[<2016-09-29 08:32:48> e8e7ff579309fc6cacb1e75a0c1c671366c2eaf8]:
: [1] 4

should *not* include the results, but it does.


Using latest (release_8.3.6-1178-g2b22d5), I cannot reproduce.

Does `org-babel-sha1-hash' (C-c C-v a with point in the src block)
really yield "<2016-09-29 08:32:48> e8e7ff..." ??

I get "e8e7ff..." which causes no problems.

HTH,

Chuck



Re: [O] ob-clojure?

2016-09-29 Thread Frederick Giasson

Hi Lawrence,

Is there an ob-clojure in elpa? If not should I use this 
?


You may be interested in this version:

http://fgiasson.com/blog/index.php/2016/06/16/improving-org-babel-clojure/

I didn't find the time to push into the Org-mod update pipeline, but I 
will do so soon (hopefully). In mean time all the code is there.



Thanks,

Fred



Re: [O] inlinetask with :noexport: seems to be exported?

2016-09-29 Thread Rainer M Krug
Nicolas Goaziou  writes:

> Hello,
>
> Rainer M Krug  writes:
>
>> OK - your example works, but the following doesn't:
>>
>> * Foo
>>
>> Foo
>>
>> *** TODO :noexport: Bar *** END
>>
>> Effectively, it is exported if the inline task has ho header text.
>
> This is because your syntax is invalid. You cannot have a headline
> without text but with tags. :noexport: is treated as the headline (or
> inlinetask) text.
>
> You can add a space entity, e.g., \nbsp{}, to work around the problem.

OK - makes sense.

Thanks

Rainer

>
> Regards,

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] inlinetask with :noexport: seems to be exported?

2016-09-29 Thread Nicolas Goaziou
Hello,

Rainer M Krug  writes:

> OK - your example works, but the following doesn't:
>
> * Foo
>
> Foo
>
> *** TODO :noexport: Bar *** END
>
> Effectively, it is exported if the inline task has ho header text.

This is because your syntax is invalid. You cannot have a headline
without text but with tags. :noexport: is treated as the headline (or
inlinetask) text.

You can add a space entity, e.g., \nbsp{}, to work around the problem.

Regards,

-- 
Nicolas Goaziou




Re: [O] SyncOrg mention in Org manual ?

2016-09-29 Thread Rasmus
Hi Benoît,

Thanks for your work and getting in touch!

Benoît Coste  writes:

> Last week I published SyncOrg
> , a fork
> of MobileOrg for Android. It is an open-source app for reading org notes
> from your Android phone (sources are on GitHub
> ). It still needs work but is already up
> and running. The main differences with MobileOrg are a modern UI, the fact
> that it uses Git for synchronization and that it no longer needs emacs at
> all to run.
>
> Someone on reddit proposed that it should me mentioned it the org manual,
> so here I am. I'll be happy to provide some documentation about it if the
> idea gets approved.

First, there’s an introduction on how to contributing to Org here.  In
particular, I think you’d even need to assign copyright to your
documentation patches, but I’m not sure (hopefully someone will chime
in)...

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

Second, I suggest that you propose the necessary changes to Appendix B
called MobileOrg.  At the very least we should mention your program, I
think.  Perhaps the instructions must also be altered slightly to work
with SyncOrg (I haven’t tried it).

http://orgmode.org/org.html#MobileOrg

The manual is the doc/org.texi.  If you don’t care for texinfo I’m sure
someone could take of the formatting (to the extend it’s necessary) if you
provide the needed changes.

Third, as pointed out, it would be best if it's in Fdroid as well, as many
probably don’t have access to the google play store (like me).

Thanks again,
Rasmus

-- 
... The proofs are technical in nature and provide no real understanding




Re: [O] inlinetask with :noexport: seems to be exported?

2016-09-29 Thread Rainer M Krug
Nicolas Goaziou  writes:

> Hello,
>
> Rainer M Krug  writes:
>
>> I wanted to define some inlinetask (works - love it) but want to keep
>> most of them in the org file and not export them. Adding :noexport: does
>> not work.
>
> FWIW, I cannot reproduce it. I tested with the following document, after
> evaluating (require 'org-inlinetask).
>
> * Foo
>
> Foo
>
> *** Begin :noexport:
> Bar
> *** END

OK - your example works, but the following doesn't:

--8<---cut here---start->8---
* Foo

Foo

*** TODO :noexport:
Bar
*** END
--8<---cut here---end--->8---

Effectively, it is exported if the inline task has ho header text.

Cheers,

Rainer

>
>
> Regards,

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


[O] export of src block ignores :results

2016-09-29 Thread Thomas Alexander Gerds
Hi

org's development version (I am using the one updated yesterday: 2b22d50
Nicolas Go 2016-09-28) seems to ignore the :results setting of a src
block. more specifically, the export of this

#+BEGIN_SRC R  :results output :exports code  :session *R* :cache yes 
2+2
#+END_SRC

#+RESULTS[<2016-09-29 08:32:48> e8e7ff579309fc6cacb1e75a0c1c671366c2eaf8]:
: [1] 4

should *not* include the results, but it does.  the elpa version, e.g.,
org-20160509, respects the :results setting. I tried to debug, but could
not find the place in the process where the option :results is
interpreted. here is how far I got: in the development version the
result of the function org-element-parse-buffer does include the result
of the src block "4" whereas in the elpa version result of the function
org-element-parse-buffer does include it.

did I miss something or is this a bug?

thanks, 
Thomas

-- 
sent from nil



[O] export of src block ignores :results

2016-09-29 Thread Thomas Alexander Gerds
Hi

org's development version (I am using the one updated yesterday: 2b22d50
Nicolas Go 2016-09-28) seems to ignore the :results setting of a src
block. more specifically, the export of this

#+BEGIN_SRC R  :results output :exports code  :session *R* :cache yes 
2+2
#+END_SRC

#+RESULTS[<2016-09-29 08:32:48> e8e7ff579309fc6cacb1e75a0c1c671366c2eaf8]:
: [1] 4

should *not* include the results, but it does.  the elpa version, e.g.,
org-20160509, respects the :results setting. I tried to debug, but could
not find the place in the process where the option :results is
interpreted. here is how far I got: in the development version the
result of the function org-element-parse-buffer does include the result
of the src block "4" whereas in the elpa version result of the function
org-element-parse-buffer does include it.

did I miss something or is this a bug?

thanks, 
Thomas

-- 
sent from nil