unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Sergey Poznyakoff <gray@Mirddin.farlep.net>
Subject: rmail.el
Date: Thu, 24 Feb 2005 17:20:47 +0200	[thread overview]
Message-ID: <200502241520.j1OFKlo06750@Mirddin.farlep.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

Hello,

Attached is the patch to rmail.el. ChangeLog entry:

2005-02-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>

	    * mail/rmail.el (rmail-parse-url): Bugfix. Parse traditional
	    mailbox specifications as well as urls.
	    (rmail-insert-inbox-text): Remove unused conditional branches

Regards,
Sergey
	    


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch; name="cvs-diff.log", Size: 3640 bytes --]

Index: lisp/mail/rmail.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mail/rmail.el,v
retrieving revision 1.396
diff -p -u -r1.396 rmail.el
--- lisp/mail/rmail.el	9 Feb 2005 15:50:37 -0000	1.396
+++ lisp/mail/rmail.el	24 Feb 2005 14:59:31 -0000
@@ -1620,13 +1620,15 @@ a remote mailbox, PASSWORD is the passwo
 supplied as a separate argument to `movemail' or nil otherwise, GOT-PASSWORD
 is non-nil if the user has supplied the password interactively.
 "
-  (if (string-match "^\\([^:]+\\)://\\(\\([^:@]+\\)\\(:\\([^@]+\\)\\)?@\\)?.*" file)
+  (cond
+   ((string-match "^\\([^:]+\\)://\\(\\([^:@]+\\)\\(:\\([^@]+\\)\\)?@\\)?.*" file)
       (let (got-password supplied-password
 	    (proto (match-string 1 file))
 	    (user  (match-string 3 file))
 	    (pass  (match-string 5 file))
 	    (host  (substring file (or (match-end 2)
 				       (+ 3 (match-end 1))))))
+	
 	(if (not pass)
 	    (when rmail-remote-password-required
 	      (setq got-password (not (rmail-have-password)))
@@ -1643,8 +1645,22 @@ is non-nil if the user has supplied the 
 	  (list file
 		(or (string-equal proto "pop") (string-equal proto "imap"))
 		supplied-password
-		got-password)))
-    (list file nil nil nil)))
+		got-password))))
+   
+   ((string-match "^po:\\([^:]+\\)\\(:\\(.*\\)\\)?" file)
+    (let (got-password supplied-password
+          (proto "pop")
+	  (user  (match-string 1 file))
+	  (host  (match-string 3 file)))
+      
+      (when rmail-remote-password-required
+	(setq got-password (not (rmail-have-password)))
+	(setq supplied-password (rmail-get-remote-password nil)))
+
+      (list file "pop" supplied-password got-password)))
+   
+   (t
+    (list file nil nil nil))))
 
 (defun rmail-insert-inbox-text (files renamep)
   ;; Detect a locked file now, so that we avoid moving mail
@@ -1684,15 +1700,7 @@ is non-nil if the user has supplied the 
 		     (expand-file-name buffer-file-name))))
       ;; Always use movemail to rename the file,
       ;; since there can be mailboxes in various directories.
-      (setq movemail t)
-;;;      ;; If getting from mail spool directory,
-;;;      ;; use movemail to move rather than just renaming,
-;;;      ;; so as to interlock with the mailer.
-;;;      (setq movemail (string= file
-;;;			      (file-truename
-;;;			       (concat rmail-spool-directory
-;;;				       (file-name-nondirectory file)))))
-      (if (and movemail (not popmail))
+      (if (not popmail)
 	  (progn
 	    ;; On some systems, /usr/spool/mail/foo is a directory
 	    ;; and the actual inbox is /usr/spool/mail/foo/foo.
@@ -1714,23 +1722,6 @@ is non-nil if the user has supplied the 
 	    ((or (file-exists-p tofile) (and (not popmail)
 					     (not (file-exists-p file))))
 	     nil)
-	    ((and (not movemail) (not popmail))
-	     ;; Try copying.  If that fails (perhaps no space) and
-	     ;; we're allowed to blow away the inbox, rename instead.
-	     (if rmail-preserve-inbox
-		 (copy-file file tofile nil)
-	       (condition-case nil
-		   (copy-file file tofile nil)
-		 (error
-		  ;; Third arg is t so we can replace existing file TOFILE.
-		  (rename-file file tofile t))))
-	     ;; Make the real inbox file empty.
-	     ;; Leaving it deleted could cause lossage
-	     ;; because mailers often won't create the file.
-	     (if (not rmail-preserve-inbox)
-		 (condition-case ()
-		     (write-region (point) (point) file)
-		   (file-error nil))))
 	    (t
 	     (with-temp-buffer
 	       (let ((errors (current-buffer)))

[-- Attachment #3: Type: text/plain, Size: 5 bytes --]

	    

[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

                 reply	other threads:[~2005-02-24 15:20 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

  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=200502241520.j1OFKlo06750@Mirddin.farlep.net \
    --to=gray@mirddin.farlep.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 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).