From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help 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) Organization: http://groups.google.com Message-ID: <9e31b345-4cec-4ea6-8d63-d66b8355da06@p10g2000prf.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1219531421 18371 80.91.229.12 (23 Aug 2008 22:43:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Aug 2008 22:43:41 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 24 00:44:34 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KX1qQ-0005M5-Nl for geh-help-gnu-emacs@m.gmane.org; Sun, 24 Aug 2008 00:44:31 +0200 Original-Received: from localhost ([127.0.0.1]:60995 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KX1pS-0000p8-O3 for geh-help-gnu-emacs@m.gmane.org; Sat, 23 Aug 2008 18:43:30 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!p10g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 76 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1219530081 27215 127.0.0.1 (23 Aug 2008 22:21:21 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 23 Aug 2008 22:21:21 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p10g2000prf.googlegroups.com; posting-host=24.6.185.159; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:161581 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:56927 Archived-At: 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---httpwww.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 =E2=80=9CC:\\=E2= =80=9D and =E2=80=9C\=E2=80=9D and if you are using cygwin you also get =E2=80=9C/=E2= =80=9D ... mac has =E2=80=9C:=E2=80=9D mostly in OS9, and =E2=80=9C/=E2=80=9D in OSX and there's complex char tran= sform magic underneath. Unix is the worst, they pretty much just allow alphanumerics and not even space. If you have anything like =E2=80=9C,=3D()= ; \'"~&-=E2=80=9D 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 =E2=88=91 http://xahlee.org/ =E2=98=84