From: Xah Lee <xah@xahlee.org>
To: help-gnu-emacs@gnu.org
Subject: Re: emacs changed file's own user and file permission
Date: Tue, 11 Dec 2007 12:39:37 -0800 (PST) [thread overview]
Message-ID: <58019103-c718-4f7a-bbc1-962e7aa1cf9b@i12g2000prf.googlegroups.com> (raw)
In-Reply-To: mailman.4854.1197346566.18990.help-gnu-emacs@gnu.org
2007-12-11
Not quite sure what you were saying in your last post.
you wrote: "That's on MS-Windows, I presume."
Huh?
The bang character "!" in the backup file path
"!Users!xah!web!emacs!xah_emacs_google_earth.el~"
is created by emacs by default.
this is stated in the doc for backup-directory-alist
Ctrl+h v backup-directory-alist
i quote:
<<
Documentation:
Alist of filename patterns and backup directory names.
Each element looks like (REGEXP . DIRECTORY). Backups of files with
names matching REGEXP will be made in DIRECTORY. DIRECTORY may be
relative or absolute. If it is absolute, so that all matching files
are backed up into the same directory, the file names in this
directory will be the full name of the file backed up with all
directory separators changed to `!' to prevent clashes. This will not
work correctly if your filesystem truncates the resulting name.>>
------------------------
Xah wrote:
<<i think this is not a robust solution because in principle the file
name length would quickly reach its limit.>>
Eli wrote:
<<What limit? ...>>
A typical file system usually have limit on the number of chars you
can have on a file name. On HFS (used by mac os class) it was 32. HFS+
(OS X) i think its 256. Wikip has more details.
Eli wrote:
<<What do you think is the limit of a file-name length on your system?>>
Huh?? What do i think is the limit?
Are you trying to say, by a rhetorical question, that what i think so
is probably not right?
If the average file name char length is n, and your file that emacs
going to do the backup is in m levels of dir nesting. Then, the backup
file char length is n*m+n.
m*n+n is a order of magnitude of n. If n is the max length allowed,
you can easily see how the emacs scheme easily go beyond it.
In real world, probably 99.99% of people will never use more than 10%
of the max length in file names, and probably will never have subdirs
that are nested more than, say, 10 levels deep. So this means that 99%
of those who uses this emacs backup scheme will prob not encounter the
problem of it reaching file name legth limit. It will be a problem for
sizable number of programers however (maybe hundreds or thousands,
worldwide), since there are a software implementations (say, those
uses file system as database) easily will make fully use the file name
length and dir nesting limit.
... maybe we should do a test to see what happens when emacs reach the
file name length limit.
Xah
xah@xahlee.org
\xAD\xF4 http://xahlee.org/
On Dec 10, 8:16 pm, Eli Zaretskii <e...@gnu.org> wrote:
> > From:XahLee<x...@xahlee.org>
> > Date: Mon, 10 Dec 2007 17:18:46 -0800 (PST)
>
> > i just tried it and the file is backed up as for example:
> > !Users!xah!web!emacs!xah_emacs_google_earth.el~
>
> That's on MS-Windows, I presume.
>
> > i think this is not a robust solution because in principle the file
> > name length would quickly reach its limit.
>
> What limit? What do you think is the limit of a file-name length on
> your system? (And what system is that?)
next prev parent reply other threads:[~2007-12-11 20:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-10 2:11 emacs changed file's own user and file permission cire
2007-12-10 4:11 ` Eli Zaretskii
2007-12-10 18:42 ` Xah Lee
2007-12-10 23:07 ` Jason Rumney
2007-12-11 1:18 ` Xah Lee
2007-12-11 4:16 ` Eli Zaretskii
2007-12-11 9:23 ` Peter Dyballa
[not found] ` <mailman.4854.1197346566.18990.help-gnu-emacs@gnu.org>
2007-12-11 20:39 ` Xah Lee [this message]
2007-12-12 4:09 ` Eli Zaretskii
[not found] ` <mailman.4906.1197432601.18990.help-gnu-emacs@gnu.org>
2007-12-12 5:00 ` Xah Lee
[not found] ` <mailman.4861.1197365038.18990.help-gnu-emacs@gnu.org>
2007-12-11 20:49 ` Xah Lee
2007-12-11 23:03 ` Peter Dyballa
[not found] ` <mailman.4897.1197414209.18990.help-gnu-emacs@gnu.org>
2007-12-15 5:21 ` Xah Lee
2007-12-11 21:27 ` Giorgos Keramidas
2007-12-12 4:37 ` Kevin Rodgers
[not found] ` <mailman.4908.1197434250.18990.help-gnu-emacs@gnu.org>
2007-12-12 5:42 ` Xah Lee
2007-12-12 16:59 ` Joel J. Adamson
2007-12-12 18:26 ` Xah Lee
2007-12-14 14:44 ` Joel J. Adamson
2007-12-17 1:48 ` Sean Sieger
2007-12-12 5:43 ` Barry Margolin
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=58019103-c718-4f7a-bbc1-962e7aa1cf9b@i12g2000prf.googlegroups.com \
--to=xah@xahlee.org \
--cc=help-gnu-emacs@gnu.org \
/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.