all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Protocols and filenames
@ 2009-03-06 21:40 Sebastian Rose
  2009-03-10  2:34 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Rose @ 2009-03-06 21:40 UTC (permalink / raw)
  To: emacs-devel Mailinglist

Hi,


I have a question about file name expansion.

I want to open a file prefixed with a user defined protocol through
emacsclient. Just like 

  emacsclient my-protocol:///home/sebastian/org/tutorials/tutorial.org


* First question:

   while this here works:
   C-x C-f file:///home/sebastian/.emacs RET

   this here does not:
   $ emacsclient file:///home/sebastian/.emacs

   Why?

   The file is opened as

   /current/working/directory/file:/home/sebastian/.emacs
   
   Seems odd. Quoting does not help.



* Second question:

   How would get emacs to open a file using a user defined protocoll
   like this:

   emacs my-protocol:///path/to/tutorial.org

   I tried to use `directory-abbrev-alist' for this, but to no avail.



emacs-version:

GNU Emacs 23.0.91.1 (i686-pc-linux-gnu, GTK+ Version 2.12.11) of 2009-03-03 



Thanks in advance,

-- 
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Http:  www.emma-stil.de




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

* Re: Protocols and filenames
  2009-03-06 21:40 Protocols and filenames Sebastian Rose
@ 2009-03-10  2:34 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2009-03-10  2:34 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: emacs-devel Mailinglist

> I want to open a file prefixed with a user defined protocol through
> emacsclient. Just like 
>   emacsclient my-protocol:///home/sebastian/org/tutorials/tutorial.org

Indeed, we have a bug here.  `emacsclient' passes
`pwd`/my-protocol:///home/sebastian/org/tutorials/tutorial.org to Emacs,
which is why it doesn't work.

> * Second question:

>    How would get emacs to open a file using a user defined protocoll
>    like this:
>    emacs my-protocol:///path/to/tutorial.org
>    I tried to use `directory-abbrev-alist' for this, but to no avail.

You'd either want to use file-name-handler-alist, or even hook directly
into the URL library (see emacs/lisp/url/*.el).


        Stefan




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

end of thread, other threads:[~2009-03-10  2:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-06 21:40 Protocols and filenames Sebastian Rose
2009-03-10  2:34 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.