all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: monnier+gnu/emacs@rum.cs.yale.edu
Subject: Re: loaddefs.el filenames as seen by `update-file-autoloads'
Date: Mon, 12 May 2003 21:14:13 -0400	[thread overview]
Message-ID: <200305130114.h4D1EDBZ010190@rum.cs.yale.edu> (raw)
In-Reply-To: E19FNqq-0004xY-00@colo.agora-net.com

>    From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
>    Date: Mon, 12 May 2003 19:05:14 -0400
> 
>    Any reason why it's upcased ?
>    Is it just the tradition under VMS ?
> 
> i don't know about the internals of other programs under vms, but yes,
> traditionally (Richard Levitte's work) emacs has upcased filenames.  i
> suppose there may be code that relies on this behavior by now.  one
> notable exception is the buffer name -- that is downcased.
> 
>    At least under Emacs, the tradition is rather to use lowercase for
>    most file names, so it would make more sense to downcase (and most
>    places where we want to ignore case, we downcase rather than upcase,
>    your code below being a prime example).
> 
> ok.
> 
>    Also it would be better to do what W32 does: preserve capitalization.
>    Is that possible ?
> 
> a directory listing from the command line shows filenames all uppercase,
> so upcasing everything internally is indeed preserving capitalization.
> (this possibility is the current reality.)  perhaps i misunderstand you.

Under W32, the file-system preserves the capitalization, even though
it ignores it when searching for files.  I.e. you can't have both "Foo"
and "FOO", but after creating "Foo", an application can know whether
the file was created as "Foo" or "foo" or "FOO".

If `directory-files' *can* properly return ("ChangeLog" "README" "configure"),
rather than ("changelog" "readme" "configure")
or ("CHANGELOG" "README" "CONFIGURE"), without having to read
the user's mind (and without performance cost) then I think it should.

>    I'd rather use file-name-equal.
> 
> thanks for the tip -- will check it out.  i'm working from 21.2 release
> at the moment, will move to 21.3 after "make bootstrap" (actually "mms
> bootstrap") works.

It doesn't exist yet.
It's been discussed but has always been shot down in the end until now.

>    Hold it.  What about the file name in the (autoload ...) form ?
> 
> the cvs loaddefs.el uses lowercase.

Not really, it just so happens that all the files are lowercase
except for lisp/term/AT386.el.

work/emacs-0% grep -i at386 lisp/loaddefs.el
;;;;;;  "subdirs.el" "subr.el" "tempo.el" "term/AT386.el" "term/apollo.el"
work/emacs-0% 

> the change i proposed would
> maintain that convention.  this is possible because under vms,
> `expand-file-name' upcases (and practically everything filesystem
> related passes through that function at some point -- sometimes
> multiply!).

Why do you need to upcase in expand-file-name ?
Isn't VMS happy either way ?

>    Since the `autoload' might be used on case-sensitive systems, it
>    needs to have the right capitalization (now there's an example where
>    preserving capitalization in filenames (even if you ignore it) is
>    beneficial).
> 
> well, unixoids are case-sensitive.  we sidestep the problem there by
> adhering in practice to lowercase filenames that moreover are unique
> amongst themselves w/o regard to case.  the proposed change is not for
> all systems, but only those that are vms-like.

update-file-autoloads is not used exclusievly for lisp/loaddefs.el:
it is also used by some outside elisp packages.  Admittedly, they
probably also use lowercase filenames.

>   (expand-file-name "foo.el") => "AXPA:[TTN.EMACS.EMACS212_3]FOO.EL"
> 
> because autoloading eventually triggers loading which eventually uses
> `expand-file-name', we don't need to store "FOO.EL" in loaddefs.el to
> actually access "FOO.EL" on disk; "foo.el" is sufficient (under vms).

Since VMS is case-insensitive, it would work just as well if
expand-file-name returned "AXPA:[TTN.EMACS.EMACS212_3]FOO.EL".

Of course maybe some other part of the Emacs/VMS code might rely on
upcased filenames, but I doubt VMS itself does.


	Stefan

  reply	other threads:[~2003-05-13  1:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-12 22:30 loaddefs.el filenames as seen by `update-file-autoloads' Thien-Thi Nguyen
2003-05-12 23:05 ` Stefan Monnier
2003-05-13  0:41   ` Thien-Thi Nguyen
2003-05-13  1:14     ` Stefan Monnier [this message]
2003-05-13  2:05       ` Miles Bader
2003-05-13  4:06       ` Thien-Thi Nguyen
2003-05-13 14:00         ` Stefan Monnier
2003-05-13 16:08           ` Thien-Thi Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200305130114.h4D1EDBZ010190@rum.cs.yale.edu \
    --to=monnier+gnu/emacs@rum.cs.yale.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.