Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
ec3bba39
Commit
ec3bba39
authored
Jul 25, 1995
by
Richard M. Stallman
Browse files
(rmail-insert-inbox-text): Always use movemail when renaming a file.
parent
103dcb38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
23 deletions
+21
-23
lisp/mail/rmail.el
lisp/mail/rmail.el
+21
-23
No files found.
lisp/mail/rmail.el
View file @
ec3bba39
...
...
@@ -926,33 +926,31 @@ It returns t if it got any new messages."
(while files
(setq file (file-truename
(expand-file-name (substitute-in-file-name (car files))))
;;>> un*x specific <<
;; The "
+
" used to be "
~
", which is an extremely poor choice;
;; it might accidentally be deleted when space is low
;; (as happened to me!).
tofile (concat file "
+
"))
;; 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))))
popmail (string-match "
^po:
" (file-name-nondirectory file)))
tofile (expand-file-name
;; Generate name to move to from inbox name,
;; in case of multiple inboxes that need moving.
(concat "
.
newmail-
" (file-name-nondirectory file))
;; Use the directory of this rmail file
;; because it's a nuisance to use the homedir
;; if that is on a full disk and this rmail
;; file isn't.
(file-name-directory
(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)))))
(setq popmail (string-match "
^po:
" (file-name-nondirectory file)))
(if popmail (setq file (file-name-nondirectory file)
renamep t))
(if movemail
(progn
(setq tofile (expand-file-name
;; Generate name to move to from inbox name,
;; in case of multiple inboxes that need moving.
(concat "
.
newmail-
" (file-name-nondirectory file))
;; Use the directory of this rmail file
;; because it's a nuisance to use the homedir
;; if that is on a full disk and this rmail
;; file isn't.
(file-name-directory
(expand-file-name buffer-file-name))))
;; On some systems, /usr/spool/mail/foo is a directory
;; and the actual inbox is /usr/spool/mail/foo/foo.
(if (file-directory-p file)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment