emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Default application for org-reveal
@ 2017-01-06 20:50 Florian Lindner
  2017-01-07 10:39 ` Marco Wahl
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Lindner @ 2017-01-06 20:50 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

the Org Attach dispatcher offers a key "f" to open the attachment directory not in Emacs.

(defun org-attach-reveal (&optional if-exists)
  "Show the attachment directory of the current task.
This will attempt to use an external program to show the directory."
  (interactive "P")
  (let ((attach-dir (org-attach-dir (not if-exists))))
    (and attach-dir (org-open-file attach-dir))))

On my two systems this is the same a F, it opens in dired. xdg-open . uses dolphin to open inode/directory. How does Emacs/org determine which
application to use? How can I influence it?

Thanks,
Florian

P.S. Why are file associations such a mess on Linux. Emacs? KDE and Thunderbird all use different applications to open the same file...

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

* Re: Default application for org-reveal
  2017-01-06 20:50 Default application for org-reveal Florian Lindner
@ 2017-01-07 10:39 ` Marco Wahl
  2017-01-08 17:25   ` Florian Lindner
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Wahl @ 2017-01-07 10:39 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Florian Lindner <mailinglists@xgm.de> writes:

> Hello,
>
> the Org Attach dispatcher offers a key "f" to open the attachment directory not in Emacs.
>
> (defun org-attach-reveal (&optional if-exists)
>   "Show the attachment directory of the current task.
> This will attempt to use an external program to show the directory."
>   (interactive "P")
>   (let ((attach-dir (org-attach-dir (not if-exists))))
>     (and attach-dir (org-open-file attach-dir))))
>
> On my two systems this is the same a F, it opens in dired. xdg-open . uses dolphin to open inode/directory. How does Emacs/org determine which
> application to use? How can I influence it?

The documentation of `org-open-file' points to variable `org-file-apps'.
You can customize `org-file-apps'.

E.g. the entry

[INS] [DEL] Cons-cell:
            Choice: [Value Menu] Links to a directory
            Choice: [Value Menu] Command: firefox %s

stands for opening directories in firefox.


Ciao

                       Marco

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

* Re: Default application for org-reveal
  2017-01-07 10:39 ` Marco Wahl
@ 2017-01-08 17:25   ` Florian Lindner
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Lindner @ 2017-01-08 17:25 UTC (permalink / raw)
  To: emacs-orgmode

Am 07.01.2017 um 11:39 schrieb Marco Wahl:
> Hi,
> 
> Florian Lindner <mailinglists@xgm.de> writes:
> 
>> Hello,
>>
>> the Org Attach dispatcher offers a key "f" to open the attachment directory not in Emacs.
>>
>> (defun org-attach-reveal (&optional if-exists)
>>   "Show the attachment directory of the current task.
>> This will attempt to use an external program to show the directory."
>>   (interactive "P")
>>   (let ((attach-dir (org-attach-dir (not if-exists))))
>>     (and attach-dir (org-open-file attach-dir))))
>>
>> On my two systems this is the same a F, it opens in dired. xdg-open . uses dolphin to open inode/directory. How does Emacs/org determine which
>> application to use? How can I influence it?
> 
> The documentation of `org-open-file' points to variable `org-file-apps'.
> You can customize `org-file-apps'.
> 
> E.g. the entry
> 
> [INS] [DEL] Cons-cell:
>             Choice: [Value Menu] Links to a directory
>             Choice: [Value Menu] Command: firefox %s
> 
> stands for opening directories in firefox.

Ok, thanks. I've set org-file-apps like that now

org-file-apps '((system . "xdg-open %s")
                            ("\\.pdf\\'" . system)
                            (directory . system)
                            (auto-mode . emacs)))

and it seems to work.

IMHO should mailcap be deprecated in favor of xdg-open.

Best,
Florian

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

end of thread, other threads:[~2017-01-08 17:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-06 20:50 Default application for org-reveal Florian Lindner
2017-01-07 10:39 ` Marco Wahl
2017-01-08 17:25   ` Florian Lindner

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