* ange-ftp-name-format too restrictive & customize is broken
@ 2003-12-23 5:43 Michael R. Wolf
0 siblings, 0 replies; only message in thread
From: Michael R. Wolf @ 2003-12-23 5:43 UTC (permalink / 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-12-23 5:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-23 5:43 ange-ftp-name-format too restrictive & customize is broken Michael R. Wolf
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).