unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Xah <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: (emacs+unix): How to have a file-name containing slashes,  angle-brackets, etc?
Date: Sat, 23 Aug 2008 15:21:21 -0700 (PDT)	[thread overview]
Message-ID: <9e31b345-4cec-4ea6-8d63-d66b8355da06@p10g2000prf.googlegroups.com> (raw)
In-Reply-To: g850hk$rt5$1@panix2.panix.com

On Aug 15, 3:38 pm, dkco...@panix.com (David Combs) wrote:
> I'm downloading files of names like:
>
>      http://www.aaa.com/~john/foo-txt.htm
>
> Now, when I do this in a browser (I use lynx (shell-account))
> the default name to store it under is foo-txt.htm.
>
> Years later, what I'll want to know is exactly where it came from, ie
> I'd like the filename to depict the entire url.
>
> Like this, perhaps?
>
>      http://www.aaa.com/~john/foo-txt.htm
>
> Nope, because regardless of what the computer will
> make of it, it'll confuse *me* -- not knowing whether
> those slashes represent dir-separators within *my* computer,
> or in some far-away (maybe long dead) server.
>
> Hmmm.  Maybe "---" for "/"?
>
> What about ":"?
>
> And what about "~"?
>
> Plus other chars I've not thought of?
>
> Making it even longer, if the *title* of the report in
> the file is "10 easy editing tips", and I want that reflected
> in the name too.
>
>     Like 10-easy-editing-tips---http<colonSlashSlash>www.aaa.com... (you
>      get the idea).
>
> And, whatever we decide on, another question comes up -- how to ENTER
> that NAME into the computer -- both in emacs (dired) and in, say, tcsh.
>
> What, iva C-Q for emacs and ^V in unix.
>
> Suggestions?
>
> Thanks!
>
> David
>
> P.S.: Oh, I forgot.  tar shouldn't barf on the name.

what you want to do is pretty hopeless. Chars in url is confusing
enough, with its percent encoding, and when used in html as link,
there's also CDATA. Depending on the browser, or whatever tool you are
using, the url you get may or may not be processed to eliminate a
variety of encodings, and the encoding spec itself is not crystal
clear and in practice lots of actually invalid uri anyway...

chars in file names itself is also confusing. Different file systems
allow different char sets with different special char meanings, and
each generation of file system changes. (e.g. windows has “C:\\” and
“\” and if you are using cygwin you also get “/” ... mac has “:”
mostly in OS9, and “/” in OSX and there's complex char transform magic
underneath. Unix is the worst, they pretty much just allow
alphanumerics and not even space. If you have anything like “,=();
\'"~&-” etc, you can expect most shell tools to erase you disk)

the best thing to do is just to create a file like info.txt or
readme.txt or source.txt, then in that file put in the url, date, or
keywords and annotation. That's what i do.

  Xah
∑ http://xahlee.org/

  parent reply	other threads:[~2008-08-23 22:21 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-15 22:38 (emacs+unix): How to have a file-name containing slashes, angle-brackets, etc? David Combs
2008-08-16 18:41 ` The Badger
     [not found] ` <mailman.16876.1218850883.18990.help-gnu-emacs@gnu.org>
2008-08-23 21:57   ` David Combs
2008-08-23 22:48     ` Lennart Borgman (gmail)
2008-08-23 22:21 ` Xah [this message]
2008-08-24 12:31   ` Nikolaj Schumacher
     [not found]   ` <mailman.17461.1219581096.18990.help-gnu-emacs@gnu.org>
2008-08-24 19:12     ` Xah
2008-08-25  0:02       ` David Hansen
2008-08-25  6:12       ` David Kastrup
2008-08-25  9:03         ` Xah
     [not found]       ` <mailman.17478.1219622906.18990.help-gnu-emacs@gnu.org>
2008-08-25 13:08         ` Phil Carmody
2008-08-25 20:13       ` Nikolaj Schumacher
     [not found]       ` <mailman.17519.1219695209.18990.help-gnu-emacs@gnu.org>
2008-08-26  8:42         ` Xah
2008-08-26 15:02           ` Nikolaj Schumacher
     [not found]           ` <mailman.17589.1219762958.18990.help-gnu-emacs@gnu.org>
2008-08-26 17:03             ` Xah
2008-08-26 20:40               ` Nikolaj Schumacher
     [not found]               ` <mailman.17618.1219783235.18990.help-gnu-emacs@gnu.org>
2008-08-26 21:54                 ` Xah
2008-08-27 11:58                   ` Bernardo Bacic
2008-08-27 14:05                   ` Nikolaj Schumacher
     [not found]                   ` <mailman.17666.1219838494.18990.help-gnu-emacs@gnu.org>
2008-08-27 17:10                     ` Xah
     [not found]                   ` <mailman.17676.1219845916.18990.help-gnu-emacs@gnu.org>
2008-08-27 17:34                     ` Xah
2008-08-27 19:50                       ` Cor Gest
2008-08-28  9:42                       ` Nikolaj Schumacher
     [not found]                       ` <mailman.17742.1219916570.18990.help-gnu-emacs@gnu.org>
2008-08-28 10:13                         ` Xah
2008-08-28 10:49                           ` Lennart Borgman (gmail)
2008-08-28 13:29                           ` Nikolaj Schumacher
     [not found]                           ` <mailman.17755.1219930152.18990.help-gnu-emacs@gnu.org>
2008-08-29  2:23                             ` Xah

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=9e31b345-4cec-4ea6-8d63-d66b8355da06@p10g2000prf.googlegroups.com \
    --to=xahlee@gmail.com \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).