emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Martin Kampas <martin.kampas@ubedi.net>
To: emacs-orgmode@gnu.org
Subject: Bug: org-collector evaluates headlines starting with hyperlink as lisp code
Date: Mon, 23 Apr 2018 19:54:17 +0200	[thread overview]
Message-ID: <3793941.P5vVg0DhfO@5th> (raw)

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 <martin.kampas@ubedi.net>
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	other threads:[~2018-04-23 17:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23 17:54 Martin Kampas [this message]
2018-04-26 23:34 ` Bug: org-collector evaluates headlines starting with hyperlink as lisp code Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3793941.P5vVg0DhfO@5th \
    --to=martin.kampas@ubedi.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).