emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug? in the latest revision of org


From: Paul Sexton
Subject: Re: [O] Bug? in the latest revision of org
Date: Fri, 28 Oct 2011 01:59:59 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Marcelo de Moraes Serpa <celoserpa <at> gmail.com> writes:

> 
> Hey list,Just updated to the latest rev. of org in git. When I try to press 
<ret> just in the beginning of a headline in order to move it one line below, 
I'm getting this error message:: Wrong type argument: listp, org-level-1Any 
ideas?Marcelo.

Yes, it's a bug - I was just about to post about it myself.

The problem is in the recent change to the 'org-return' function in org.el.
(commit de8cd8ee41543bb0548af1cdc7fa7a8168321677 on 26 Oct).

The original code was:

   ((and org-return-follows-link
         (eq (get-text-property (point) 'face) 'org-link))

The commit changed it to:

   ((and org-return-follows-link
         (or (eq (get-text-property (point) 'face) 'org-link)
             (memq 'org-link (get-text-property (point) 'face))))

But this breaks if there is a single face at point that is not org-link, 
because in that case the text property at point will not be a list, 
and this will cause an error when it is given as the second argument 
to memq.

The code needs to change to something like:

   ((and org-return-follows-link
         (let ((tprop (get-text-property (point) 'face)))
           (or (eq tprop 'org-link)
               (and (listp tprop) (memq 'org-link tprop)))))

Paul.






reply via email to

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