emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
To: emacs-orgmode@gnu.org
Subject: Re: commit 4e864643 breaks org-return
Date: Fri, 23 Oct 2015 22:07:34 +0200	[thread overview]
Message-ID: <20151023200734.GM12141@scotty.home> (raw)
In-Reply-To: <20151022165708.GL12141@scotty.home>

Mail von Stefan-W. Hahn, Thu, 22 Oct 2015 at 18:57:08 +0200:

Hello,

> commit 4e864643bdb6bba3e000ea51fb746a26e40b1f77
> Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
> 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.

  reply	other threads:[~2015-10-23 20:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-22 16:57 commit 4e864643 breaks org-return Stefan-W. Hahn
2015-10-23 20:07 ` Stefan-W. Hahn [this message]
2015-10-23 22:34   ` Nicolas Goaziou
2015-10-24  6:48     ` Stefan-W. Hahn
2015-10-25 16:41       ` Behaviour of org-open-at-point and org-return (was commit 4e864643 breaks org-return) Stefan-W. Hahn
2015-10-28 14:02         ` Matt Lundin
2015-10-31 22:38         ` Nicolas Goaziou
2015-11-01 23:19       ` commit 4e864643 breaks org-return Simon Thum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151023200734.GM12141@scotty.home \
    --to=stefan.hahn@s-hahn.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).