emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Skip Collins <skip.collins@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [BUG] org-link-search fails if search string contains new lines
Date: Fri, 7 Apr 2017 11:47:28 -0400	[thread overview]
Message-ID: <CABUh-74+HaPRBW2JcUbjk6FwbdTadP+r78khbyvjzqYyPoLngQ@mail.gmail.com> (raw)
In-Reply-To: <87mvc3nime.fsf@nicolasgoaziou.fr>

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

On Thu, Mar 30, 2017 at 6:50 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Thank you. Unfortunately, there is not much to do with this. Could you
> do some debugging when running the faulty test? It may come from
> something in your configuration.

I think I figured it out. During the fuzzy-links test,
org-open-at-point is invoked to open a file that was created with
org-test-with-temp-text-in-file. The temp file does not have a .org
extension. As a result, my mac attempts to open the file outside of
emacs, which produces an unexpected result. The solution is to pass an
argument to org-open-at-point, which ensures that the file is opened
in emacs. A patch is attached.

[-- Attachment #2: 0001-Ensure-test-files-are-opened-in-Emacs-in-test-org-fu.patch --]
[-- Type: application/octet-stream, Size: 1125 bytes --]

From 6c3ad66280edc10a683bdfd4e730033d5f541721 Mon Sep 17 00:00:00 2001
From: Skip Collins <skip.collins@gmail.com>
Date: Fri, 7 Apr 2017 11:41:47 -0400
Subject: [PATCH] Ensure test files are opened in Emacs in test-org/fuzzy-links

---
 testing/lisp/test-org.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index b1d4449ef..3361a69a5 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -2292,7 +2292,7 @@ Foo Bar
        (insert (format "[[file:%s::line1 line2]]" file))
        (beginning-of-line)
        (let ((org-link-search-must-match-exact-headline nil))
-	 (org-open-at-point))
+	 (org-open-at-point 0))
        (looking-at-p "line1"))))
   (should
    (org-test-with-temp-text-in-file "Paragraph\n\nline1\n\nline2\n\n"
@@ -2301,7 +2301,7 @@ Foo Bar
        (insert (format "[[file:%s::line1 line2]]" file))
        (beginning-of-line)
        (let ((org-link-search-must-match-exact-headline nil))
-	 (org-open-at-point))
+	 (org-open-at-point 0))
        (looking-at-p "line1")))))
 
 ;;;; Link Escaping
-- 
2.12.2


      reply	other threads:[~2017-04-07 15:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-26 17:35 [BUG] org-link-search fails if search string contains new lines Matt Lundin
2017-03-26 20:50 ` Matt Lundin
2017-03-27 11:37   ` Nicolas Goaziou
2017-03-27 15:15     ` Matt Lundin
2017-03-29 12:19       ` Nicolas Goaziou
2017-03-28 21:34     ` Skip Collins
2017-03-29 12:19       ` Nicolas Goaziou
2017-03-29 15:17         ` Skip Collins
2017-03-30 10:50           ` Nicolas Goaziou
2017-04-07 15:47             ` Skip Collins [this message]

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=CABUh-74+HaPRBW2JcUbjk6FwbdTadP+r78khbyvjzqYyPoLngQ@mail.gmail.com \
    --to=skip.collins@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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).