emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Ensure test files are opened in Emacs in test-org/fuzzy-links
@ 2017-04-10 14:57 Skip Collins
  2017-04-10 19:13 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Skip Collins @ 2017-04-10 14:57 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode

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

On Fri, Apr 7, 2017 at 11:47 AM, Skip Collins <skip.collins@gmail.com> wrote:
> 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


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

* Re: [PATCH] Ensure test files are opened in Emacs in test-org/fuzzy-links
  2017-04-10 14:57 [PATCH] Ensure test files are opened in Emacs in test-org/fuzzy-links Skip Collins
@ 2017-04-10 19:13 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2017-04-10 19:13 UTC (permalink / raw)
  To: Skip Collins; +Cc: Org Mode

Hello,

Skip Collins <skip.collins@gmail.com> writes:

> Subject: [PATCH] Ensure test files are opened in Emacs in test-org/fuzzy-links

Applied. Thank you.

Regards,
-- 
Nicolas Goaziou                                                0x80A93738

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

end of thread, other threads:[~2017-04-10 19:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-10 14:57 [PATCH] Ensure test files are opened in Emacs in test-org/fuzzy-links Skip Collins
2017-04-10 19:13 ` Nicolas Goaziou

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