emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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/)]
@ 2015-11-27  5:22 Erik Anderson
  2015-11-30 15:04 ` Rasmus
  0 siblings, 1 reply; 2+ messages in thread
From: Erik Anderson @ 2015-11-27  5:22 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1753 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: 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/)]
  2015-11-27  5:22 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/)] Erik Anderson
@ 2015-11-30 15:04 ` Rasmus
  0 siblings, 0 replies; 2+ messages in thread
From: Rasmus @ 2015-11-30 15:04 UTC (permalink / raw)
  To: emacs-orgmode

Erik Anderson <erikbpanderson@gmail.com> writes:

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

I don't think I understand the problem.

Consider,

* test 
[[test]]

When I click enter on the link it goes to the expected place.  When I
click C-e RET on the second line it inserts a newline, which I guess is
what you want?  Can you give an example of how 

Your bug might relate to the fact that when using e.g. C-f you can end up
with the cursor between the two closing brackets.  But that’s a different
problem and I doubt your patch would fix this problem, since that point is
not the end of the line, though I haven’t tested it.

Rasmus

-- 
Got mashed potatoes. Ain't got no T-Bone. No T-Bone

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-30 15:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-27  5:22 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/)] Erik Anderson
2015-11-30 15:04 ` Rasmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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