From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Anderson Subject: Bug: Avoid following link when using org-return-follows-link and point is at end of line [8.3.2 (8.3.2-39-gd537a3-elpaplus @ /home/Erik/.emacs.d/elpa/org-plus-contrib-20151123/)] Date: Thu, 26 Nov 2015 23:22:29 -0600 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11410092d7f3dc05257ee1ca Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2BUg-0002vo-Cv for emacs-orgmode@gnu.org; Fri, 27 Nov 2015 00:22:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2BUf-0007M2-Db for emacs-orgmode@gnu.org; Fri, 27 Nov 2015 00:22:50 -0500 Received: from mail-io0-x233.google.com ([2607:f8b0:4001:c06::233]:36666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2BUf-0007Lh-8R for emacs-orgmode@gnu.org; Fri, 27 Nov 2015 00:22:49 -0500 Received: by iofh3 with SMTP id h3so105521852iof.3 for ; Thu, 26 Nov 2015 21:22:48 -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-orgmode@gnu.org --001a11410092d7f3dc05257ee1ca Content-Type: text/plain; charset=UTF-8 Not a bug per se, but a tweak to existing behavior which I think most people would prefer. The option org-return-follows-link is wonderfully convenient except when the point is at the end of the line where the intention is usually to insert a carriage return. http://emacs.stackexchange.com/questions/18433/avoid-following-link-when-using-org-return-follows-link-and-point-is-at-end-of-l --- lisp/org.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/org.el b/lisp/org.el index 8918747..6b9ffb3 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -21326,6 +21326,7 @@ object (e.g., within a comment). In these case, you need to use ;; `org-return-follows-link' allows it. Tolerate fuzzy ;; locations, e.g., in a comment, as `org-open-at-point'. ((and org-return-follows-link + (not (eolp)) (or (org-in-regexp org-ts-regexp-both nil t) (org-in-regexp org-tsr-regexp-both nil t) (org-in-regexp org-any-link-re nil t))) -- 2.5.3 Emacs : GNU Emacs 24.5.1 (x86_64-unknown-cygwin) of 2015-06-23 on desktop-new Package: Org-mode version 8.3.2 (8.3.2-39-gd537a3-elpaplus @ /home/Erik/.emacs.d/elpa/org-plus-contrib-20151123/) --001a11410092d7f3dc05257ee1ca Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Not a bug per se, but a tweak to existing behavior wh= ich I think most
people would prefer.=C2=A0 The option org-return= -follows-link is wonderfully
convenient except when the point is = at the end of the line where the
intention is usually to insert a= carriage return.


---
=C2=A0lisp/org.el | 1= +
=C2=A01 file changed, 1 insertion(+)

= diff --git a/lisp/org.el b/lisp/org.el
index 8918747..6b9ffb3 100= 755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -2= 1326,6 +21326,7 @@ object (e.g., within a comment).=C2=A0 In these case, yo= u need to use
=C2=A0 =C2=A0 =C2=A0 ;; `org-return-follows-link= 9; allows it.=C2=A0 Tolerate fuzzy
=C2=A0 =C2=A0 =C2=A0 ;; locati= ons, e.g., in a comment, as `org-open-at-point'.
=C2=A0 =C2= =A0 =C2=A0 ((and org-return-follows-link
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(not (eolp))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(or (org-in-regexp org-ts-regexp-both nil t)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-in-regexp org-tsr-regexp-both ni= l =C2=A0t)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(org-in-regexp org-any-link-re nil t)))
--
2.5.3


Emacs =C2=A0: GNU Emacs 24.5.1 (x86_64= -unknown-cygwin)
=C2=A0of 2015-06-23 on desktop-new
Pac= kage: Org-mode version 8.3.2 (8.3.2-39-gd537a3-elpaplus @ /home/Erik/.emacs= .d/elpa/org-plus-contrib-20151123/)

--001a11410092d7f3dc05257ee1ca--