emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Bug: org-collector evaluates headlines starting with hyperlink as li


From: Martin Kampas
Subject: [O] Bug: org-collector evaluates headlines starting with hyperlink as lisp code
Date: Mon, 23 Apr 2018 19:54:17 +0200

Hi,

With headlines like

* [[http://example.com]] Example

org-collector writes just "http://example.com"; in the table, omitting the rest 
of the headline.

Patch below.

BR,
Martin

>From 1228efc453d38bc090511f21fafa750e416e8b7a Mon Sep 17 00:00:00 2001
From: Martin Kampas <address@hidden>
Date: Mon, 23 Apr 2018 19:27:18 +0200
Subject: [PATCH] org-collector.el: Inhibit lisp evaluation of headlines

* contrib/lisp/org-collector.el (org-propview-collect): Inhibit lisp
  evaluation of headlines

This fixes org-collector usage for items starting with a hyperlink,
which would be incorrectly treated as lisp code.
---
 contrib/lisp/org-collector.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/lisp/org-collector.el b/contrib/lisp/org-collector.el
index 1d2351923..833ecbf51 100644
--- a/contrib/lisp/org-collector.el
+++ b/contrib/lisp/org-collector.el
@@ -186,7 +186,8 @@ variables and values specified in props"
         (header-props
          (mapcar (lambda (props)
                    (mapcar (lambda (pair)
-                             (cons (car pair) (org-babel-read (cdr pair))))
+                             (let ((inhibit-lisp-eval (string= (car pair) 
"ITEM")))
+                               (cons (car pair) (org-babel-read (cdr pair) 
inhibit-lisp-eval))))
                            props))
                  header-props))
         ;; collect all property names
-- 
2.16.2







reply via email to

[Prev in Thread] Current Thread [Next in Thread]