all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* magic file system implementation
@ 2006-12-24  3:29 Nic James Ferrier
  2006-12-25 23:23 ` Stefan Monnier
  2006-12-31 23:36 ` Kai Großjohann
  0 siblings, 2 replies; 4+ messages in thread
From: Nic James Ferrier @ 2006-12-24  3:29 UTC (permalink / raw)


I want to implement my own magic "filesystem" over stateless HTTP (I
have the backend and a FUSE client already).

I have a few questions:


1. if one of the magic filesystem functions is not relevant to me,
what should I have that function do? For example, my filesystem cannot
have subdirectorys, what should make-directory and
make-directory-internal do?

2. Does anyone have a skeleton implementation of magic files? eldav is
pretty good but still quite eldav specific. 

3. What's the best prefix to register? TRAMP seems to have taken over
magic filesystems by registering:

  "\\`/[^/:]+:" 

to it's handler. This makes TRAMP the fs for anything with a url
scheme.


Making a generic module for filesystem handling seems like the kind of
thing that could be quite easily done to make life easier.

-- 
Nic Ferrier
http://www.tapsellferrier.co.uk   for all your tapsell ferrier needs

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

* Re: magic file system implementation
  2006-12-24  3:29 magic file system implementation Nic James Ferrier
@ 2006-12-25 23:23 ` Stefan Monnier
  2006-12-31 23:36 ` Kai Großjohann
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2006-12-25 23:23 UTC (permalink / raw)
  Cc: emacs-devel

> 3. What's the best prefix to register? TRAMP seems to have taken over
> magic filesystems by registering:

>   "\\`/[^/:]+:" 

> to it's handler. This makes TRAMP the fs for anything with a url
> scheme.

You may want to check url-handler-mode as well.


        Stefan

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

* Re: magic file system implementation
  2006-12-24  3:29 magic file system implementation Nic James Ferrier
  2006-12-25 23:23 ` Stefan Monnier
@ 2006-12-31 23:36 ` Kai Großjohann
  2006-12-31 23:40   ` Kai Großjohann
  1 sibling, 1 reply; 4+ messages in thread
From: Kai Großjohann @ 2006-12-31 23:36 UTC (permalink / raw)


Nic James Ferrier <nferrier@tapsellferrier.co.uk> writes:

> I want to implement my own magic "filesystem" over stateless HTTP (I
> have the backend and a FUSE client already).
>
> I have a few questions:

I have no answers, but noone else has, so I can at least voice
suggestions.

> 1. if one of the magic filesystem functions is not relevant to me,
> what should I have that function do? For example, my filesystem cannot
> have subdirectorys, what should make-directory and
> make-directory-internal do?

Intuitively speaking, it seems they should fail.  It is not quite
clear to me, however, *how* they should fail.  But if you would make
them fail just like a normal make-directory fails when the permissions
are lacking, then that would be a good first approximation.

Since Ange-FTP is the oldest, it is always worth a look for
inspiration.  If it's been working for a decade, it can't be too
wrong.

I wonder if it would make sense to standardize on some file-error text
if the failure is to signal a file-error.

> 2. Does anyone have a skeleton implementation of magic files? eldav is
> pretty good but still quite eldav specific. 

I don't...  There is not much of a skeleton to implementing magic
files, though, except for the code to recursively invoke the file
operation, which is included in the lisp manual.

> 3. What's the best prefix to register? TRAMP seems to have taken over
> magic filesystems by registering:
>
>   "\\`/[^/:]+:" 
>
> to it's handler. This makes TRAMP the fs for anything with a url
> scheme.

This is the unfortunate consequence of the traditional syntax for
remote file names in Emacs: /user@host:/some/file.  Tramp continues
that tradition (and evolves it).

Practically speaking, I guess that using URLs instead of Emacs' custom
syntax has theoretical appeal, but won't happen due to immediate
benefit in practice...

What can I say here?  Tramp is also a framework to hook in other
remote file handlers, see tramp-smb.el which uses smbclient.  So one
approach could be to hook into Tramp...

Can't say, tho, what you would gain from hooking into Tramp.  Filename
parsing, perhaps, but how much is that worth?

Another approach is to rely on ordering: If you come first in
file-name-handler-alist, you win.  It is because this approach exists
that I believe it is unlikely that the Emacs filename syntax will
change.


Kai

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

* Re: magic file system implementation
  2006-12-31 23:36 ` Kai Großjohann
@ 2006-12-31 23:40   ` Kai Großjohann
  0 siblings, 0 replies; 4+ messages in thread
From: Kai Großjohann @ 2006-12-31 23:40 UTC (permalink / raw)


kai@emptydomain.de (Kai Großjohann) writes:

> Nic James Ferrier <nferrier@tapsellferrier.co.uk> writes:
>
>> I want to implement my own magic "filesystem" over stateless HTTP (I
>> have the backend and a FUSE client already).
>>
>> I have a few questions:
>
> I have no answers, but noone else has

... voiced any so far ...

> , so I can at least voice suggestions.

Sorry, I didn't want to imply incompetence.

Happy New Year.

Kai

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

end of thread, other threads:[~2006-12-31 23:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-24  3:29 magic file system implementation Nic James Ferrier
2006-12-25 23:23 ` Stefan Monnier
2006-12-31 23:36 ` Kai Großjohann
2006-12-31 23:40   ` Kai Großjohann

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.