emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Van L <van@scratch.space>
To: emacs-orgmode@gnu.org
Subject: link handling for `file:' fails to stay within Emacs but calls `open file:' with TextEdit
Date: Wed, 9 May 2018 13:02:07 +1000	[thread overview]
Message-ID: <F97642FD-1886-44D9-AAA7-469D655202D1@scratch.space> (raw)

Hello.

The link handling for org mode behaves unexpectedly where a file sets
org mode according to `Local variables:' at the end of the file.

In the following, a.org and b.org files work as expected using M-x
org-store-link and M-x org-insert-link for `file:' link.

Without the .org filename extension, following the link calls

  `open file:' which leads to Org Mode opening the file with TextEdit

under mac os, Emacs 26.1 rc-1.


;;;; ------------------------------------

;; running	: Emacs.app/Contents/MacOS/Emacs -Q
;; problem	: This two file arrangment for `Emacs -Q' *fails* to follow the link.
;; expect	: Emacs to open a link to org file.
;; unexpected	: Emacs calls TextEdit to open org file.
;; solution	: if file a and b are called a.org and b.org then there is no problem.

;; Solution needs org files named without the `.org’ extension
;; to follow `file:’ links without leaving Emacs.


;;;; ------------------------------------
;; file		: a


* one

** two

*** three

[[file:b::*title%20%E4%B8%AD][title 中]]

# Local variables:
# mode: org
# End:


;;;; ------------------------------------
;; file : b

* work

** title 中

*** chapter


# Local variables:
# mode: org
# End:

;;;; ============================================================
;; file a.org

* one

** two

*** three

[[file:b.org::*title%20%E4%B8%AD][title 中]]





;;;; ============================================================
;; file b.org

* work

** title 中

*** chapter

             reply	other threads:[~2018-05-09  3:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09  3:02 Van L [this message]
2018-05-24 22:57 ` link handling for `file:' fails to stay within Emacs but calls `open file:' with TextEdit Nicolas Goaziou
2018-05-25  3:01   ` Van L
2018-05-26 10:34     ` Nicolas Goaziou
2018-05-26 12:18       ` Van L
2018-05-26 12:31         ` Nicolas Goaziou
2018-05-26 12:38           ` Van L
2018-05-26 15:27         ` Eric S Fraga

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=F97642FD-1886-44D9-AAA7-469D655202D1@scratch.space \
    --to=van@scratch.space \
    --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).