Re: [O] error while upgrading to 8.3.5

2016-07-25 Thread Vikas Rawal

* I cleaned up permissions to some directories and did a make install, which 
went fine.

* Now when I do a “make up2”, I get two errors.

   FAILED  test-ob/indented-cached-org-bracket-link
   FAILED  test-org-colview/columns-summary

* Output of BTEST_RE=columns-summary make test

Test test-org-colview/columns-summary condition:
(ert-test-failed
 ((should
   (equal "705d 01h 0m 0s"
  (cl-letf ... ...)))
  :form
  (equal "705d 01h 0m 0s" "705d 00h 0m 0s")
  :value nil :explanation
  (array-elt 6
 (different-atoms
  (49 "#x31" "?1")
  (48 "#x30" "?0")
   FAILED  1/1  test-org-colview/columns-summary

Ran 1 tests, 0 results as expected, 1 unexpected (2016-07-26 05:03:52+0530)

1 unexpected results:
   FAILED  test-org-colview/columns-summary

mk/targets.mk:103: recipe for target 'test' failed
make: *** [test] Error 1

* Output of BTEST_RE=indented-cached-org-bracket-link make test

Test test-ob/indented-cached-org-bracket-link condition:
(ert-test-failed
 ((should
   (let
   (...)
 (org-test-with-temp-text "\n* Test\n  #+BEGIN_SRC emacs-lisp 
:file test.txt :cache yes\n(message \"test\")\n  #+END_SRC" ... ...)))
  :form
  (let
  ((default-directory temporary-file-directory))
(org-test-with-temp-text "\n* Test\n  #+BEGIN_SRC emacs-lisp 
:file test.txt :cache yes\n(message \"test\")\n  #+END_SRC"
  (org-babel-execute-src-block)
  (string= ... ...)))
  :value nil))
   FAILED  1/1  test-ob/indented-cached-org-bracket-link

Ran 1 tests, 0 results as expected, 1 unexpected (2016-07-26 05:06:12+0530)

1 unexpected results:
   FAILED  test-ob/indented-cached-org-bracket-link

* (org-parse-time-string "<2014-03-04 Tue>”)
(apply #'encode-time (org-parse-time-string "<2014-03-04 Tue>"))

Evaluating these in emacs does not seem to do anything. No message.

> 
> What is the result of evaluating both
> 
>  (org-parse-time-string "<2014-03-04 Tue>")
> 
> and
> 
>  (apply #'encode-time (org-parse-time-string "<2014-03-04 Tue>"))
> 
> ?
> 
> Regards,




Re: [O] Feature request: enable toggling of \centering in Latex figure export

2016-07-25 Thread Nicolas Goaziou
Hello,

Spencer Hill  writes:

> MWE:
> #+CAPTION: Figure caption.
> [[file:figure01.pdf]]
>
> Issue:
> When an image is exported to LaTeX as a float, the \centering command
> is hard-coded into the export: see org-latex--inline-image in
> ox-latex.el. This is not the case for tables, for which centering can
> be toggled via #+ATTR_LATEX: centering t. I would like for this same
> centering option to be made available for figure floats also.
>
> Motivation:
> I am attempting to render a .tex file for an article submission to a journal, 
> and the publisher requires the figures to be left-aligned.
>
> It seems like a simple enough patch, but I have 0 elisp experience so
> wouldn't be the person for the job.  Or let me know if I'm missing
> something.  Thanks!

Done in development branch. Please test it and report anything wrong.

Regards,

-- 
Nicolas Goaziou



Re: [O] pagebreak

2016-07-25 Thread Nick Dokos
Uwe Brauer  writes:

 "Robert" == Robert Klein  writes:
>
>> Hi,
>> On Mon, 25 Jul 2016 18:59:46 +
>> Uwe Brauer  wrote:
>
>>> Hi
>>> 
>>> I would like to write an org document export it to odt, and break
>>> pages manually. How can I achieve that?
>>> 
>
>> #+ODT: 
>
>> See http://orgmode.org/manual/Creating-one_002doff-styles.html in the
>> manual.
>
> Yeah, thanks, I found that solution too, but it does *not* work, here are two
> example files.
>
>
> * This is the header
>
> First page:
>
> #+ODT: 
>
> * This is a header
>
> Second page
>

Did you add the PageBreak style (mentioned in the hint on the above
page) to your styles.xml? Check the value of org-odt-styles-dir for
where that file is read from.

-- 
Nick




Re: [O] pagebreak

2016-07-25 Thread Uwe Brauer
>>> "Robert" == Robert Klein  writes:

   > Hi,
   > On Mon, 25 Jul 2016 18:59:46 +
   > Uwe Brauer  wrote:

   >> Hi
   >> 
   >> I would like to write an org document export it to odt, and break
   >> pages manually. How can I achieve that?
   >> 

   > #+ODT: 

   > See http://orgmode.org/manual/Creating-one_002doff-styles.html in the
   > manual.

Yeah, thanks, I found that solution too, but it does *not* work, here are two
example files.



page.odt
Description: application/vnd.oasis.opendocument.text
* This is the header

First page:

#+ODT: 

* This is a header

Second page


Re: [O] Patch: default CSS class for SVG images in HTML export

2016-07-25 Thread Nicolas Goaziou
Hello,

Jarmo Hurri  writes:

> Ok, here is trial number 2, with patch and test files. The test file
> shows multiple use cases.
>
> Just let me know if something in this still needs fixing.

It looks great. Thank you.

Would you mind providing an entry in ORG-NEWS for that change? It can go
in Version 9.0 > New features > Export. No need for a commit
message for this.


Regards,

-- 
Nicolas Goaziou



Re: [O] [BUG] External unicode links without a description in ox-html

2016-07-25 Thread Michael Brand
Hi Nicolas

Your suggestions are so convincing in going so far, I hope I
understand them right. If yes it is just thinking in terms of "[[",
"][" and "]]" instead of single brackets that I got used to with the
current escaping and unescaping in Org.

On Mon, Jul 25, 2016 at 2:52 PM, Nicolas Goaziou  wrote:

> Michael Brand  writes:

>> There seems to be a related issue with an inconsistency between HTML
>> and other export formats in using org-link-unescape for the link
>> _destination_ part: With the Org file
>>
>> 1) https://duckduckgo.com/?q=Org+mode+%252B+Worg
>> 2) https://duckduckgo.com/?q=Org+mode+%2B+Worg
>>
>> org-open-at-point on link 1) opens a web browser with the search field
>> filled with "Org mode + Worg" as expected by me.
>
> This looks like an error to me.
>
> If I type https://duckduckgo.com/?q=Org+mode+%252B+Worg in my browser,
> I get
>
>   "Org mode %2B Worg"
>
> as the search string. It should be the same when opening the link from
> an Org document. These URI are /not/ equivalent.
>
>> The same happens when using link 1) of the HTML export. But when
>> exporting to PDF (via LaTeX), ODT or ASCII (browse-url-at-point)
>> I have to use link 2) to get the same result. I think one should be
>> able to consistently use link 1) for all export formats.
>
> It looks as we're trying to paper over an Org problem here, which is the
> redundant link escaping that happens when calling `org-insert-link' (C-c
> C-l).
>
> AFAICT, there are two reasons for Org to escape a link: when the link
> contains either "]]" or multiple consecutive spaces. The former
> obviously breaks Org link syntax. The latter doesn't survive a call to
> `fill-paragraph'.
>
> Alas, Org handles it the wrong way, by using a mechanism that cannot be
> properly undone; you cannot possibly know how many times the desired URI
> has been encoded, if at all. Moreover, this mechanism isn't user
> friendly, i.e., you cannot reasonably ask a user to encode an URI on the
> fly when jolting notes.

I agree.

> I can see two ways out:
>
> 1. Do not escape anything.
>
>This prevent any link with a description to contain either "]]" or

... a single bracket at the border or a link destination part to
contain "][" or "]]" or a single bracket at the border or ...

>multiple spaces, but these requirements are so uncommon we probably
>shouldn't bother.

I never had such links and don't bother. If I am right these could
even be tweaked manually with %20, %5B and %5D to get working.

I can't tell for everyone but would happily adapt the escaped ones of
all my existing Org links accordingly if such a change happens in Org.

> 2. Use a different internal escape mechanism.
>
>By providing our own simple escape mechanism, e.g., \]\], we can
>solve the issues raised above.

In my opinion not necessary. Can be added later if really needed
anyway.

> In any case, Org should not create something as
>
>   https://duckduckgo.com/?q=Org+mode+%252B+Worg
>
> if the real URI is
>
>   https://duckduckgo.com/?q=Org+mode+%2B+Worg
>
> WDYT?

I agree.

Do I understand right that not escaping and unescaping would allow

:   https://duckduckgo.com/?q=[dest]dest
: [[https://duckduckgo.com/?q=[dest]dest]]
: [[https://duckduckgo.com/?q=[dest]dest][desc[desc]desc]]

etc. and even the same with link abbreviations instead of http(s)?

Michael



Re: [O] proposed modification of org-display-inline-images

2016-07-25 Thread Fabrice Popineau
2016-07-25 14:18 GMT+02:00 John Kitchin :

> Rasmus writes:
>
> > Hi,
> >
> > Thanks for the proposal.
> >
> > John Kitchin  writes:
> >
> >> I would like to propose a change to org-display-inline-images so it can
> >> rescale images even if imagemagick is not built in to emacs. There is
> >> currently no way to rescale images when they are displayed in that case
> >> AFAICS. This is particularly a problem on Windows, as we have never
> >> found a binary linked to imagemagick for that platform.
>

I have built one for the current 25.1-RC1 thanks to a patch found on Github.

https://gist.github.com/rzl24ozi/69c54eb86974fa1cbea1

Unfortunately, the patch is for ImageMagick v6.
I use MSYS2+MingW64 and this distribution has upgraded ImageMagick to v7.0
I had to patch the patch and emacs, because Emacs is not yet ready for this
new version
of ImageMagick.

For those who want to try it:
http://semantic.supelec.fr/Software/downloads/emacs-25.1-rc1-w64.zip
The zip holds a full blown Emacs 25.1 (GnuTLS, all graphic libraries, etc.).

Fabrice


Re: [O] pagebreak

2016-07-25 Thread Robert Klein
Hi,

On Mon, 25 Jul 2016 18:59:46 +
Uwe Brauer  wrote:

> Hi
> 
> I would like to write an org document export it to odt, and break
> pages manually. How can I achieve that?
> 

#+ODT: 

See http://orgmode.org/manual/Creating-one_002doff-styles.html in the
manual.

Best regards
Robert




[O] verse (was: orgmode aquivalent of hfill?)

2016-07-25 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer  writes:

> Hi
> I am currently writing an org document which I would like later to
> convert to odt.

> Moreover I want to have a structure, which in latex would look like this

> My name \hfill You name.

> So on the left margin is on element and on the right margin another with
> a variable empty space between them. Can I do something like this using
> the org syntax?

It seems that the verse environment does what I want, it is however
exported in a ugly font (type writer), how can I change that font.

regards

Uwe Brauer




[O] pagebreak

2016-07-25 Thread Uwe Brauer


Hi

I would like to write an org document export it to odt, and break pages
manually. How can I achieve that?

thanks

Uwe Brauer 




Re: [O] Patch: default CSS class for SVG images in HTML export

2016-07-25 Thread Jarmo Hurri

Ok, here is trial number 2, with patch and test files. The test file
shows multiple use cases.

Just let me know if something in this still needs fixing.

Jarmo

PS. org-combine-plists is a cool function
PPS. I just amended the commit of my first trial, that's why the
 timestamp is still from this morning.

>From 0cb1fd2f3507c7d5db060ba62711896698a5f67c Mon Sep 17 00:00:00 2001
From: Jarmo Hurri 
Date: Mon, 25 Jul 2016 08:25:58 +0300
Subject: [PATCH] lisp/ox-html.el: Provide a default CSS class for embedded SVG
 images

* lisp/ox-html.el (org-html--svg-image): Set CSS class of embedded SVG
images to be org-svg if no other class is set in attributes.
org-html-style-default: Provide default properties for new CSS class.

* doc/org.texi (CSS support): Documentation of default CSS class
org-svg for SVG images embedded into exported HTML.
---
 doc/org.texi|  1 +
 lisp/ox-html.el | 31 +++
 2 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 1c3868c..68b3c69 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -11750,6 +11750,7 @@ div.footnotes   @r{footnote section headline}
 p.footnote  @r{footnote definition paragraph, containing a footnote}
 .footref@r{a footnote reference number (always a )}
 .footnum@r{footnote number in footnote definition (always )}
+.org-svg@r{default class for a linked @file{.svg} image}
 @end example
 
 @vindex org-html-style-default
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index ce4694d..456a236 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -440,6 +440,7 @@ for the JavaScript code in this tag.
 { font-size: 10px; font-weight: bold; white-space: nowrap; }
   .org-info-js_search-highlight
 { background-color: #00; color: #00; font-weight: bold; }
+  .org-svg { width: 90%; }
   /*]]>*/-->
 "
   "The default style specification for exported HTML files.
@@ -1628,21 +1629,27 @@ a communication channel."
  info)))
 
 (defun org-html--svg-image (source attributes info)
-  "Return \"object\" appropriate for embedding svg file SOURCE
-with assoicated ATTRIBUTES. INFO is a plist used as a
-communication channel.
+  "Return \"object\" embedding svg file SOURCE with given ATTRIBUTES. 
+INFO is a plist used as a communication channel.
 
-The special attribute \"fallback\" can be used to specify a fallback
-image file to use if the object embedding is not supported."
+The special attribute \"fallback\" can be used to specify a
+fallback image file to use if the object embedding is not
+supported.  CSS class \"org-svg\" is assigned as the class of the
+object unless a different class is specified with an attribute."
   (let ((fallback (plist-get attributes :fallback))
 	(attrs (org-html--make-attribute-string
-		(plist-put attributes :fallback nil
-  (format "\n%s"
-	  source attrs
-	  (if fallback
-	  (org-html-close-tag
-	   "img" (format "src=\"%s\" %s" fallback attrs) info)
-	"Sorry, your browser does not support SVG."
+		(org-combine-plists
+ ;; Remove fallback attribute, which is not meant to
+ ;; appear directly in the attributes string, and
+ ;; provide a default class if none is set.
+ '(:class "org-svg") attributes '(:fallback nil)
+(format "\n%s"
+	source
+	attrs
+	(if fallback
+		(org-html-close-tag
+		 "img" (format "src=\"%s\" %s" fallback attrs) info)
+	  "Sorry, your browser does not support SVG."
 
 (defun org-html--textarea-block (element)
   "Transcode ELEMENT into a textarea block.
-- 
2.4.11

#+HTML_HEAD_EXTRA:  .my-svg-class { width: 30vw; } 

* styling with default class
  #+BEGIN_SRC asymptote :file svg-image.svg
size (1cm, 0);
fill (unitsquare, red);
  #+END_SRC

  #+RESULTS:
  [[file:svg-image.svg]]

* styling with class specified with attribute

  #+ATTR_HTML: :class my-svg-class
  [[file:svg-image.svg]]

* going back to default class
  [[file:svg-image.svg]]
* case where class id nil (no CSS class)
  #+ATTR_HTML: :class nil
  [[file:svg-image.svg]]


Re: [O] Babel CALL no longer produces HTML output

2016-07-25 Thread Thomas S. Dye
Aloha,

Nicolas Goaziou writes:

> Hello,
>
> "Thomas S. Dye"  writes:
>
>> Nicolas Goaziou writes:
>>
>>> You may want to add (:eval . "yes") to
>>> `org-babel-default-lob-header-args' if you disagree.
>>
>> Perhaps this should be added to the default value of
>> org-babel-default-lob-header-args for the sake of legacy code?
>
> I don't think so, for three reasons:
>
> 1. `org-babel-default-lob-header-args' didn't include this association 
> previously;
>
> 2. unlike to :exports, there is no obvious default value for the :eval
>argument; the expected default value would be to unset :eval, which
>requires another mechanism;
>
> 3. I think it is dangerous to assume and Babel call can be evaled, even if
>the original source block cannot; after all, the user explicitly
>marked the original code block with ":eval no" for a reason.
>
> WDYT?

I agree with the logic behind the changes.  My suggestion is intended to
keep legacy code functioning as it did when it was written, that's all.

All the best,
Tom

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



[O] orgmode aquivalent of hfill?

2016-07-25 Thread Uwe Brauer
Hi

I am currently writing an org document which I would like later to
convert to odt.

Moreover I want to have a structure, which in latex would look like this

My name \hfill You name.

So on the left margin is on element and on the right margin another with
a variable empty space between them. Can I do something like this using
the org syntax?

thanks

Uwe Brauer 



Re: [O] Babel CALL no longer produces HTML output

2016-07-25 Thread Charles C. Berry

On Mon, 25 Jul 2016, Nicolas Goaziou wrote:


Hello,

"Thomas S. Dye"  writes:


Nicolas Goaziou writes:


You may want to add (:eval . "yes") to
`org-babel-default-lob-header-args' if you disagree.


Perhaps this should be added to the default value of
org-babel-default-lob-header-args for the sake of legacy code?


I don't think so, for three reasons:

1. `org-babel-default-lob-header-args' didn't include this association 
previously;

2. unlike to :exports, there is no obvious default value for the :eval
  argument; the expected default value would be to unset :eval, which
  requires another mechanism;

3. I think it is dangerous to assume and Babel call can be evaled, even if
  the original source block cannot; after all, the user explicitly
  marked the original code block with ":eval no" for a reason.



Fair enough.

I can think of reasons why a user would want to do this, but the current 
setup accomodates those pretty well.


Chuck



Re: [O] error while upgrading to 8.3.5

2016-07-25 Thread Nicolas Goaziou
Vikas Rawal  writes:

> This is what I get:
>
> Test test-org-colview/columns-summary backtrace:
>   (if (unwind-protect (setq value-2 (apply fn-0 args-1)) (
>   (let (form-description-4) (if (unwind-protect (setq value-2
>   (let ((value-2 (quote ert-form-evaluation-aborted-3))) (let
>   (let ((fn-0 (function equal)) (args-1 (list "705d 01h 0m 0s"
>   (closure (t) nil (let ((fn-44355 (function equal)) (args-44356 (list
>   #[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\317\320%DC
>   funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\31
>   ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
>   #[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\316%DC\2
>   funcall(#[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\
>   ert-run-test([cl-struct-ert-test test-org-colview/columns-summary "T
>   ert-run-or-rerun-test([cl-struct-ert--stats "columns-summary" [[cl-s
>   ert-run-tests("columns-summary" #[385 "\306\307\"\203D\211\211G\31
>   ert-run-tests-batch("columns-summary")
>   ert-run-tests-batch-and-exit("columns-summary")
>   (let ((org-id-track-globally t) (org-test-selector (if org-test-sele
>   org-test-run-batch-tests("columns-summary")
>   eval((org-test-run-batch-tests org-test-select-re))
>   command-line-1(("--eval" "(setq vc-handled-backends nil org-startup-
>   command-line()
>   normal-top-level()
> Test test-org-colview/columns-summary condition:
> (ert-test-failed
>  ((should
>(equal "705d 01h 0m 0s"
> (cl-letf ... ...)))
>   :form
>   (equal "705d 01h 0m 0s" "705d 00h 0m 0s")
>   :value nil :explanation
>   (array-elt 6
>(different-atoms
> (49 "#x31" "?1")
> (48 "#x30" "?0")
>FAILED  1/1  test-org-colview/columns-summary

What is the result of evaluating both

  (org-parse-time-string "<2014-03-04 Tue>")

and

  (apply #'encode-time (org-parse-time-string "<2014-03-04 Tue>"))

?

Regards,



Re: [O] Fix org-clock compilation on emacs 24.x

2016-07-25 Thread Kaushal Modi
Please ignore.

It got fixed 10 minutes back :)
-- 

Kaushal Modi


[O] Fix org-clock compilation on emacs 24.x

2016-07-25 Thread Kaushal Modi
Hi all,

I have a script that builds org individually for different emacs version.

I noticed just today that the build is failing for emacs 24.5.

=
make compile-dirall
 dirall 
make[2]: Entering directory `/home/kmodi/.emacs.d/elisp/org-mode/lisp'
Checking /home/kmodi/.emacs.d/elisp/org-mode/lisp...
Compiling /home/kmodi/.emacs.d/elisp/org-mode/lisp/org-install.el...
Compiling /home/kmodi/.emacs.d/elisp/org-mode/lisp/org-loaddefs.el...
Compiling /home/kmodi/.emacs.d/elisp/org-mode/lisp/org-timer.el...

In toplevel form:
org-timer.el:38:1:Error: Symbol's function definition is void: incf
Compiling /home/kmodi/.emacs.d/elisp/org-mode/lisp/org-version.el...
Done (Total of 0 files compiled, 1 failed, 118 skipped)
make[2]: Leaving directory `/home/kmodi/.emacs.d/elisp/org-mode/lisp'
if [ ! -d /home/kmodi/usr_local/apps/6/emacs/24/share/emacs/site-lisp/org ]
; then \
  install -m 755 -d
/home/kmodi/usr_local/apps/6/emacs/24/share/emacs/site-lisp/org ; \
fi ;
install -m 644 -p 
/home/kmodi/usr_local/apps/6/emacs/24/share/emacs/site-lisp/org
install: cannot stat `org-timer.elc': No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/kmodi/.emacs.d/elisp/org-mode/lisp'
make: *** [install-lisp] Error 2
=

Below minor patch fixes that issue:

>From 0b9c1b4a6cac2eec6f1ea5ff3a123fa7d8e3fc25 Mon Sep 17 00:00:00 2001
From: Kaushal Modi 
Date: Mon, 25 Jul 2016 11:18:51 -0400
Subject: [PATCH] Use cl-incf instead of incf

* org-clock.el (org-clock--oldest-date): Use the correct macro from
  `cl-lib' library.
---
 lisp/org-clock.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 03e6a2c..fcc20e0 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -465,7 +465,7 @@ to add an effort property.")
   (let* ((dichotomy
   (lambda (min max pred)
 (if (funcall pred min) min
-  (incf min)
+  (cl-incf min)
   (while (> (- max min) 1)
  (let ((mean (+ (ash min -1) (ash max -1) (logand min max 1
   (if (funcall pred mean) (setq max mean) (setq min mean)
-- 
2.9.2

-- 

Kaushal Modi


Re: [O] pgfplots and tikz break LaTeX inline overlay colors

2016-07-25 Thread Ulrich J. Herter
Hi Eric,

thanks for the reply.

Am Montag, den 25.07.2016, 15:38 +0100 schrieb Eric S Fraga:
> 
> #+begin_src emacs-lisp :results none
>   (setq org-format-latex-options '(:foreground "white" :background
> "black" :scale 3 :html-foreground "Black" :html-background
> "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\("
> "\\["))
> org-latex-create-formula-image-program 'imagemagick
> org-tree-slide-heading-emphasis t
> )
> #+end_src
> 
Well, thats what I tried first. It didn't have any effect when the
pgfplots and tikz packages were loaded. Something seems to overwrite
the font color, I assume.

Regards
Uli



Re: [O] pgfplots and tikz break LaTeX inline overlay colors

2016-07-25 Thread Ulrich J. Herter
Hi Nicolas,

sorry for the previous mail, somehow I lost the formatting.

Am Montag, den 25.07.2016, 15:07 +0200 schrieb Nicolas Goaziou:
> "Ulrich J. Herter"  writes:
> 
> > 
> > When using pgfplots and tikz LaTeX packages for graphics in a
> > document, the colouring of LaTeX overlays in org-mode is broken.
> > The
> > font colour of snippets is always black, super hard to read in on a
> > dark colour scheme. See attached images.
> > 
> > Steps to reproduce:
> > - Do C-c C-x C-l on one of the formulas.
> > - When pgfplots or tikz is loaded, the :foreground setting in
> > org-format-latex-options is ignored...
> > 
> > Any help with that would be much appreciated!
> 
> I cannot reproduce it in development version, where formula display
> mechanism was rewritten recently.
> 
> Could you update Org and try again?
> 
I'm sorry, but I'm still getting this error in release_8.3.5-1000-
g9d3a4a.dirty (installed from Arch linux AUR), I attached a screenshot.
Could it be something with my config? The striped .emacs along with the
examples below.


Thanks and regards
Uli


.emacs---8<
(require 'org-install)

(custom-set-variables
 '(custom-enabled-themes (quote (tsdh-dark

(require 'org)
(require 'ox-latex)

(add-hook 'org-mode-hook 'turn-on-org-cdlatex)
(setq org-latex-create-formula-image-program 'dvipng)
(setq org-highlight-latex-and-related '(latex script entities))
(plist-put org-format-latex-options :scale 3)

(add-to-list 'org-latex-default-packages-alist '("" "caption" nil))
(add-to-list 'org-latex-packages-alist '("" "parskip" nil))
(add-to-list 'org-latex-packages-alist '("" "xcolor" nil))
(add-to-list 'org-latex-packages-alist '("" "siunitx" t))
(add-to-list 'org-latex-packages-alist '("" "minted" nil)) ; Code
listings
(setq org-latex-listings 'minted)
(setq org-latex-minted-options
  '(("frame" "lines") ("linenos=true") ("stepnumber" "5")
("framesep" "6pt")
("mathescape" "true") ("fontsize" "\\footnotesize")))

(add-to-list 'org-latex-classes
  '("koma-article"
 "\\documentclass{scrartcl}"
 ("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
 ("\\paragraph{%s}" . "\\paragraph*{%s}")
 ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
.emacs--->8


example1.org---8<--
# #+LATEX_HEADER: \usepackage{pgfplots,tikz}
$$(a+b)^2=a^2+2ab+b^2$$
example1.org--->8--

example2.org---8<--
#+LATEX_HEADER: \usepackage{pgfplots,tikz}
$$a^2+b^2=c^2$$
example2.org--->8--

Re: [O] pgfplots and tikz break LaTeX inline overlay colors

2016-07-25 Thread Eric S Fraga
Ulrich,

I may be completely off-base here but there are settings for controlling
what the LaTeX snippets look like and these may affect your case.  I
used to use the following when I had emacs with a dark background:

#+begin_src emacs-lisp :results none
  (setq org-format-latex-options '(:foreground "white" :background "black" 
:scale 3 :html-foreground "Black" :html-background "Transparent" :html-scale 
1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))
org-latex-create-formula-image-program 'imagemagick
org-tree-slide-heading-emphasis t
)
#+end_src

Maybe play with these, specifically the first line?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.4-1049-g481709



Re: [O] pgfplots and tikz break LaTeX inline overlay colors

2016-07-25 Thread Ulrich J. Herter
Hi Nicolas,

thanks for looking into this!

Am Montag, den 25.07.2016, 15:07 +0200 schrieb Nicolas Goaziou:
"Ulrich J. Herter"  writes:

When using pgfplots and tikz LaTeX packages for graphics in a
document, the colouring of LaTeX overlays in org-mode is broken.
The
font colour of snippets is always black, super hard to read in on a
dark colour scheme. See attached images.

Steps to reproduce:
- Do C-c C-x C-l on one of the formulas.
- When pgfplots or tikz is loaded, the :foreground setting in
org-format-latex-options is ignored...

Any help with that would be much appreciated!

I cannot reproduce it in development version, where formula display
mechanism was rewritten recently.

Could you update Org and try again?

I'm sorry, but I'm still getting this error in release_8.3.5-1000-
g9d3a4a.dirty (installed from Arch linux AUR), I attached a screenshot.
Could it be something with my config? The striped .emacs along with the
examples below.

.emacs---8<
(require 'org-install)

(custom-set-variables
 '(custom-enabled-themes (quote (tsdh-dark

(require 'org)
(require 'ox-latex)

(add-hook 'org-mode-hook 'turn-on-org-cdlatex)
(setq org-latex-create-formula-image-program 'dvipng)
(setq org-highlight-latex-and-related '(latex script entities))
(plist-put org-format-latex-options :scale 3)

(add-to-list 'org-latex-default-packages-alist '("" "caption" nil))
(add-to-list 'org-latex-packages-alist '("" "parskip" nil))
(add-to-list 'org-latex-packages-alist '("" "xcolor" nil))
(add-to-list 'org-latex-packages-alist '("" "siunitx" t))
(add-to-list 'org-latex-packages-alist '("" "minted" nil)) ; Code
listings
(setq org-latex-listings 'minted)
(setq org-latex-minted-options
  '(("frame" "lines") ("linenos=true") ("stepnumber" "5")
("framesep" "6pt")
("mathescape" "true") ("fontsize" "\\footnotesize")))

(add-to-list 'org-latex-classes
  '("koma-article"
 "\\documentclass{scrartcl}"
 ("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
 ("\\paragraph{%s}" . "\\paragraph*{%s}")
 ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
.emacs--->8


example1.org---8<--
# #+LATEX_HEADER: \usepackage{pgfplots,tikz}
$$(a+b)^2=a^2+2ab+b^2$$

example1.org--->8--

example2.org---8<--
#+LATEX_HEADER: \usepackage{pgfplots,tikz}
$$a^2+b^2=c^2$$
example2.org--->8--


Thanks and regards
Uli

Re: [O] error while upgrading to 8.3.5

2016-07-25 Thread Vikas Rawal
> 
>> I did the usual "make up2" in my git repository but got the following
>> error (just pasting the tail of the log):
> 
> Note that "make up2" doesn't upgrade to 8.3.5, as subject suggests, but
> moves to the head of the development version, i.e., something like
> 9.0-alpha.

hmm. Let me deal with that once I figure out what is wrong with “make up2”.

>> 
>> What do I do? Re-install?
> 
> Could you run the failing test again using, e.g.,
> 
>  BTEST_RE=columns-summary make test
> 
> and paste the exact failure?

This is what I get:

Test test-org-colview/columns-summary backtrace:
  (if (unwind-protect (setq value-2 (apply fn-0 args-1)) (
  (let (form-description-4) (if (unwind-protect (setq value-2
  (let ((value-2 (quote ert-form-evaluation-aborted-3))) (let
  (let ((fn-0 (function equal)) (args-1 (list "705d 01h 0m 0s"
  (closure (t) nil (let ((fn-44355 (function equal)) (args-44356 (list
  #[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\317\320%DC
  funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\31
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  #[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\316%DC\2
  funcall(#[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\
  ert-run-test([cl-struct-ert-test test-org-colview/columns-summary "T
  ert-run-or-rerun-test([cl-struct-ert--stats "columns-summary" [[cl-s
  ert-run-tests("columns-summary" #[385 "\306\307\"\203D\211\211G\31
  ert-run-tests-batch("columns-summary")
  ert-run-tests-batch-and-exit("columns-summary")
  (let ((org-id-track-globally t) (org-test-selector (if org-test-sele
  org-test-run-batch-tests("columns-summary")
  eval((org-test-run-batch-tests org-test-select-re))
  command-line-1(("--eval" "(setq vc-handled-backends nil org-startup-
  command-line()
  normal-top-level()
Test test-org-colview/columns-summary condition:
(ert-test-failed
 ((should
   (equal "705d 01h 0m 0s"
  (cl-letf ... ...)))
  :form
  (equal "705d 01h 0m 0s" "705d 00h 0m 0s")
  :value nil :explanation
  (array-elt 6
 (different-atoms
  (49 "#x31" "?1")
  (48 "#x30" "?0")
   FAILED  1/1  test-org-colview/columns-summary

Ran 1 tests, 0 results as expected, 1 unexpected (2016-07-25 18:37:21+0530)


Re: [O] pgfplots and tikz break LaTeX inline overlay colors

2016-07-25 Thread Nicolas Goaziou
Hello,

"Ulrich J. Herter"  writes:

> When using pgfplots and tikz LaTeX packages for graphics in a
> document, the colouring of LaTeX overlays in org-mode is broken. The
> font colour of snippets is always black, super hard to read in on a
> dark colour scheme. See attached images.
>
> Steps to reproduce:
> - Do C-c C-x C-l on one of the formulas.
> - When pgfplots or tikz is loaded, the :foreground setting in
> org-format-latex-options is ignored...
>
> Any help with that would be much appreciated!

I cannot reproduce it in development version, where formula display
mechanism was rewritten recently.

Could you update Org and try again?

Regards,

-- 
Nicolas Goaziou



Re: [O] [BUG] External unicode links without a description in ox-html

2016-07-25 Thread Nicolas Goaziou
Hello,

Michael Brand  writes:

> There seems to be a related issue with an inconsistency between HTML
> and other export formats in using org-link-unescape for the link
> _destination_ part: With the Org file
>
> 1) https://duckduckgo.com/?q=Org+mode+%252B+Worg
> 2) https://duckduckgo.com/?q=Org+mode+%2B+Worg
>
> org-open-at-point on link 1) opens a web browser with the search field
> filled with "Org mode + Worg" as expected by me.

This looks like an error to me. 

If I type https://duckduckgo.com/?q=Org+mode+%252B+Worg in my browser,
I get

  "Org mode %2B Worg"

as the search string. It should be the same when opening the link from
an Org document. These URI are /not/ equivalent.

> The same happens when using link 1) of the HTML export. But when
> exporting to PDF (via LaTeX), ODT or ASCII (browse-url-at-point)
> I have to use link 2) to get the same result. I think one should be
> able to consistently use link 1) for all export formats.

It looks as we're trying to paper over an Org problem here, which is the
redundant link escaping that happens when calling `org-insert-link' (C-c
C-l).

AFAICT, there are two reasons for Org to escape a link: when the link
contains either "]]" or multiple consecutive spaces. The former
obviously breaks Org link syntax. The latter doesn't survive a call to
`fill-paragraph'.

Alas, Org handles it the wrong way, by using a mechanism that cannot be
properly undone; you cannot possibly know how many times the desired URI
has been encoded, if at all. Moreover, this mechanism isn't user
friendly, i.e., you cannot reasonably ask a user to encode an URI on the
fly when jolting notes.

I can see two ways out:

1. Do not escape anything. 

   This prevent any link with a description to contain either "]]" or
   multiple spaces, but these requirements are so uncommon we probably
   shouldn't bother.

2. Use a different internal escape mechanism.

   By providing our own simple escape mechanism, e.g., \]\], we can
   solve the issues raised above.

In any case, Org should not create something as

  https://duckduckgo.com/?q=Org+mode+%252B+Worg

if the real URI is

  https://duckduckgo.com/?q=Org+mode+%2B+Worg

WDYT?


Regards,

-- 
Nicolas Goaziou



Re: [O] proposed modification of org-display-inline-images

2016-07-25 Thread John Kitchin

Rasmus writes:

> Hi,
>
> Thanks for the proposal.
>
> John Kitchin  writes:
>
>> I would like to propose a change to org-display-inline-images so it can
>> rescale images even if imagemagick is not built in to emacs. There is
>> currently no way to rescale images when they are displayed in that case
>> AFAICS. This is particularly a problem on Windows, as we have never
>> found a binary linked to imagemagick for that platform.
>
> This sounds like an Emacs problem.  There was some talk about the
> rescaling issue here:
>
> http://thread.gmane.org/gmane.emacs.devel/174318/
>
> And maybe here:
>
> http://thread.gmane.org/gmane.emacs.devel/200568/focus=203024

It is related to those two issues, especially on Windows. AFAICS, there
is still no resolution on those. But it is also an issue in org-mode,
because we create overlay images to display them inline.

>
>> I propose we define a new customizable variable called something like
>> org-inline-image-resize-function, and a function that takes a filename
>> and the resize options, and returns a path to a resized function (in the
>> temporary directory). The variable isn't technically necessary, but if
>> someone wanted to use an alternative function, it would enable it.
>>
>> This function would use the "convert" program from imagemagick to do the
>> resizing.  This program can be installed independently on all the
>> platforms I think.
>
> Why limit this to Org?  A solution should be implemented in image.el.

It doesn't need to be limited to org. image.el seems solely focused on
compiled in image libraries. There isn't anything in there that uses an
external executable that I can see. 

I am not opposed to fixing this in emacs, but I need a solution sooner
than that is likely to happen. I will have 45 students in August with
Windows laptops using org-mode in Emacs in a class ;)

>
>> Since this is just for display in org, I suggest that we use a syntax like:
>>
>> #+attr_org: :resize resize-options
>> [[./file.png]]
>>
>> the resize-options could be anything here:
>> http://www.imagemagick.org/script/command-line-processing.php#geometry
>>
>> It would enable things like:
>>
>> reduce size by 50%
>> #+attr_org: :resize 50%
>>
>> set width to 300, preserving aspect ratio
>> #+attr_org: :resize 300
>>
>> set height to 200, and preserve aspect ratio
>> #+attr_org: :resize x200
>>
>> set size to 200x300 and change aspect ratio
>> #+attr_org: :resize 200x300!
>>
>> Any thoughts on this proposal?
>
> This is misusing attr_org, isn’t it?  Don’t particularly care for this
> "API"...  All is IMO, of course.

We already misuse this api with inline scaling and :width, but the
current implmentation is tricky and uses a regexp to find the first line
containing #+attr_... :width ...

and uses it. So you have to make sure the one that scales the inline
image comes first, and the number has to be in pixels I think.

e.g. on emacs with imagemagick, this will get resized into a 2 pixel
wide image that is nearly invisible.

#+attr_latex: :width 2in
[[./file.png]]

While this will get rescaled to a width of 200.

#+attr_html: :width 200
#+attr_latex: :width 2in
[[./file.png]]

The order matters. I don't mind the attr_org syntax, as it affects
something like a real-time export of org for my eyes. I am open to
something else too though, e.g. attr_display? Preferrably something that
would show up in the plist of the paragraph containing the caption and
attributes. Thoughts?

>
> Rasmus


-- 
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] org-info

2016-07-25 Thread Nicolas Goaziou
Hello,

phillip.l...@russet.org.uk (Phillip Lord) writes:

> Firstly, it's currently available and is linked into generated HTML at
> http://orgmode.org/org-info.js; this makes it non-functional when
> delivered via https.
>
> Secondly, in HTML generated by org mode, this license condition is
> added:
>
> * As additional permission under GNU GPL version 3 section 7, you
>  * may distribute non-source (e.g., minimized or compacted) forms of
>  * that code without the copy of the GNU GPL normally required by
>  * section 4, provided you include this license notice and a URL
>  * through which recipients can access the Corresponding Source.
>
> which is fine, except that by default, the URL doesn't appear to be
> added. There is this:
>
>   * @source: http://orgmode.org/org-info.js
>
> but that's not the source, but a minimized version.
>
> Is it possible to have an option for linking via https?

I think using https for orgmode.org is under consideration. Or do you
have another idea in mind?

> And have a link to the actual source added?

The "Corresponding Source" is at

  http://orgmode.org/worg/code/org-info-js/org-info-src.js

Would you like to provide a patch to correct `org-html-infojs-template'?

Regards,

-- 
Nicolas Goaziou



Re: [O] mobileorg agendas.org has no entries [8.3.4 (8.3.4-elpa @ c:/Users/Michael/AppData/Roaming/.emacs.d/elpa/org-20160222/)]

2016-07-25 Thread Nicolas Goaziou
Hello,

Michael Ziems  writes:

> Hello Philip,
>
> thanks for the answer, but that did not help me, i believe.
> I went trough the org-mobile-push with the edebug, but i believe that
> i have to understand how another function that is in there works,
> maybe these:
>
> (let ((inhibit-redisplay t)
>   (org-agenda-files (mapcar 'car org-mobile-files-alist)))
>   (org-mobile-create-sumo-agenda))
>
> and i cannot start the debugger in the same way on them, as they are
> not startable via M-x.
>
>
> Does anybody have a clue, what could be the reason, why my agenda is
> normally created but the agendas.org is containing all my agenda view
> but without any headline (todo) in it?

What is the return value for `org-mobile-files-alist'?

What is your setup related to "org-mobile"?


Regards,

-- 
Nicolas Goaziou



Re: [O] orgmode & pdf-tools

2016-07-25 Thread Nicolas Goaziou
Hello,

Pablo S. Casas  writes:

>After edebugging org-open-file I found a possible solution. The
> documentation string for org-file-apps should be modified for the sexp
> case to use the link variable instead of file.
>
> #+BEGIN_SRC elisp
> (add-to-list 'org-file-apps '("\\.pdf\\'" . (org-pdfview-open link)))
> (add-to-list 'org-file-apps '("\\.pdf::\\(\\d+\\)\\'" . (org-pdfview-open 
> link)))
> #+END_SRC

I'm not sure about what the initial problem is, but there is no more
"sexp" case in `org-file-apps' in development version. You can use
a function instead.


Regards,

-- 
Nicolas Goaziou



Re: [O] proposed modification of org-display-inline-images

2016-07-25 Thread Rasmus
Hi,

Thanks for the proposal.

John Kitchin  writes:

> I would like to propose a change to org-display-inline-images so it can
> rescale images even if imagemagick is not built in to emacs. There is
> currently no way to rescale images when they are displayed in that case
> AFAICS. This is particularly a problem on Windows, as we have never
> found a binary linked to imagemagick for that platform.

This sounds like an Emacs problem.  There was some talk about the
rescaling issue here:

http://thread.gmane.org/gmane.emacs.devel/174318/

And maybe here:

http://thread.gmane.org/gmane.emacs.devel/200568/focus=203024

> I propose we define a new customizable variable called something like
> org-inline-image-resize-function, and a function that takes a filename
> and the resize options, and returns a path to a resized function (in the
> temporary directory). The variable isn't technically necessary, but if
> someone wanted to use an alternative function, it would enable it.
>
> This function would use the "convert" program from imagemagick to do the
> resizing.  This program can be installed independently on all the
> platforms I think.

Why limit this to Org?  A solution should be implemented in image.el.

> Since this is just for display in org, I suggest that we use a syntax like:
>
> #+attr_org: :resize resize-options
> [[./file.png]]
>
> the resize-options could be anything here:
> http://www.imagemagick.org/script/command-line-processing.php#geometry
>
> It would enable things like:
>
> reduce size by 50%
> #+attr_org: :resize 50%
>
> set width to 300, preserving aspect ratio
> #+attr_org: :resize 300
>
> set height to 200, and preserve aspect ratio
> #+attr_org: :resize x200
>
> set size to 200x300 and change aspect ratio
> #+attr_org: :resize 200x300!
>
> Any thoughts on this proposal?

This is misusing attr_org, isn’t it?  Don’t particularly care for this
"API"...  All is IMO, of course.

Rasmus

-- 
I almost cut my hair, it happened just the other day





Re: [O] Patch: default CSS class for SVG images in HTML export

2016-07-25 Thread Nicolas Goaziou
Hello,

Jarmo Hurri  writes:

> The attached patch
> - adds a default CSS class org-svg to SVG images embedded in exported
>   HTML if no other class is set for the image using attr_html
> - documents the existence of this class.

Thank you.

> If this patch is ok,

It looks so, barring minor issues suggested below.

> then what is missing are the default CSS settings for the new class
> org-svg in constant org-html-style-default. I simply did not know what
> to put there. The manual says that this constant has basic settings
> for _all_ defined CSS entities. Either defaults need to be set for the
> new class, or the text in the manual needs to be changed. Or we have
> to accept that the manual is not logically coherent. :-)

The Manual is the Truth!

What setting would equivalent to the current one?

> @@ -11750,6 +11750,7 @@ div.footnotes   @r{footnote section headline}
>  p.footnote  @r{footnote definition paragraph, containing a footnote}
>  .footref@r{a footnote reference number (always a )}
>  .footnum@r{footnote number in footnote definition (always )}
> +.org-svg@r{default class for a linked SVG image}

The manual would use @samp{svg}, but I think @file{.svg} would be more
accurate, per (info "(texinfo @file)").

>  (defun org-html--svg-image (source attributes info)
>"Return \"object\" appropriate for embedding svg file SOURCE
> -with assoicated ATTRIBUTES. INFO is a plist used as a
> +with associated ATTRIBUTES. INFO is a plist used as a
>  communication channel.

The docstring was incorrect before your patch; this is a good time to
fix it. In particular:

- first line must stand on its own, i.e., it must be one or more
  complete sentences;

- Sentences have to be separated with two spaces.

Could you reword it?

>  The special attribute \"fallback\" can be used to specify a fallback
> -image file to use if the object embedding is not supported."
> +image file to use if the object embedding is not supported.
> +
> +CSS class \"org-svg\" is assigned as the class of the object
> +unless a different class is specified with an attribute."
>(let ((fallback (plist-get attributes :fallback))
> + (css-class (plist-get attributes :class))
>   (attrs (org-html--make-attribute-string
>   (plist-put attributes :fallback nil
> -  (format "\n%s"
> -   source attrs
> +  (format "\n%s"
> +   source
> +   attrs
> +   (if css-class
> +   ""
> + "class=\"org-svg\"")

This would ignore ":class nil", which probably means no class at all.

You can do instead:

  (let ((fallback (plist-get attributes :fallback))
(attrs (org-html--make-attribute-string
(org-combine-plists
 ;; Remove fallback attribute, which is not meant to
 ;; appear directly in the attributes string, and
 ;; provide a default class if none is set.
 '(:class "org-class") attributes '(:fallback nil)
(format ...))
  

Regards,

-- 
Nicolas Goaziou



Re: [O] Patch: default CSS class for SVG images in HTML export

2016-07-25 Thread Christian Moe


Jarmo Hurri writes:

> If this patch is ok, then what is missing are the default CSS settings
> for the new class org-svg in constant org-html-style-default. I simply
> did not know what to put there. The manual says that this constant has
> basic settings for _all_ defined CSS entities. Either defaults need to
> be set for the new class, or the text in the manual needs to be
> changed. Or we have to accept that the manual is not logically
> coherent. :-)

Logically, no settings could be the default settings, couldn't they?
:-)

Perhaps a percentage width, maybe 80% or 90% to scale all SVGs to fit
neatly inside their container?

Yours,
Christian



Re: [O] error while upgrading to 8.3.5

2016-07-25 Thread Nicolas Goaziou
Hello,

Vikas Rawal  writes:

> I did the usual "make up2" in my git repository but got the following
> error (just pasting the tail of the log):

Note that "make up2" doesn't upgrade to 8.3.5, as subject suggests, but
moves to the head of the development version, i.e., something like
9.0-alpha.

> Ran 634 tests, 633 results as expected, 1 unexpected (2016-07-25 
> 06:07:28+0530)
> 7 expected failures
>
> 1 unexpected results:
>FAILED  test-org-colview/columns-summary
>
> mk/targets.mk:103: recipe for target 'test-dirty' failed
> make[1]: *** [test-dirty] Error 1
> make[1]: Leaving directory '/Users/vikas/.emacs.d/src/org-mode'
> mk/targets.mk:115: recipe for target 'up2' failed
> make: *** [up2] Error 2
>
> —
>
> What do I do? Re-install?

Could you run the failing test again using, e.g.,

  BTEST_RE=columns-summary make test

and paste the exact failure?

Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Babel CALL no longer produces HTML output

2016-07-25 Thread Nicolas Goaziou
Hello,

"Thomas S. Dye"  writes:

> Nicolas Goaziou writes:
>
>> You may want to add (:eval . "yes") to
>> `org-babel-default-lob-header-args' if you disagree.
>
> Perhaps this should be added to the default value of
> org-babel-default-lob-header-args for the sake of legacy code?

I don't think so, for three reasons:

1. `org-babel-default-lob-header-args' didn't include this association 
previously;

2. unlike to :exports, there is no obvious default value for the :eval
   argument; the expected default value would be to unset :eval, which
   requires another mechanism;
   
3. I think it is dangerous to assume and Babel call can be evaled, even if
   the original source block cannot; after all, the user explicitly
   marked the original code block with ":eval no" for a reason.

WDYT?


Regards,

-- 
Nicolas Goaziou



Re: [O] error while upgrading to 8.3.5

2016-07-25 Thread Colin Baxter
On Mon, Jul 25 2016, Vikas Rawal wrote:

> I did the usual "make up2" in my git repository but got the following
> error (just pasting the tail of the log):
>
> —
>
> Ran 634 tests, 633 results as expected, 1 unexpected (2016-07-25 
> 06:07:28+0530)
> 7 expected failures
>
> 1 unexpected results:
>FAILED  test-org-colview/columns-summary
>
> mk/targets.mk:103: recipe for target 'test-dirty' failed
> make[1]: *** [test-dirty] Error 1
> make[1]: Leaving directory '/Users/vikas/.emacs.d/src/org-mode'
> mk/targets.mk:115: recipe for target 'up2' failed
> make: *** [up2] Error 2
>
> —
>
> What do I do? Re-install?
>
> Vikas


Using Org-mode version 8.3.5 (release_8.3.5-998-g9930c4), I ran "make
test RET" and got the output:

Ran 640 tests, 640 results as expected (2016-07-25 06:50:07+0100)
6 expected failures

There looks to be something wrong therefore with your setup.

Best wishes,

Colin.



Re: [O] Babel CALL no longer produces HTML output

2016-07-25 Thread Thomas S. Dye
Aloha Nicolas,

Nicolas Goaziou writes:

> Hello,
>
> "Charles C. Berry"  writes:
>
>> On Sat, 23 Jul 2016, Nicolas Goaziou wrote:
>
>>> OTOH, inheriting :exports property may not be optimal. In particular,
>>> ":exports code" for a Babel call is probably nonsensical. Perhaps
>>> a solution would be to keep the current behaviour and make an exception
>>> for :exports, which would always be `results' for Babel calls.
>>>
>>> WDYT?
>>
>> I think that would work well enough.
>
> Funnily, that's what the previous evaluation process did.
>
> I was confused by the "default" part in
> `org-babel-default-lob-header-args'. I realize that this variable is no
> replacement for `org-babel-default-header-args'. It permits to override
> headers inherited from the source block instead.
>
> This is now fixed. I updated variable docstring accordingly.
>
>> Although I might quibble about what 'local' means here. If the src
>> block is under a headline called XYZ with a `header-args' property of
>> `:eval no' and the babel call is under headline ABC with no
>> header-args property, I think some would expect the default to take
>> precedence for calls under ABC over the property in XYZ.
>
> The point is that a Babel call without any header argument or node
> property defined at point of call should behave exactly as the src block
> being called (minus the :exports behaviour, per above).
>
> It seems logical to me that a source block that cannot be evaled cannot
> be, by default, called either.
>
> You may want to add (:eval . "yes") to
> `org-babel-default-lob-header-args' if you disagree.

Perhaps this should be added to the default value of
org-babel-default-lob-header-args for the sake of legacy code?

All the best,
Tom

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



Re: [O] Babel CALL no longer produces HTML output

2016-07-25 Thread Nicolas Goaziou
Hello,

"Charles C. Berry"  writes:

> On Sat, 23 Jul 2016, Nicolas Goaziou wrote:

>> OTOH, inheriting :exports property may not be optimal. In particular,
>> ":exports code" for a Babel call is probably nonsensical. Perhaps
>> a solution would be to keep the current behaviour and make an exception
>> for :exports, which would always be `results' for Babel calls.
>>
>> WDYT?
>
> I think that would work well enough.

Funnily, that's what the previous evaluation process did.

I was confused by the "default" part in
`org-babel-default-lob-header-args'. I realize that this variable is no
replacement for `org-babel-default-header-args'. It permits to override
headers inherited from the source block instead.

This is now fixed. I updated variable docstring accordingly.

> Although I might quibble about what 'local' means here. If the src
> block is under a headline called XYZ with a `header-args' property of
> `:eval no' and the babel call is under headline ABC with no
> header-args property, I think some would expect the default to take
> precedence for calls under ABC over the property in XYZ.

The point is that a Babel call without any header argument or node
property defined at point of call should behave exactly as the src block
being called (minus the :exports behaviour, per above).

It seems logical to me that a source block that cannot be evaled cannot
be, by default, called either.

You may want to add (:eval . "yes") to
`org-babel-default-lob-header-args' if you disagree.

Regards,

-- 
Nicolas Goaziou