emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Paul Sexton <psexton.2a@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Bug? in the latest revision of org
Date: Fri, 28 Oct 2011 01:59:59 +0000 (UTC)	[thread overview]
Message-ID: <loom.20111028T035334-538@post.gmane.org> (raw)
In-Reply-To: CACHMzOFAtAA17GkmW6sQy+5B724UMY9zesuHujmKA=AKnXTQnQ@mail.gmail.com

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 

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)))))


  reply	other threads:[~2011-10-28  2:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-27 19:01 Bug? in the latest revision of org Marcelo de Moraes Serpa
2011-10-28  1:59 ` Paul Sexton [this message]
2011-10-28 14:43   ` 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:

  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=loom.20111028T035334-538@post.gmane.org \
    --to=psexton.2a@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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).