all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs 21.1 magic filename quoting
@ 2002-04-10 22:36 Andrew Arensburger
  2002-04-11 11:23 ` Andreas Schwab
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Arensburger @ 2002-04-10 22:36 UTC (permalink / raw)
  Cc: Andrew Arensburger

	Summary: Emacs refuses to read files in "/:".

	If I'm reading "files.el" correctly, Emacs prepends "/:"
to filenames to indicate that magic has been performed on the
filename, and should not be performed again, then strips off the "/:"
before opening the file.
	The problem is that under a standard AFS installation, /: is a
symbolic link to /afs/<cell-name> (/afs/glue.umd.edu, in our case).
Thus, when I try to edit "/:/a/b/c", Emacs tries to open "/a/b/c".

	Yes, I can take the "file-name-non-special" element out of
"file-name-handler-alist", but that breaks opening a file with
wildcards.
	Perhaps "\\`/#" would be a better pattern. Or, ideally, it
should be possible to pick a different prefix on a site-wide basis.
Is this desirable? Should I try to work on it and send in a patch?

-- 
Andrew Arensburger, Systems guy         University of Maryland
arensb@glue.umd.edu                     Office of Information Technology
      Zeit fliegt wie ein Pfeil, Obstfliegen haben bananen gern.

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

* Re: Emacs 21.1 magic filename quoting
  2002-04-10 22:36 Emacs 21.1 magic filename quoting Andrew Arensburger
@ 2002-04-11 11:23 ` Andreas Schwab
  2002-04-11 16:29   ` Andrew Arensburger
  2002-04-11 19:16   ` Andrew Arensburger
  0 siblings, 2 replies; 10+ messages in thread
From: Andreas Schwab @ 2002-04-11 11:23 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Andrew Arensburger <arensb@Glue.umd.edu> writes:

|> 	Summary: Emacs refuses to read files in "/:".
|> 
|> 	If I'm reading "files.el" correctly, Emacs prepends "/:"
|> to filenames to indicate that magic has been performed on the
|> filename, and should not be performed again, then strips off the "/:"
|> before opening the file.
|> 	The problem is that under a standard AFS installation, /: is a
|> symbolic link to /afs/<cell-name> (/afs/glue.umd.edu, in our case).
|> Thus, when I try to edit "/:/a/b/c", Emacs tries to open "/a/b/c".

Have you tried using "/:/:/a/b/c" for the name?

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Emacs 21.1 magic filename quoting
  2002-04-11 11:23 ` Andreas Schwab
@ 2002-04-11 16:29   ` Andrew Arensburger
  2002-04-11 19:42     ` Miles Bader
  2002-04-12 19:49     ` Richard Stallman
  2002-04-11 19:16   ` Andrew Arensburger
  1 sibling, 2 replies; 10+ messages in thread
From: Andrew Arensburger @ 2002-04-11 16:29 UTC (permalink / raw)
  Cc: Andrew Arensburger, bug-gnu-emacs

On Thu, Apr 11, 2002 at 01:23:59PM +0200, Andreas Schwab wrote:
> Andrew Arensburger <arensb@Glue.umd.edu> writes:
> |> 	Summary: Emacs refuses to read files in "/:".
> 
> Have you tried using "/:/:/a/b/c" for the name?

	At first glance, this workaround appears to work.
	I'd rather fix it properly, though. The main reason I wrote
was that I'm willing to work on fixing it, but wanted to approach you
first and see if I should do so, or if there's deep magic involved
that I shouldn't mess with.
	In particular, Elisp strings may contain \0, which is IMO
unlikely to appear in any filename (and cannot appear in a Unix
filename). Would it be possible to use "/\0" for quoting?

-- 
Andrew Arensburger, Systems guy         University of Maryland
arensb@glue.umd.edu                     Office of Information Technology
       If you can read this, thank your network administrator.

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

* Re: Emacs 21.1 magic filename quoting
  2002-04-11 11:23 ` Andreas Schwab
  2002-04-11 16:29   ` Andrew Arensburger
@ 2002-04-11 19:16   ` Andrew Arensburger
  1 sibling, 0 replies; 10+ messages in thread
From: Andrew Arensburger @ 2002-04-11 19:16 UTC (permalink / raw)
  Cc: Andrew Arensburger, bug-gnu-emacs

On Thu, Apr 11, 2002 at 01:23:59PM +0200, Andreas Schwab wrote:
> Andrew Arensburger <arensb@Glue.umd.edu> writes:
> |> 	Summary: Emacs refuses to read files in "/:".
> |> 
> 
> Have you tried using "/:/:/a/b/c" for the name?

	Update: this works for individual files, but breaks magic. For
instance, "M-x find-file /:/:/a/b/*" creates a buffer called "*",
rather than opening all of the files in /:/a/b.

-- 
Andrew Arensburger, Systems guy         University of Maryland
arensb@glue.umd.edu                     Office of Information Technology
 If you're not part of the solution, you're part of the precipitate.

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

* Re: Emacs 21.1 magic filename quoting
  2002-04-11 16:29   ` Andrew Arensburger
@ 2002-04-11 19:42     ` Miles Bader
  2002-04-12 19:49     ` Richard Stallman
  1 sibling, 0 replies; 10+ messages in thread
From: Miles Bader @ 2002-04-11 19:42 UTC (permalink / raw)


arensb@Glue.umd.edu (Andrew Arensburger) writes:
> 	In particular, Elisp strings may contain \0, which is IMO
> unlikely to appear in any filename (and cannot appear in a Unix
> filename). Would it be possible to use "/\0" for quoting?

The `/:' is intended to be not just an internal way of quoting
filenames, but a user-convention as well -- e.g., as you already
noticed, it can be used to prevent emacs from expanding wildcards.

This means that it is mentioned in documentation, etc.

-Miles
-- 
80% of success is just showing up.  --Woody Allen

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

* Re: Emacs 21.1 magic filename quoting
  2002-04-11 16:29   ` Andrew Arensburger
  2002-04-11 19:42     ` Miles Bader
@ 2002-04-12 19:49     ` Richard Stallman
  2002-04-12 21:02       ` Andrew Arensburger
  1 sibling, 1 reply; 10+ messages in thread
From: Richard Stallman @ 2002-04-12 19:49 UTC (permalink / raw)
  Cc: schwab, arensb, bug-gnu-emacs

	    At first glance, this workaround appears to work.
	    I'd rather fix it properly, though.

This is a feature, not a bug.  I don't think there is a bug here.

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

* Re: Emacs 21.1 magic filename quoting
  2002-04-12 19:49     ` Richard Stallman
@ 2002-04-12 21:02       ` Andrew Arensburger
  2002-04-15 18:31         ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Arensburger @ 2002-04-12 21:02 UTC (permalink / raw)
  Cc: arensb, schwab, bug-gnu-emacs

On Fri, Apr 12, 2002 at 01:49:31PM -0600, Richard Stallman wrote:
> 	    At first glance, this workaround appears to work.
> 	    I'd rather fix it properly, though.
> 
> This is a feature, not a bug.  I don't think there is a bug here.

	The problem is that if there's a directory or symlink called
"/:", then

	M-x find-file /:/a/b/*

doesn't work: it creates an empty buffer called "*" corresponding to
the file "/a/b/*", rather than opening all files in /:/a/b . I don't
see any obvious ways to configure Emacs to do so, or to escape the
pathname.

-- 
Andrew Arensburger, Systems guy         University of Maryland
arensb@glue.umd.edu                     Office of Information Technology
		  Who cares how it plays in Peoria?

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

* Re: Emacs 21.1 magic filename quoting
  2002-04-12 21:02       ` Andrew Arensburger
@ 2002-04-15 18:31         ` Stefan Monnier
  2002-04-17 16:03           ` Richard Stallman
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2002-04-15 18:31 UTC (permalink / raw)


>>>>> "Andrew" == Andrew Arensburger <arensb@Glue.umd.edu> writes:
> 	M-x find-file /:/a/b/*

I agree that the quoting provided by /: should probably only apply to
magic file names but not to wildcard expansion (or envvar substitution
for that matter).


	Stefan

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

* Re: Emacs 21.1 magic filename quoting
  2002-04-15 18:31         ` Stefan Monnier
@ 2002-04-17 16:03           ` Richard Stallman
  2002-04-17 17:14             ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Stallman @ 2002-04-17 16:03 UTC (permalink / raw)
  Cc: gnu-emacs-bug

    I agree that the quoting provided by /: should probably only apply to
    magic file names but not to wildcard expansion (or envvar substitution
    for that matter).

That means giving up a useful feature for quoting wildcards.

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

* Re: Emacs 21.1 magic filename quoting
  2002-04-17 16:03           ` Richard Stallman
@ 2002-04-17 17:14             ` Stefan Monnier
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2002-04-17 17:14 UTC (permalink / raw)
  Cc: monnier+gnu.emacs.bug/news/, gnu-emacs-bug

>     I agree that the quoting provided by /: should probably only apply to
>     magic file names but not to wildcard expansion (or envvar substitution
>     for that matter).
> 
> That means giving up a useful feature for quoting wildcards.

Of course, I was assuming that we would still be able to quote wildcards.
We can currently do something like

	/foo/bar/fo[*]o.c

to open the file fo*o.c, but that only works if the file already exists
(and it breaks tab-completion), so we should extend it somehow.
Ideally we should be able to use the $-quoting scheme already used for
envvars and dollars:

	/foo/bar/fo$*o.c
	/foo/bar/fo$[o.c

but it seems difficult since the $-quoting and the wildcard-expansion
are done at two different places.


	Stefan

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

end of thread, other threads:[~2002-04-17 17:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-10 22:36 Emacs 21.1 magic filename quoting Andrew Arensburger
2002-04-11 11:23 ` Andreas Schwab
2002-04-11 16:29   ` Andrew Arensburger
2002-04-11 19:42     ` Miles Bader
2002-04-12 19:49     ` Richard Stallman
2002-04-12 21:02       ` Andrew Arensburger
2002-04-15 18:31         ` Stefan Monnier
2002-04-17 16:03           ` Richard Stallman
2002-04-17 17:14             ` Stefan Monnier
2002-04-11 19:16   ` Andrew Arensburger

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.