unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* emacs and xdg-open
@ 2012-01-09 10:13 Eric Abrahamsen
  2012-01-09 22:26 ` Philipp Haselwarter
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Abrahamsen @ 2012-01-09 10:13 UTC (permalink / raw)
  To: help-gnu-emacs

I'm running archlinux, stumpwm and emacs, and have had pretty resounding
success using dired as my only file manager: in dired I've bound 'e' to
a command that passes files to xdg-open, and by dint of copying
/usr/share/applications/mimeinfo.cache into
~/.local/share/applications/default.list, the right external
applications open files out of dired.

The one iffy thing is getting other applications to pass directory
references to emacs (ie clicking the dropbox applet icon in the system
tray and having the dropbox directory open in dired). Pointing
the inode/directory MIME type at emacs works, but starts a new emacs
instance. I created a "emacsclient.desktop" file:

[Desktop Entry]
Name=EmacsClient
MimeType=inode/directory;x-directory/normal
Exec=emacsclient -n %F
Type=Application
Terminal=false

And this nearly works, except that the '-n' flag to the emacsclient exec
doesn't appear to be respected: emacs still tells me "Press C-x # when
you're done editing this file" (this being a dired buffer), and if I
kill the buffer it asks: "Buffer `Dropbox' still has clients; kill it?"

I guess this is a long shot, but does anyone have a guess as to why the
'-n' flag is ignored, and how to fix it? If not, please consider this a
(nearly-functional) tutorial on using emacs as your only file manager on
linux systems without a proper desktop environment. :)

Yrs,
Eric

-- 
GNU Emacs 24.0.92.2 (i686-pc-linux-gnu, GTK+ Version 2.24.8)
 of 2012-01-04 on pellet




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

end of thread, other threads:[~2012-01-11  5:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-09 10:13 emacs and xdg-open Eric Abrahamsen
2012-01-09 22:26 ` Philipp Haselwarter
2012-01-10  3:07   ` Eric Abrahamsen
2012-01-10 19:29     ` Philipp Haselwarter
2012-01-11  5:00       ` Eric Abrahamsen

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