From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Stefan-W. Hahn" Subject: Re: commit 4e864643 breaks org-return Date: Fri, 23 Oct 2015 22:07:34 +0200 Message-ID: <20151023200734.GM12141@scotty.home> References: <20151022165708.GL12141@scotty.home> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zpicp-00071r-JO for emacs-orgmode@gnu.org; Fri, 23 Oct 2015 16:07:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zpick-000445-JB for emacs-orgmode@gnu.org; Fri, 23 Oct 2015 16:07:43 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:65425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zpick-00043u-8y for emacs-orgmode@gnu.org; Fri, 23 Oct 2015 16:07:38 -0400 Received: from scotty.home ([92.204.65.127]) by mrelayeu.kundenserver.de (mreue102) with ESMTPSA (Nemesis) id 0LfAa0-1aIClE0bLE-00omw1 for ; Fri, 23 Oct 2015 22:07:36 +0200 Received: from scotty.home (hs@localhost [127.0.0.1]) by scotty.home (8.14.4/8.14.4/Debian-4) with ESMTP id t9NK7Z2H014689 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 23 Oct 2015 22:07:35 +0200 Received: (from hs@localhost) by scotty.home (8.14.4/8.14.4/Submit) id t9NK7Y2K014687 for emacs-orgmode@gnu.org; Fri, 23 Oct 2015 22:07:34 +0200 Content-Disposition: inline In-Reply-To: <20151022165708.GL12141@scotty.home> 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-orgmode@gnu.org Mail von Stefan-W. Hahn, Thu, 22 Oct 2015 at 18:57:08 +0200: Hello, > commit 4e864643bdb6bba3e000ea51fb746a26e40b1f77 > Author: Nicolas Goaziou > Date: Sun Oct 18 09:36:15 2015 +0200 > > changes the behaviour of org-return when positioned right after a link with > org-return-follows-link set to t. the following patch seems to repair the behaviour: #+BEGIN_SRC elisp diff --git a/lisp/org.el b/lisp/org.el index a5183aa..3d527ac 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -21354,7 +21354,9 @@ (defun org-return (&optional indent) ((and org-return-follows-link (or (org-at-timestamp-p t) (org-at-date-range-p t) - (org-in-regexp org-any-link-re))) + (org-in-regexp org-any-link-re)) + (< (point) + (org-element-property :end context))) (call-interactively #'org-open-at-point)) ;; Insert newline in heading, but preserve tags. ((and (not (bolp)) #+END_SRC elisp With kind regards, Stefan -- Stefan-W. Hahn It is easy to make things. It is hard to make things simple.