From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: [BUG] org-return after an empty description list item gives error Date: Thu, 11 Feb 2016 03:25:59 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e011762d19c0af9052b761c9f Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aThtT-0007b6-Tl for emacs-orgmode@gnu.org; Wed, 10 Feb 2016 22:26:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aThtS-0006wl-Qr for emacs-orgmode@gnu.org; Wed, 10 Feb 2016 22:26:11 -0500 Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]:35346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aThtS-0006wf-K7 for emacs-orgmode@gnu.org; Wed, 10 Feb 2016 22:26:10 -0500 Received: by mail-ob0-x231.google.com with SMTP id xk3so57472354obc.2 for ; Wed, 10 Feb 2016 19:26:10 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-org list --089e011762d19c0af9052b761c9f Content-Type: text/plain; charset=UTF-8 Hi, I get an error from org-element-context if I have set org-return-follows-link to t and hit RET after an empty desc list item. Here is what I mean by that: ===== org buffer ===== - desc123 :: ===== To better recreate this issue, save the below elisp code to a temp file, say t.el, and run, emacs -q -l t.el (Verify that emacs -q loads the master branch (dev) org-mode version. It does for me as I install the dev org-mode to "share/emacs/site-lisp/org".) ===== t.el ===== (setq inhibit-startup-screen t) (setq org-return-follows-link t) ; Commenting this line with mask this bug (toggle-debug-on-error) (pop-to-buffer-same-window (get-buffer-create "*org-temp*")) (org-mode) (insert "- desc123 ::\n") (org-return) ===== On doing so, you should get an error backtrace like below: ===== Debugger entered--Lisp error: (search-failed "desc123") search-forward("desc123" 14) org-element-context() org-return() ===== *I do not get this error if I set org-return-follows-link back to its default value of nil.* I am using the following org-mode and emacs versions: ===== Org-mode version 8.3.3 (release_8.3.3-573-ga1d9da @ /home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/) Emacs version: GNU Emacs 25.0.90.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23) of 2016-02-10, built using commit 3ad05a0dc46093dd6b8958747a0475b8baba954f. ./configure options: --prefix=/home/kmodi/usr_local/apps/6/emacs/emacs-25 'CPPFLAGS=-fgnu89-inline -I/home/kmodi/usr_local/6/include -I/usr/include/freetype2 -I/usr/include' 'CFLAGS=-ggdb3 -O0' 'CXXFLAGS=-ggdb3 -O0' 'LDFLAGS=-L/home/kmodi/usr_local/6/lib -L/home/kmodi/usr_local/6/lib64 -ggdb3' Features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11 ===== Kaushal Modi --089e011762d19c0af9052b761c9f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I get an error from org-element-con= text if I have set org-return-follows-link to t and hit RET after an empty = desc list item. Here is what I mean by that:

=3D= =3D=3D=3D=3D org buffer =3D=3D=3D=3D=3D
- desc123 ::<RET>
<RET>
=3D=3D=3D=3D=3D

To = better recreate this issue, save the below elisp code to a temp file, say t= .el, and run,

emacs -q -l t.el
(Verify t= hat emacs -q loads the master branch (dev) org-mode version. It does for me= as I install the dev org-mode to "share/emacs/site-lisp/org".)
=C2=A0
=3D=3D= =3D=3D=3D t.el =3D=3D=3D=3D=3D
(setq inhibit-startup-screen = t)
(setq org-return-follows-link t) ; Commenting this line with m= ask this bug
(toggle-debug-on-error)
(pop-to-buffer-sam= e-window (get-buffer-create "*org-temp*"))
(org-mode)
(insert "- desc123 ::\n")
(org-return)
=3D=3D=3D=3D=3D

On doing so, you should g= et an error backtrace like below:

=3D=3D=3D=3D=3D<= /div>
Debugger entered--Lisp error: (search-failed "desc123&q= uot;)
=C2=A0 search-forward("desc123" 14)
=C2= =A0 org-element-context()
=C2=A0 org-return()
=3D=3D=3D= =3D=3D

*I do not get this error if I set org= -return-follows-link back to its default value of nil.*

I am using the following org-mode and emacs versions:
=
=3D=3D=3D=3D=3D
Org-mode version 8.3.3 (release_8.= 3.3-573-ga1d9da @ /home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/s= ite-lisp/org/)

Emacs version: GNU Emacs 2= 5.0.90.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23)
=C2=A0o= f 2016-02-10, built using commit 3ad05a0dc46093dd6b8958747a0475b8baba954f.<= /div>

./configure options:
=C2=A0 --prefix=3D/= home/kmodi/usr_local/apps/6/emacs/emacs-25 'CPPFLAGS=3D-fgnu89-inline -= I/home/kmodi/usr_local/6/include -I/usr/include/freetype2 -I/usr/include= 9; 'CFLAGS=3D-ggdb3 -O0' 'CXXFLAGS=3D-ggdb3 -O0' 'LDFLA= GS=3D-L/home/kmodi/usr_local/6/lib -L/home/kmodi/usr_local/6/lib64 -ggdb3&#= 39;

Features:
=C2=A0 XPM JPEG TIFF GIF P= NG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GN= UTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11
=3D=3D=3D=3D=3D

Kaushal Modi
--089e011762d19c0af9052b761c9f--