Re: [O] Error when using :session :colnames yes :results graphics on an R code block

2016-12-28 Thread Charles C. Berry

On Wed, 28 Dec 2016, Kodi Arfer wrote:


If I run Emacs with


[snip]



   cons: Wrong type argument: listp, "x
   1"

If I remove ":colnames yes", the error doesn't happen and the
file is produced as expected.



Fixed on master.

Chuck



Re: [O] [PATCH] Tag visibility fixup after setting them

2016-12-28 Thread Nicolas Goaziou
Hello,

Alexey Lebedeff  writes:

> This fixes bug where you sometimes can't immediately see tags that were
> just set. And to reveal them you need to go through global visibility
> cycle.

Thank you for the patch, and the test.

> +(defun org-insert-visible-text ( args)
> +  "Inserts arguments at point and makes them visible in outline.
> +
> +When text is being inserted on the invisible region boundary, it
> +can be inadvertently sucked into invisibility."
> +  (let* ((before-point (point)))
> +(apply #'insert args)
> +(outline-flag-region before-point (point) nil)))

I don't think, for the time being, it deserves a dedicated function.
I suggest to integrate it in `org-set-tags' instead.

Could you send an updated patch ?


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug in clocktable report with formula %

2016-12-28 Thread Nicolas Goaziou
Hello,

Andreas Mueller  writes:

> I think I may have found a bug in the clocktable report: When using
> :formula %, it seems days are ignored in time percentage calculation.
>
> I have attached a simple test.org which demonstrates this.
>
> Emacs version: 24.5.1
> Org version: Org mode version 9.0.2 (9.0.2-10-g820d1e-elpa @ 
> ~/.emacs.d/elpa/org-20161223/)
>
> Thanks & best regards,
> Andreas
>
> * Foo
>   CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00
> * Bar
>   CLOCK: [2016-12-28 Wed 13:09]--[2016-12-28 Wed 15:09] =>  2:00
>
> * Report
> #+BEGIN: clocktable :maxlevel 2 :scope file :formula %
> #+CAPTION: Clock summary at [2016-12-28 Wed 15:10]
> | Headline | Time  |   | % |
> |--+---+---+---|
> | *Total time* | *1d 4:00* |   | 100.0 |
> |--+---+---+---|
> | Foo  | 1d 2:00   |   |  50.0 |
> | Bar  | 2:00  |   |  50.0 |
> #+TBLFM: $4='(org-clock-time% @2$2 $2..$3);%.1f
> #+END:

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Referring to an Org Babel variable in the invocation arguments to another Org Babel code block

2016-12-28 Thread Zack Piper
Hi all,

Still struggling with this, does anyone have any ideas?




Thanks!

-- 
Zack Piper  System administrator
https://apertron.net



[O] speeding up Babel Gnuplot

2016-12-28 Thread Thierry Banel
Babel Gnuplot is quite slow on large tables.
Example: 45 seconds for a 1500 rows table.

Why? Because orgtbl-to-generic is too slow (or too generic). Its
behavior seems to be quadratic O(size^2). Should we bypass it? Should
we try to optimize it?

Here is a fix to speed up the rendering to a mere fraction of a second.

#+BEGIN_SRC elisp
(defun org-babel-gnuplot-table-to-data (table data-file params)
  "Export TABLE to DATA-FILE in a format readable by gnuplot."
  (let ((org-babel-gnuplot-timestamp-fmt
 (or (plist-get params :timefmt) "%Y-%m-%d-%H:%M:%S")))
(with-temp-file data-file
  (mapc (lambda (line)
  (mapc (lambda (cell)
  (insert (org-babel-gnuplot-quote-tsv-field cell))
  (insert "\t"))
line)
  (insert "\n"))
table)))
  data-file)
#+END_SRC

And here is a test case.

First generate a 1500 rows table:

#+BEGIN_SRC elisp :results none
  (goto-char (point-max))
  (insert "#+name: data\n")
  (let ((i 1500))
(while (> i 0)
  (goto-char (point-max))
  (insert (format "| %4s |\n" i))
  (setq i (1- i
#+END_SRC

Then run Babel Gnuplot:

#+BEGIN_SRC gnuplot :var data=data :file x.svg :session none :term svg
plot data
#+END_SRC





Re: [O] Insert git hash into exported document

2016-12-28 Thread David Talmage
On Fri, Dec 23, 2016 at 3:13 PM, Daniele Pizzolli  wrote:

>
> David Talmage writes:
>
> > I'd like to insert the git hash of HEAD in the org-mode documents that I
> > export.  Is there an easy way?  I'm exporting to LaTeX.
>
> ...

#+NAME: hash-from-lisp
> #+BEGIN_SRC emacs-lisp
>   (shell-command-to-string "git rev-parse HEAD" )
> #+END_SRC
>
> #+RESULTS: hash-from-lisp
> : 099b6ceee7264832b8e13f1156974b8017e6e4bb
>
> You can hide the result using proper headers or the noexport tag and
> then print the result in a verbose way:
>
> The latest commit hash is src_emacs-lisp[:var i=hash-from-lisp]{(format
> "%s" i)}
>
>
Thanks!  That does what I want.  Alas, it has a side effect.  When I put
all that in my document, I get the hash I desire but I also get this Emacs
LISP code in my document:

\begin{verbatim}
(shell-command-to-string "git rev-parse HEAD" )
\end{verbatim}

I added :exports results to the BEGIN_SRC block to remove the code.



...


[O] Error when using :session :colnames yes :results graphics on an R code block

2016-12-28 Thread Kodi Arfer

If I run Emacs with

emacs -Q --eval '(progn (add-to-list (quote load-path) 
"/home/hippo/.emacs.d/elpa/org-20161224") (add-to-list (quote load-path) 
"/home/hippo/.emacs.d/elpa/ess-20161223.108/lisp") (require (quote 
ess-site)))'


, open an Org file containing

#+BEGIN_SRC R :session :file /tmp/foo.png :results graphics 
:colnames yes

library(ggplot2)
qplot(c(1, 2, 3), c(2, 4, 9))
#+END_SRC

#+RESULTS:
[[file:/tmp/foo.png]]

, add R to org-babel-load-languages, and hit C-c C-c on the
code block, I get the error:

cons: Wrong type argument: listp, "x
1"

If I remove ":colnames yes", the error doesn't happen and the
file is produced as expected.

The full backtrace is:

org-babel-R-process-value-result("x\n1" t)
org-babel-R-evaluate-session("*R*" "png(filename=\"/tmp/foo.png\"); 
tryCatch({\nlibrary(ggplot2)\nqplot(c(1, 2, 3), c(2, 4, 
9))\n},error=function(e){plot(x=-1:1, y=-1:1, type='n', xlab='', 
ylab='', axes=FALSE); text(x=0, y=0, labels=e$message, col='red'); 
paste('ERROR', e$message, sep=' : ')}); dev.off()" value ("file" 
"graphics" "replace") t nil)
org-babel-R-evaluate("*R*" "png(filename=\"/tmp/foo.png\"); 
tryCatch({\nlibrary(ggplot2)\nqplot(c(1, 2, 3), c(2, 4, 
9))\n},error=function(e){plot(x=-1:1, y=-1:1, type='n', xlab='', 
ylab='', axes=FALSE); text(x=0, y=0, labels=e$message, col='red'); 
paste('ERROR', e$message, sep=' : ')}); dev.off()" value ("file" 
"graphics" "replace") t nil)
org-babel-execute:R("library(ggplot2)\nqplot(c(1, 2, 3), c(2, 4, 
9))" ((:colname-names) (:rowname-names) (:result-params "file" 
"graphics" "replace") (:result-type . value) (:results . "file graphics 
replace") (:exports . "code") (:cache . "no") (:noweb . "no") (:hlines . 
"no") (:tangle . "no") (:session) (:file . "/tmp/foo.png") (:colnames . 
"yes")))
funcall(org-babel-execute:R "library(ggplot2)\nqplot(c(1, 2, 3), 
c(2, 4, 9))" ((:colname-names) (:rowname-names) (:result-params "file" 
"graphics" "replace") (:result-type . value) (:results . "file graphics 
replace") (:exports . "code") (:cache . "no") (:noweb . "no") (:hlines . 
"no") (:tangle . "no") (:session) (:file . "/tmp/foo.png") (:colnames . 
"yes")))
(let ((r (funcall cmd body params))) (if (and (eq (cdr (assq 
:result-type params)) (quote value)) (or (member "vector" result-params) 
(member "table" result-params)) (not (listp r))) (list (list r)) r))
(setq result (let ((r (funcall cmd body params))) (if (and (eq (cdr 
(assq :result-type params)) (quote value)) (or (member "vector" 
result-params) (member "table" result-params)) (not (listp r))) (list 
(list r)) r)))
(if (member "none" result-params) (progn (funcall cmd body params) 
(message "result silenced")) (setq result (let ((r (funcall cmd body 
params))) (if (and (eq (cdr (assq :result-type params)) (quote value)) 
(or (member "vector" result-params) (member "table" result-params)) (not 
(listp r))) (list (list r)) r))) (let ((file (cdr (assq :file params 
(if file (progn (if result (progn (let (... ...) (unwind-protect ... 
... (setq result file))) (let ((post (cdr (assq :post params (if 
post (progn (let ((*this* ...)) (setq result (org-babel-ref-resolve 
post)) (if file (progn ...)) (org-babel-insert-result result 
result-params info new-hash lang)))
(let* ((lang (nth 0 info)) (result-params (cdr (assq :result-params 
params))) (body (let ((coderef (nth 6 info)) (expand (if 
(org-babel-noweb-p params :eval) (org-babel-expand-noweb-references 
info) (nth 1 info (if (not coderef) expand (replace-regexp-in-string 
(org-src-coderef-regexp coderef) "" expand nil nil 1 (dir (cdr (assq 
:dir params))) (default-directory (or (and dir (file-name-as-directory 
(expand-file-name dir))) default-directory)) (cmd (intern (concat 
"org-babel-execute:" lang))) result) (if (fboundp cmd) nil (error "No 
org-babel-execute function for %s!" lang)) (message "executing %s code 
block%s..." (capitalize lang) (let ((name (nth 4 info))) (if name 
(format " (%s)" name) ""))) (if (member "none" result-params) (progn 
(funcall cmd body params) (message "result silenced")) (setq result (let 
((r (funcall cmd body params))) (if (and (eq (cdr ...) (quote value)) 
(or (member "vector" result-params) (member "table" result-params)) (not 
(listp r))) (list (list r)) r))) (let ((file (cdr (assq :file params 
(if file (progn (if result (progn (let ... ...))) (setq result file))) 
(let ((post (cdr (assq :post params (if post (progn (let (...) (setq 
result ...) (if file ...) (org-babel-insert-result result 
result-params info new-hash lang))) (run-hooks (quote 
org-babel-after-execute-hook)) result)
(cond (current-cache (save-excursion (goto-char 
(org-babel-where-is-src-block-result nil info)) (forward-line) 
(skip-chars-forward " 	") (let ((result (org-babel-read-result))) 
(message (replace-regexp-in-string "%" "%%" (format "%S" result))) 
result))) ((org-babel-confirm-evaluate info) (let* ((lang (nth 0 

Re: [O] Bug: EXPORT_FILE_NAME error [9.0.3 (9.0.3-elpaplus @ /home/andrea/.emacs.d/elpa/org-plus-contrib-20161224/)]

2016-12-28 Thread Charles C. Berry

On Wed, 28 Dec 2016, Andrea wrote:



Hello,

thanks for org mode, it is great!
I am having a problem with the latest version of org: I really would
like to be able to export buffers in a different directory, and so far I
used the :EXPORT_FILE_NAME: property for this use case.

However, after upgrading to the latest release it seems that something
does not work anymore: the pdf file is generated but the output
directory is ignored!

You could reproduce this by:


I cannot reproduce this. I get files /tmp/bla.pdf /tmp/bla.tex and my
reader opens the former file.

FWIW, there have been some discussions in recent months about pdf export.

On my macbook, C-h v org-latex-pdf-process RET gives:

org-latex-pdf-process is a variable defined in ‘ox-latex.el’.
Its value is ("latexmk -g -pdf -pdflatex=\"%latex\" -outdir=%o %f")
Original value was
("%latex -interaction nonstopmode -output-directory %o %f" "%latex 
-interaction nonstopmode -output-directory %o %f" "%latex -interaction 
nonstopmode -output-directory %o %f")


[...]

which works for macOS Sierra. See the full docstring for details.

IIRC, the original value does not work for me to export to another
directory.

HTH,

Chuck

Re: [O] Ignore pattern when syncing Org-mode files between hosts

2016-12-28 Thread Thierry Banel
Le 28/12/2016 16:42, Karl Voit a écrit :
> Hi!
>
> I wonder how others are handling synchronization ignore patterns
> between different hosts.
>
> ...
>
> Currently, I am evaluating Syncthing[0] which looks very good so
> far. It is a game-changer to be because similar to Dropbox[1], it
> synchronizes in background on any change within 60s (by default).
> Thus, resulting in symlinks and tempfiles transferred as well.
>
>

Syncthing supports ignore patterns.
https://docs.syncthing.net/users/ignoring.html

On the web interface http://localhost:8080/
there is a button "Ignore Patterns" under "Advanced settings"





Re: [O] Ignore pattern when syncing Org-mode files between hosts

2016-12-28 Thread Karl Voit
Hi Skip,

* Skip Collins  wrote:
> On Wed, Dec 28, 2016 at 10:42 AM, Karl Voit  wrote:
>> I wonder how others are handling synchronization ignore patterns
>> between different hosts.
>
> Perhaps you should consider git annex. It is extremely flexible about
> choosing which file to sync. 

I know git-annex. It is very powerful, yes. BTDT. I don't want that:
I don't want to have a central server. I don't want versioning on
all files. I doubt the performance and efficiency with binaries in
git. I consider myself rather advanced in IT but the complexity of
git-annex is a bit scary to me.

YMMV and this is OK.

Syncthing seems to be exactly the tool of choice for me for now:
very simple to set up, nice and simple clients for every important
platform[1] and yet powerful enough in case I need anything advanced.

BUT:

My email was not about «what is a sync tool that allows for complex
ignore patterns» but rather «how are you using your ignore patterns
with Org-mode files to avoid issues».

So: do you sync everything of your Org-mode directory? 

If not: what are you ignoring? 

What is your experience especially when changing hosts? 


And the question which sums up probably all the related issues I can
think of by now: How do you sync Org-mode files, avoid temp data
being synced while preventing unsaved data lost.


[1] Except iOS but I wrote «important» on purpose as you might have
noticed ;-)

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] Ignore pattern when syncing Org-mode files between hosts

2016-12-28 Thread Skip Collins
On Wed, Dec 28, 2016 at 10:42 AM, Karl Voit  wrote:
> I wonder how others are handling synchronization ignore patterns
> between different hosts.

Perhaps you should consider git annex. It is extremely flexible about
choosing which file to sync. It works cross-platform and is highly
configurable. It allows manual syncing or automatic syncing (via 'git
annex assistant'). It uses all the power of git to ensure the safety
and availability of your files, including the ability to use strong
encryption if desired.



[O] Bug in clocktable report with formula %

2016-12-28 Thread Andreas Mueller
Hello

I think I may have found a bug in the clocktable report: When using
:formula %, it seems days are ignored in time percentage calculation.

I have attached a simple test.org which demonstrates this.

Emacs version: 24.5.1
Org version: Org mode version 9.0.2 (9.0.2-10-g820d1e-elpa @ 
~/.emacs.d/elpa/org-20161223/)

Thanks & best regards,
Andreas


test.org
Description: Lotus Organizer


[O] Ignore pattern when syncing Org-mode files between hosts

2016-12-28 Thread Karl Voit
Hi!

I wonder how others are handling synchronization ignore patterns
between different hosts.

In particular, I do have "issues" with temporary files of Emacs +
Org-mode like «.#myfile.org» or «#myfile.org#». 

The first one is a symlink which does not bother me as long as I
keep quitting my Emacs instances when leaving a host and as long as
Windows sync does not result in an error because of not properly
handling symlinks. So lets forget about them until someone points me
to a potential issue.

The latter one is an autosave file which takes as much space as the
original file except for the changes in between. This is causing
many MBs of unnecessary synchronization data.


So far, I was using unison file synchronizer which I invoked
manually before shutting down the host I was working with. Therefore
there were no temp files left since I had to save and quit Emacs. A
clean status of my Org-mode files was transferred, no unwanted temp
files synced.

Currently, I am evaluating Syncthing[0] which looks very good so
far. It is a game-changer to be because similar to Dropbox[1], it
synchronizes in background on any change within 60s (by default).
Thus, resulting in symlinks and tempfiles transferred as well.

On the one hand side, I clearly don't want those temp files
synchronized to other hosts because my Org-mode files tend to get
very large[2].  A short test showed that before and after invoking
save-some-buffers() autosave files of about 10MB of data got
deleted. This data was transferred beforehand resulting in lots of
sync overhead I want to avoid.

On the other hand side, I do want those temp files synced because
they contain unsaved changes I'd lose when starting to work in a
different host before saving/quitting Emacs.

I had mixed results when I tried real-auto-save[3] a year ago. This
would be a method to make sure that there are no unsaved changes
older than xx seconds. Somehow, this was not working to my
satisfaction so I had to disable it again.


So how do you handle ignore patterns with sync tools like Dropbox or
Syncthing?


[0] https://syncthing.net/

[1] I'll never trust my (unencrypted) Org-mode files be placed in
the public cloud like Dropbox or similar.

[2] Several of my Org-mode files holds a couple of MBs of data.

[3] from https://www.emacswiki.org/emacs/AutoSave - seems to be down

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




[O] Bug: EXPORT_FILE_NAME error [9.0.3 (9.0.3-elpaplus @ /home/andrea/.emacs.d/elpa/org-plus-contrib-20161224/)]

2016-12-28 Thread Andrea

Hello,

thanks for org mode, it is great!
I am having a problem with the latest version of org: I really would
like to be able to export buffers in a different directory, and so far I
used the :EXPORT_FILE_NAME: property for this use case.

However, after upgrading to the latest release it seems that something
does not work anymore: the pdf file is generated but the output
directory is ignored!

You could reproduce this by:

1) cd ~
2) touch test.org
3) echo "* bla
   :PROPERTIES:
 :EXPORT_FILE_NAME:  /tmp/bla
   :END: 
   " > test.org
4) emacs test.org
5) C-e C-s l o

Error here: org-compile-file: File "/tmp/bla.pdf" wasn’t produced.  See "*Org 
PDF LaTeX
You should see that the LaTeX file is in the /tmp directory, but that
the pdf is in the home directory.

It would be marvellous if this could start working as before.
Thanks and Happy New Year to everyone,

Andrea



Emacs  : GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.31)
 of 2016-12-24
Package: Org mode version 9.0.3 (9.0.3-elpaplus @ 
/home/andrea/.emacs.d/elpa/org-plus-contrib-20161224/)

current state:
==
(setq
 org-capture-prepare-finalize-hook '(org-id-get-create)
 org-reveal-mathjax t
 org-pandoc-epub-rights "Copyright 2016 Andrea <>"
 org-tab-first-hook '(do-yas-expand org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-src-window-setup 'current-window
 org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function
 org-confirm-shell-link-function 'yes-or-no-p
 org-image-actual-width 550
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-latex-pdf-process '("latexmk -pdf %f")
 org-highlight-latex-and-related '(latex script entities)
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-default-notes-file "/home/andrea/workspace/agenda/myTasks.org"
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-from-is-user-regexp "\\"
 org-loop-over-headlines-in-active-region 'start-level
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-babel-tangle-use-relative-file-links nil
 org-mode-hook '((lambda nil (make-variable-buffer-local (quote 
yas/trigger-key)) (setq yas/trigger-key [tab])
  (add-to-list (quote org-tab-first-hook) (quote do-yas-expand))
  (define-key yas/keymap [tab] (quote yas/next-field)))
 (lambda nil (local-set-key "\357" (quote 
org-mime-org-buffer-htmlize))) org-toggle-blocks turn-on-flyspell
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-show-block-all append local] 5]
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes 
org-eldoc-load)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-use-speed-commands t
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-pomodoro-ticking-sound 
"/home/andrea/.emacs.d/elpa/org-pomodoro-20161119.226/resources/tick.wav"
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-pomodoro-start-sound 
"/home/andrea/.emacs.d/elpa/org-pomodoro-20161119.226/resources/bell.wav"
 org-babel-tangle-lang-exts '(("haskell" . "hs") ("scala" . "scala") ("ruby" . 
"rb") ("python" . "py") ("java" . "java")
  ("clojure" . "clj") ("ocaml" . "ml") 
("emacs-lisp" . "el") ("elisp" . "el"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-link-parameters '(("id" :follow org-id-open) ("rmail" :follow 
org-rmail-open :store org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link)
   ("info" :follow org-info-open :export org-info-export 
:store org-info-store-link)
   ("gnus" :follow org-gnus-open :store org-gnus-store-link)
   ("docview" 

Re: [O] bug in orgmode parsing of results

2016-12-28 Thread daimrod


On 12/27/16 19:11, Charles C. Berry wrote:
> On Tue, 27 Dec 2016, daimrod wrote:
> 
>> Hi,
>>
>> I've found what I think is a bug in orgmode parsing.
>> When the following file is parsed :
>>
>> * Test
>> #+BEGIN_SRC emacs-lisp :exports results :results raw drawer
>> (format "- Test2")
>> #+END_SRC
>>
>> #+RESULTS:
>> :RESULTS:
>> - Test2
>> :END:
>>
> 
> [snip]
> 
>>
>> That is, it generates a DRAWER, which seems correct.
>>
>> However, when the following file is parsed :
>>
>> * Test
>> #+BEGIN_SRC emacs-lisp :exports results :results raw drawer
>> (format "* Test2")
>> #+END_SRC
>>
>> #+RESULTS:
>> :RESULTS:
>> * Test2
>> :END:
>>
> 
> [deleted]
> 
>> That is, it generates a PARAGRAPH which seems incorrect.
>>
>> WDYT?
>>
> 
> What I think is that you should run org-lint on your document. It will
> say something like this (but with different line numbers):
> 
>   Line Trust Warning
>  2 low   Forbidden combination in header ":results": raw, drawer
> 12 low   Forbidden combination in header ":results": raw, drawer
> 17 low   Possible incomplete drawer ":RESULTS:"
> 
> The last one should catch your eye.

Didn't know about org-lint. Thanks.

> If you want to generate results that have lines that start with `*' you
> need to protect them. A good way to do this is to wrap them in a src
> block or export block like this:
> 
> #+BEGIN_SRC emacs-lisp :exports results :wrap export latex
> (format "* Test2")
> #+END_SRC

The thing about :wrap export html is that I've to generate the HTML
myself, whereas when I export the :RESULTS: drawer, org-mode generates
the HTML. AFAIK there is no export block for org (no begin_export org).

As a workaround I can always use `:results raw` but then it can not
replace the result automatically. However, that's not a problem for my
use case I think...

Thanks for your help.

Best,



signature.asc
Description: OpenPGP digital signature


Re: [O] bug in orgmode parsing of results

2016-12-28 Thread daimrod


On 12/27/16 19:09, Nicolas Goaziou wrote:
> Hello,
> 
> daimrod  writes:
> 
>> #+RESULTS:
>> :RESULTS:
>> * Test2
>> :END:
>>
> [...]
> 
>> (paragraph
>>  (:begin 98 :end 119 :contents-begin 109 :contents-end 119 :post-blank 0
>> :post-affiliated 109 :results
>>  (\"\")
>>  :parent #2)
>>  #(\":RESULTS:\\n\" 0 10
>>(:parent #3)))
>>
>> That is, it generates a PARAGRAPH which seems incorrect.
> 
> The parser is correct. A drawer cannot contain a headline.

Hmm, OK.

> Regards,
> 
> 



signature.asc
Description: OpenPGP digital signature


[O] inheritance of mutually exclusive tags

2016-12-28 Thread yanmcbe
Org-mode allows marking a set of tags as mutually exclusive. It also allows
the inheritance of tags.

(from now on I am talking only about these mutually exclusive tags)

When a tag is set in a parent, but also in a child, what I expect to happen
is that the child is not included in searches/selections with the parent
tag.

In the example [0], a search for black (e.g. C-/ m black ) should not
match poodle, because it is white.

Now I realize that the mutually exclusive tag concept is probably only a
convenience for adding tags with C-c. And it doesn't seem to have any other
implications, but it would be nice to have. Do you think this is a
possibility or that I could get this behaviour some other way?

Thanks!

[0] http://paste.lisp.org/+76JF