From: Michael R. Wolf <MichaelRWolf@att.net>
Subject: ange-ftp-name-format too restrictive & customize is broken
Date: Mon, 22 Dec 2003 21:43:59 -0800 [thread overview]
Message-ID: <uad5k5bs0.fsf@att.net> (raw)
In GNU Emacs 21.3.1 (i386-msvc-nt5.0.2195)
of 2003-03-27 on buffy
configured using `configure --with-msvc (12.00)'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ENU
locale-coding-system: iso-latin-1
default-enable-multibyte-characters: t
================================================================
One ISP hosting service I use has "@" in the username, preventing
ange-ftp from correctly separating the USER part from the HOST part. I
found out that I could modify ange-ftp-name-format to accomodate their
arrogant disregard for a 3 decade old RFP.
At the shell level, this ftp script works.
$ ftp
> open ftp.metajiva.com
> user anonymous@metajiva.com
But from within emacs, a find-file on this does not.
/michael@metajiva.com@ftp.metajiva.com:
================
I use another ISP that also uses multi-part USER names, but their
bang-notation USER didn't cause the same problems that the @-notation
USER did.
This works fine from the shell.
$ ftp
> open ftp.example.com
> user example.com!user
And this works fine from find-file within emacs, too.
/example.com!user@ftp.example.com:
================================================================
The following patch fixes lisp/net/ange-ftp.el, with corresponding
ChangeLog entry. Strictly speaking, removing the first "@" from the
regexp made it work, but I didn't see a need for the "@" in the
following two complemented character classes, so, being a Perl guy at
heart, I tightened it up a bit. The "@" works well to sepate the USER
part from the HOST part. USER can contain "@". Since the regexp is
greedy, HOST will not.
================================================================
Patch
diff -a -r -c lisp/ChangeLog newlisp/ChangeLog
*** lisp/ChangeLog Tue Mar 18 08:15:30 2003
--- newlisp/ChangeLog Mon Dec 22 20:40:52 2003
***************
*** 1,3 ****
--- 1,13 ----
+ 2003-12-22 Michael R. Wolf <MichaelRWolf@att.net>
+
+ * net/ange-ftp.el (ange-ftp-name-format): Allow USER to contain
+ "@", as required by some ISP hosting service. USER@HOST now
+ allows "@" inside USER, using the rightmost "@" to separate it
+ from HOST.
+
+ Fixed defcustom argument syntax errors that prevented use of
+ customization.
+
2003-03-18 Francesco Potortì <pot@gnu.org>
* Version 21.3 released.
diff -a -r -c lisp/net/ange-ftp.el newlisp/net/ange-ftp.el
*** lisp/net/ange-ftp.el Tue Oct 22 02:14:34 2002
--- newlisp/net/ange-ftp.el Mon Dec 22 19:07:32 2003
***************
*** 636,642 ****
:prefix "ange-ftp-")
(defcustom ange-ftp-name-format
! '("^/\\(\\([^@/:]*\\)@\\)?\\([^@/:]*[^@/:.]\\):\\(.*\\)" . (3 2 4))
"*Format of a fully expanded remote file name.
This is a list of the form \(REGEXP HOST USER NAME\),
--- 636,642 ----
:prefix "ange-ftp-")
(defcustom ange-ftp-name-format
! '("^/\\(\\([^/:]*\\)@\\)?\\([^/:]*[^/:.]\\):\\(.*\\)" . (3 2 4))
"*Format of a fully expanded remote file name.
This is a list of the form \(REGEXP HOST USER NAME\),
***************
*** 644,650 ****
the full remote name, and HOST, USER, and NAME are the numbers of
parenthesized expressions in REGEXP for the components (in that order)."
:group 'ange-ftp
! :type '(list regexp
(integer :tag "Host group")
(integer :tag "User group")
(integer :tag "Name group")))
--- 644,650 ----
the full remote name, and HOST, USER, and NAME are the numbers of
parenthesized expressions in REGEXP for the components (in that order)."
:group 'ange-ftp
! :type '(list (regexp :tag "Name regexp")
(integer :tag "Host group")
(integer :tag "User group")
(integer :tag "Name group")))
Recent input:
N/A
Recent messages:
N/A
I've really appreciated ange-ftp, and was surprised a number of years
ago to find my name inside. I'm glad, once again, to contribute back
to a package that's contributed so much to me over the years.
Thanks,
Michael R. Wolf (formerly Mike Balenger)
--
Michael R. Wolf
All mammals learn by playing!
MichaelRWolf@att.net
reply other threads:[~2003-12-23 5:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=uad5k5bs0.fsf@att.net \
--to=michaelrwolf@att.net \
/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.