From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: Bug: org-in-item-p indicates point is in list when it isn't [8.3.3 (release_8.3.3-529-gfed40e @ /home/malsburg/usr/share/emacs/site-lisp/org/)] [9.0.5 (9.0.5-elpa @ /home/malsburg/.emacs.d/elpa/org-20170210/)] Date: Sun, 21 May 2017 14:57:31 +0200 Message-ID: <87a866iczo.fsf@nicolasgoaziou.fr> References: <87tw4e33cs.fsf@posteo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCQQX-0007VC-Dz for emacs-orgmode@gnu.org; Sun, 21 May 2017 08:57:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCQQU-0006ra-D8 for emacs-orgmode@gnu.org; Sun, 21 May 2017 08:57:41 -0400 Received: from relay7-d.mail.gandi.net ([2001:4b98:c:538::200]:51208) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dCQQU-0006pZ-77 for emacs-orgmode@gnu.org; Sun, 21 May 2017 08:57:38 -0400 In-Reply-To: <87tw4e33cs.fsf@posteo.de> (Titus von der Malsburg's message of "Sun, 21 May 2017 12:34:43 +0200") 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" To: Titus von der Malsburg Cc: emacs-orgmode@gnu.org Hello, Titus von der Malsburg writes: > In the example below, when I place the cursor on =E2=80=9CItem 2=E2=80=9D= and then do > (org-end-of-item-list), the cursor is correctly placed at the beginning > of line 4. However, when I then say (org-in-item-p), I get something > non-nil. When I move the cursor to the beginning of line 5, I still get > non-nil for (org-in-item-p). The expected result is nil on line 4 and > 5. If (org-in-item-p) gives non-nil, (org-end-of-item-list) has > obviously not moved us to the end of the list. I think > (org-end-of-item-list) is doing the right thing but (org-in-item-p) > doesn=E2=80=99t. I don't see any bug. Blank lines after a plain list still belong to the plain list, so `org-in-item-p' is correct. Indeed, `org-end-of-item-list' moves to the end of the last item instead of the very end of the list, but I consider it to be a feature, e.g., when you need to exchange two items in the list. You may want to explain what is bothering you in this results. Also, I suggest to use `org-element-at-point' instead. Regards, --=20 Nicolas Goaziou