Re: [PATCH] org-element.el: Fix properties being upcased by parser

2020-06-11 Thread Leo Vivier
Hello,

Nicolas Goaziou  writes:

> Leo Vivier  writes:
>
>> Yeah, I’ve reached the same conclusion, and I agree that we could
>> mention the normalisation in a docstring.  Do you want me to take care
>> of it?
>
> Sure! Thank you.

The patch is attached.

HTH,

-- 
Leo Vivier
>From e96e96931109026f406b3cabb0186319e902aca7 Mon Sep 17 00:00:00 2001
From: Leo Vivier 
Date: Fri, 12 Jun 2020 06:45:32 +0200
Subject: [PATCH] org-element.el: Update comment

* org-element.el (org-element-keyword-parser): Mention that `keyword'
is normalized by being upcased
---
 lisp/org-element.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index a5641e6ee..a693cb68d 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -2174,9 +2174,9 @@ the buffer position at the beginning of the first affiliated
 keyword and CDR is a plist of affiliated keywords along with
 their value.
 
-Return a list whose CAR is `keyword' and CDR is a plist
-containing `:key', `:value', `:begin', `:end', `:post-blank' and
-`:post-affiliated' keywords."
+Return a list whose CAR is a normalized `keyword' (uppercase) and
+CDR is a plist containing `:key', `:value', `:begin', `:end',
+`:post-blank' and `:post-affiliated' keywords."
   (save-excursion
 ;; An orphaned affiliated keyword is considered as a regular
 ;; keyword.  In this case AFFILIATED is nil, so we take care of
-- 
2.26.2



org-babel support for haxe

2020-06-11 Thread ian martins
Hello. The included patch adds org-babel support for haxe (https://haxe.org/).
It allows main class and function definitions to be optional, accepts
variables and supports babel functional mode. Please review.

I believe the same approach should work for java also. If this is fine I
could try to write an ob-java based on this to give java the same features
listed above.

One thing I would like to change is that this dumps the generated source
files in the current directory instead of burying them in the babel temp
dir (org-babel-temporary-directory). The same applies to the current
ob-java implementation. In order to put the temp source files in the babel
temp dir, there would have to be changes made in ob-core to allow creation
and removal of directories in the babel temp dir. If that seems reasonable
then I could try doing it, but let me know if there are reasons not to or
complications that I haven't thought of.

I've not done the FSF release. If this is acceptable I understand that I'll
have to do that.

-Ian
diff --git a/lisp/ob-haxe.el b/lisp/ob-haxe.el
new file mode 100644
index 0..5b0a42c7a
--- /dev/null
+++ b/lisp/ob-haxe.el
@@ -0,0 +1,260 @@
+;;; ob-haxe.el --- org-babel functions for haxe evaluation
+
+;; Copyright (C) 2020 Free Software Foundation, Inc.
+
+;; Author: Ian Martins
+;; Keywords: literate programming, reproducible research
+;; Homepage: http://orgmode.org
+
+;; This file is not part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see .
+
+;;; Commentary:
+
+;; Org-Babel support for evaluating haxe source code.
+
+;;; Code:
+(require 'ob)
+
+(defvar org-babel-tangle-lang-exts)
+(add-to-list 'org-babel-tangle-lang-exts '("haxe" . "hx"))
+
+(defvar org-babel-default-header-args:haxe '()
+  "Default header args for haxe source blocks.")
+
+(defconst org-babel-header-args:haxe '((target . '(interp neko hashlink))
+   (imports . :any))
+  "Haxe-specific header arguments.
+org-babel supports three of the platforms the haxe compiler can target.
+
+  `interp' runs the haxe compiler with the `--interp' option.
+  `neko' and `hashlink' compile to bytecode and run the
+  respective VMs.")
+
+(defvar org-babel-haxe-command "haxe"
+  "Name of the haxe command.")
+
+(defcustom org-babel-haxe-hline-to "null"
+  "Replace hlines in incoming tables with this when translating to haxe."
+  :group 'org-babel
+  :version "25.2"
+  :package-version '(Org . "9.3")
+  :type 'string)
+
+(defcustom org-babel-haxe-null-to 'hline
+  "Replace `null' in haxe tables with this before returning."
+  :group 'org-babel
+  :version "25.2"
+  :package-version '(Org . "9.3")
+  :type 'symbol)
+
+(defun org-babel-execute:haxe (body params)
+  "Execute a haxe source block with BODY code and PARAMS params."
+  (let* ((fullclassname (or (cdr (assq :classname params)) ; class and package
+(org-babel-haxe-find-classname body)
+"Main"))
+ (classname (if (seq-contains fullclassname ?.); just class name
+(file-name-extension fullclassname)
+  fullclassname))
+ (packagename (if (seq-contains fullclassname ?.)  ; just package name
+  (file-name-base fullclassname)
+""))
+ (packagedir (if (not (seq-empty-p packagename))   ; package name as a path
+ (replace-regexp-in-string "\\\." "/" packagename)))
+ (src-file (concat (replace-regexp-in-string "\\\." "/" fullclassname) ".hx"))
+ (cmdline (or (cdr (assq :cmdline params)) ""))
+ (target-name (cdr (assq :target params)))
+ (target (cond ((string= target-name "neko") "-neko main.n -cmd \"neko main.n\"")
+   ((string= target-name "hashlink") "-hl main.hl -cmd \"hl main.hl\"")
+   (t "--interp")))
+ (cmd (concat org-babel-haxe-command
+  " " cmdline " -main " fullclassname " " target))
+ (result-type (cdr (assq :result-type params)))
+ (result-params (cdr (assq :result-params params)))
+ (tmp-file (and (eq result-type 'value)
+(org-babel-temp-file "haxe-")))
+ (full-body (org-babel-expand-body:haxe
+ body params classname packagename result-type tmp-file)))
+
+;; created 

Re: Bug: fontification error with #end_src in 9.3.7 [9.3.7 (9.3.7-dist @ /PATH/TO/org/install/emacs/site-lisp/org/)]

2020-06-11 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


I got same problem, fontification on the ~#+end_src~ seems failed.

John Ciolfi  writes:

> Given the following org file, on the #+end_src line, I get "Org mode 
> fontification error in # at 9". If I place a newline before 
> the #+end_src line, the error goes away. This is a recent regression. This 
> worked fine in 9.2.6 and prior.
>
>   #+begin_src C++
> #include 
> int main() {
> std::cout << "hello";
> return 0;
> }
>
> // The results:
>   #+end_src
>
>   #+RESULTS:
>
>
>
> Emacs  : GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
>  of 2019-09-22, modified by Debian
> Package: Org mode version 9.3.7 (9.3.7-dist @ 
> /PATH/TO/org/install/emacs/site-lisp/org/)
>
> current state:
> ==
> (setq
>  org-src-mode-hook '(org-src-babel-configure-edit-buffer 
> org-src-mode-configure-edit-buffer)
>  org-link-shell-confirm-function 'yes-or-no-p
>  org-metadown-hook '(org-babel-pop-to-session-maybe)
>  org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
>  org-latex-default-packages-alist 
> '(("colorlinks=true,linkcolor={red!50!black},citecolor={blue!50!black},urlcolor={blue!80!black}"
>  "hyperref" nil)
> ("AUTO" "inputenc" t ("pdflatex"))
> ("T1" "fontenc" t ("pdflatex")) ("" 
> "graphicx" t)
> ("" "grffile" t) ("" "longtable" nil) ("" 
> "wrapfig" nil)
> ("" "rotating" nil) ("normalem" "ulem" t) 
> ("" "amsmath" t)
> ("" "textcomp" t) ("" "amssymb" t) ("" 
> "capt-of" nil)
> ("" "hyperref" nil))
>  org-mode-hook '(#[0 "\300\301\302\303\304$\207"
>[add-hook change-major-mode-hook org-show-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-archive-hook '(org-attach-archive-delete-maybe)
>  org-confirm-elisp-link-function 'yes-or-no-p
>  org-agenda-before-write-hook '(org-agenda-add-entry-text)
>  org-metaup-hook '(org-babel-load-in-session-maybe)
>  org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 
> "\n\n(fn ENTRY)"]
>  org-babel-pre-tangle-hook '(save-buffer)
>  org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
> org-babel-header-arg-expand)
>  org-link-file-path-type 'relative
>  org-occur-hook '(org-first-headline-recenter)
>  org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
>   org-optimize-window-after-visibility-change)
>  org-speed-command-hook '(org-speed-command-activate 
> org-babel-speed-command-activate)
>  org-babel-tangle-lang-exts '(("perl" . "pl") ("D" . "d") ("C++" . "cpp") 
> ("emacs-lisp" . "el")
>   ("elisp" . "el"))
>  org-confirm-shell-link-function 'yes-or-no-p
>  org-link-parameters '(("attachment" :follow org-attach-open-link :export 
> org-attach-export-link
> :complete org-attach-complete-link)
>("id" :follow org-id-open) ("eww" :follow eww :store 
> org-eww-store-link)
>("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 
> :export
> org-irc-export)
>("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" :follow org-docview-open :export 
> org-docview-export :store
> org-docview-store-link)
>("bibtex" :follow org-bibtex-open :store 
> org-bibtex-store-link)
>("bbdb" :follow org-bbdb-open :export org-bbdb-export 
> :complete
> org-bbdb-complete-link :store org-bbdb-store-link)
>("w3m" :store org-w3m-store-link) ("file+sys") 
> ("file+emacs")
>("shell" :follow org-link--open-shell)
>("news" :follow
> #[257 "\301\300\302Q!\207" ["news" browse-url ":"] 5 
> "\n\n(fn URL)"])
>("mailto" :follow
> #[257 "\301\300\302Q!\207" ["mailto" browse-url ":"] 
> 5 "\n\n(fn URL)"])
>("https" :follow
> #[257 "\301\300\302Q!\207" ["https" browse-url ":"] 5 
> "\n\n(fn URL)"])
>("http" :follow
> #[257 "\301\300\302Q!\207" ["http" browse-url ":"] 5 
> "\n\n(fn URL)"])

Re: Bug in identification of links?

2020-06-11 Thread Kyle Meyer
Daniele Nicolodi writes:

> org-mode fails to recognize https://doi.org/10.1016/0370-1573(89)90087-2
> as a valid URL, it breaks it after the closing parenthesis ). I don't
> understand why this is the case as I would imagine that if the )
> character is not allowed in URLs the link would be broken before it and
> not after. I haven't tried to find the code responsible for this, thus I
> don't know what exactly is going on. Does anyone have an idea?

The link is matched by org-link-plain-re, which is created by
org-link-make-regexps.  The relevant part looks like this:

  \\([^][ \t\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:] \t\n]\\|/\\)\\)\\)
 -

The underlined bit is what is matching "(89)".  This subpattern
appeared, without the underscore, in facedba05 (Use John Gruber's
regular expression for URL's, 2009-12-09).  The commit message links to
an article [0] that has this to say about the parentheses matching:

It attempts to be particularly clever with regard to parentheses,
which, in my experience, only ever seem to occur in the wild in
Wikipedia URLs, and which many URL matching patterns seem to
botch. The pattern looks for a single pair of balanced parentheses
within the URL, which is how it correctly omits the trailing
parenthesis in the following line:

(Something like http://foo.com/blah_blah)

That article also has an update recommending to use an improved variant.
Untested, but it seems like it'd handle your case.

This issue has been around a long time and is minor in that there will
always be cases that fool the regexp and these can be handled by
enclosing the text with <...> or [[...]].  Still, in my view it'd be
worth taking a look at tweaking the regexp after the release of v9.4.


[0] https://daringfireball.net/2009/11/liberal_regex_for_matching_urls
Related thread on mailing list:
https://orgmode.org/list/loom.20091130t200527-...@post.gmane.org/



Bug in identification of links?

2020-06-11 Thread Daniele Nicolodi
Hello,

org-mode fails to recognize https://doi.org/10.1016/0370-1573(89)90087-2
as a valid URL, it breaks it after the closing parenthesis ). I don't
understand why this is the case as I would imagine that if the )
character is not allowed in URLs the link would be broken before it and
not after. I haven't tried to find the code responsible for this, thus I
don't know what exactly is going on. Does anyone have an idea?

Thank you.

Cheers,
Dan



Re: Bug: Option to disable evaluation of code blocks during export [9.3.7 (9.3.7-dist @ /PATH/TO/org/install/emacs/site-lisp/org/)]

2020-06-11 Thread John Ciolfi
It would be very nice if I could enable/disable the evaluation of code blocks 
during the export process in the interactive C-c C-e environment.

I do now see that I can use the :eval no-export header more effectively, so 
this is less of an issue, but still think it would be a nice enhancement to 
have control from within the interactive org-export-dispatch function.

Thanks
John

From: Nicolas Goaziou 
Sent: Thursday, June 11, 2020 5:28 PM
To: John Ciolfi 
Cc: emacs-orgmode@gnu.org 
Subject: Re: Bug: Option to disable evaluation of code blocks during export 
[9.3.7 (9.3.7-dist @ /PATH/TO/org/install/emacs/site-lisp/org/)]

Hello,

John Ciolfi  writes:

> Could you add an option to disable evaluation of code blocks when exporting? 
> If I
> have an org-file with many code blocks setup for evaulation (babel), when I 
> export, I get
> prompted for every code block. Also the prompt does not clearly show which 
> code block it's
> asking to evaluate.

What is wrong with :eval no-export header? You can set it globally,
file-wise, tree wise, or per block.

Regards,

--
Nicolas Goaziou



Re: Bug: Option to disable evaluation of code blocks during export [9.3.7 (9.3.7-dist @ /PATH/TO/org/install/emacs/site-lisp/org/)]

2020-06-11 Thread Nicolas Goaziou
Hello,

John Ciolfi  writes:

> Could you add an option to disable evaluation of code blocks when exporting? 
> If I
> have an org-file with many code blocks setup for evaulation (babel), when I 
> export, I get
> prompted for every code block. Also the prompt does not clearly show which 
> code block it's
> asking to evaluate.

What is wrong with :eval no-export header? You can set it globally,
file-wise, tree wise, or per block.

Regards,

-- 
Nicolas Goaziou



Bug: Option to disable evaluation of code blocks during export [9.3.7 (9.3.7-dist @ /PATH/TO/org/install/emacs/site-lisp/org/)]

2020-06-11 Thread John Ciolfi


Could you add an option to disable evaluation of code blocks when exporting? If 
I
have an org-file with many code blocks setup for evaulation (babel), when I 
export, I get
prompted for every code block. Also the prompt does not clearly show which code 
block it's
asking to evaluate.

One solution would be to have org-export-dispatch have an option at top which 
says whether or
not to evaluate code blocks during export. It should be configurable to be on 
or off. I would
suggest off as I see most of us running the evaluation as we write the code and 
not during
export.

I'm able to work around this issue by adding advice, e.g.

  (defun sb-org-export-dispatch-no-babel (orig-fun  args)

(let* ((org-babel-default-header-args
   (cons '(:eval . "never-export") org-babel-default-header-args))
   (result (apply orig-fun args)))
  result))

  (advice-add 'org-export-dispatch :around #'sb-org-export-dispatch-no-babel)

Thanks
John


Emacs  : GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
 of 2019-09-22, modified by Debian
Package: Org mode version 9.3.7 (9.3.7-dist @ 
/PATH/TO/org/install/emacs/site-lisp/org/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-latex-listings 'minted
 org-link-shell-confirm-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-latex-default-packages-alist 
'(("colorlinks=true,linkcolor={red!50!black},citecolor={blue!50!black},urlcolor={blue!80!black}"
 "hyperref" nil)
("AUTO" "inputenc" t ("pdflatex"))
("T1" "fontenc" t ("pdflatex")) ("" 
"graphicx" t)
("" "grffile" t) ("" "longtable" nil) ("" 
"wrapfig" nil)
("" "rotating" nil) ("normalem" "ulem" t) 
("" "amsmath" t)
("" "textcomp" t) ("" "amssymb" t) ("" 
"capt-of" nil)
("" "hyperref" nil))
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-latex-pdf-process '("pdflatex -file-line-error -shell-escape -interaction 
nonstopmode -output-directory %o %f" "pdflatex -file-line-error -shell-escape 
-interaction nonstopmode -output-directory %o %f")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-mode-hook '(#[0 "\301\211\207" [imenu-create-index-function 
org-imenu-get-tree] 2]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-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-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-link-file-path-type 'relative
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-babel-tangle-lang-exts '(("perl" . "pl") ("D" . "d") ("C++" . "cpp") 
("emacs-lisp" . "el")
  ("elisp" . "el"))
 org-latex-image-default-width ""
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("attachment" :follow org-attach-open-link :export 
org-attach-export-link
:complete org-attach-complete-link)
   ("id" :follow org-id-open) ("eww" :follow eww :store 
org-eww-store-link)
   ("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 
:export
org-irc-export)
   ("info" :follow org-info-open :export org-info-export 
:store
org-info-store-link)
   ("gnus" 

Bug: fontification error with #end_src in 9.3.7 [9.3.7 (9.3.7-dist @ /PATH/TO/org/install/emacs/site-lisp/org/)]

2020-06-11 Thread John Ciolfi


Given the following org file, on the #+end_src line, I get "Org mode 
fontification error in # at 9". If I place a newline before the 
#+end_src line, the error goes away. This is a recent regression. This worked 
fine in 9.2.6 and prior.

  #+begin_src C++
#include 
int main() {
std::cout << "hello";
return 0;
}

// The results:
  #+end_src

  #+RESULTS:



Emacs  : GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
 of 2019-09-22, modified by Debian
Package: Org mode version 9.3.7 (9.3.7-dist @ 
/PATH/TO/org/install/emacs/site-lisp/org/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-link-shell-confirm-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-latex-default-packages-alist 
'(("colorlinks=true,linkcolor={red!50!black},citecolor={blue!50!black},urlcolor={blue!80!black}"
 "hyperref" nil)
("AUTO" "inputenc" t ("pdflatex"))
("T1" "fontenc" t ("pdflatex")) ("" 
"graphicx" t)
("" "grffile" t) ("" "longtable" nil) ("" 
"wrapfig" nil)
("" "rotating" nil) ("normalem" "ulem" t) 
("" "amsmath" t)
("" "textcomp" t) ("" "amssymb" t) ("" 
"capt-of" nil)
("" "hyperref" nil))
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-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-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-link-file-path-type 'relative
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-babel-tangle-lang-exts '(("perl" . "pl") ("D" . "d") ("C++" . "cpp") 
("emacs-lisp" . "el")
  ("elisp" . "el"))
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("attachment" :follow org-attach-open-link :export 
org-attach-export-link
:complete org-attach-complete-link)
   ("id" :follow org-id-open) ("eww" :follow eww :store 
org-eww-store-link)
   ("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 
:export
org-irc-export)
   ("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" :follow org-docview-open :export 
org-docview-export :store
org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store 
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export 
:complete
org-bbdb-complete-link :store org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link) ("file+sys") 
("file+emacs")
   ("shell" :follow org-link--open-shell)
   ("news" :follow
#[257 "\301\300\302Q!\207" ["news" browse-url ":"] 5 
"\n\n(fn URL)"])
   ("mailto" :follow
#[257 "\301\300\302Q!\207" ["mailto" browse-url ":"] 5 
"\n\n(fn URL)"])
   ("https" :follow
#[257 "\301\300\302Q!\207" ["https" browse-url ":"] 5 
"\n\n(fn URL)"])
   ("http" :follow
#[257 "\301\300\302Q!\207" ["http" browse-url ":"] 5 
"\n\n(fn URL)"])
   ("ftp" :follow
#[257 "\301\300\302Q!\207" ["ftp" browse-url ":"] 5 
"\n\n(fn URL)"])
   ("help" :follow org-link--open-help)
   ("file" :complete org-link-complete-file)
   ("elisp" :follow org-link--open-elisp) ("doi" :follow 

Inconsistent behaviour: toggle inline images does not work with relative paths [9.3.7 (9.3.7-2-g706970-elpa @ /Users/matthijs/.emacs.d/elpa/org-20200608/)]

2020-06-11 Thread Matthijs de Jonge
Hi all,

Today I ran into some behavior that seemed strange to me:

I have inline images:

[[file:relative/path/from/org-file.png]]

With org-startup-with-inline-images these work as expected.

What does not work as expected is org-toggle-inline-images : this does
not disable inline image preview (though it does *enable* it).

However, when you change the path to:

[[file:./relative/path/from/org-file.png]]

It does work as expected. You need to explicitly add the initial dot
slash.

Since org is perfectly capable of displaying images without the initial
dot slash, the behavior of org-toggle-inline-images seems to be a bit
inconsistent.


Kind regards,

Matthijs de Jonge




Emacs  : GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 
Version 10.14.3 (Build 18D109))
 of 2019-09-02
Package: Org mode version 9.3.7 (9.3.7-2-g706970-elpa @ 
/Users/matthijs/.emacs.d/elpa/org-20200608/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-link-shell-confirm-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-src-tab-acts-natively t
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-imenu-depth 5
 org-agenda-files '("~/Dropbox/00_db/boeken.txt" 
"~/Dropbox/00_db/boodschappenlijst.txt"
"~/Dropbox/00_db/building_a_second_brain.txt" 
"~/Dropbox/00_db/cadeaus.txt"
"~/Dropbox/00_db/curiosa.txt" "~/Dropbox/00_db/dingen.txt" 
"~/Dropbox/00_db/downloaden.txt"
"~/Dropbox/00_db/dromen.txt" 
"~/Dropbox/00_db/electronica.txt" "~/Dropbox/00_db/emacs.txt"
"~/Dropbox/00_db/fiets.txt" "~/Dropbox/00_db/go.txt" 
"~/Dropbox/00_db/hardlopen.txt"
"~/Dropbox/00_db/hoofdpijn.txt" 
"~/Dropbox/00_db/huishouden.txt" "~/Dropbox/00_db/inbox.txt"
"~/Dropbox/00_db/kijken.txt" "~/Dropbox/00_db/kleren.txt" 
"~/Dropbox/00_db/koffie.txt"
"~/Dropbox/00_db/koken.txt" 
"~/Dropbox/00_db/krachttraining.txt" "~/Dropbox/00_db/kunst.txt"
"~/Dropbox/00_db/leren.txt" "~/Dropbox/00_db/monsters.txt" 
"~/Dropbox/00_db/muziek.txt"
"~/Dropbox/00_db/muziekmaken.txt" 
"~/Dropbox/00_db/muziekquiz.txt"
"~/Dropbox/00_db/onderwijs.txt" 
"~/Dropbox/00_db/planten.txt" "~/Dropbox/00_db/quizvragen.txt"
"~/Dropbox/00_db/racket-sequencer.txt" 
"~/Dropbox/00_db/rijmpjes.txt"
"~/Dropbox/00_db/sleutels.txt" "~/Dropbox/00_db/stretching 
mobility.txt"
"~/Dropbox/00_db/strips.txt" "~/Dropbox/00_db/suriname.txt" 
"~/Dropbox/00_db/tech.txt"
"~/Dropbox/00_db/tekenen.txt" "~/Dropbox/00_db/todo.txt" 
"~/Dropbox/00_db/treinen.txt"
"~/Dropbox/00_db/verjaardagen.txt" 
"~/Dropbox/00_db/vogels.txt" "~/Dropbox/00_db/vrijetijd.txt"
"~/Dropbox/00_db/weekoverzicht.txt" 
"~/Dropbox/00_db/werk.txt" "~/Dropbox/00_db/wiskunde.txt"
"~/Dropbox/00_db/woorden.txt")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-mode-hook '((lambda nil (imenu-add-to-menubar "Imenu"))
 #[0 "\301\211\207" [imenu-create-index-function 
org-imenu-get-tree] 2]
 (lambda nil (variable-pitch-mode 1) (setq line-spacing 0.2)
  (mapcar (function (lambda (face) (set-face-attribute face nil 
:inherit (quote fixed-pitch
   (quote
(org-block org-table org-meta-line org-document-title 
org-document-info-keyword org-date
 org-special-keyword org-drawer org-property-value)
)
   )
  )
 (lambda nil (org-bullets-mode 1))
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-show-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 (lambda 
nil (flyspell-mode 1)))
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-startup-indented t
 org-startup-with-inline-images t
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 

Re: [PATCH] Allow org-capture-mode-hook to access org-capture-current-plist [9.3.6 (release_9.3.6-443-g0e8aff @ /home/n/.emacs.d/straight/build/org/)]

2020-06-11 Thread Bastien
Hi Nicolas,

Nicolas Goaziou  writes:

> We're in feature freeze, but since the change was very small, and was
> discussed a while before I applied it nonetheless.

Sure, no problem, thanks for applying it!

-- 
 Bastien