+2006-11-24 Eli Zaretskii <eliz@gnu.org>
+
+ * smtpmail.el (smtpmail-send-it):
+ Copy buffer-file-coding-system from the mail buffer. Possibly add a
+ MIME header for the message encoding.
+ Bind coding-system-for-write around the call to mail-do-fcc.
+ Use smtpmail-code-conv-from to encode queued mail messages.
+
2006-10-02 MIYOSHI Masanori <miyoshi@meadowy.org> (tiny change)
- * mail/smtpmail.el (smtpmail-try-auth-methods): Fix typo in
+ * smtpmail.el (smtpmail-try-auth-methods): Fix typo in
2006-09-28 commit.
2006-09-28 Osamu Yamane <yamane@green.ocn.ne.jp> (tiny change)
- * mail/smtpmail.el (smtpmail-try-auth-methods): Do not break long
+ * smtpmail.el (smtpmail-try-auth-methods): Do not break long
lines in base64-encoded authentication response.
2006-09-04 Chong Yidong <cyd@stupidchicken.com>
(save-excursion
(set-buffer tembuf)
(erase-buffer)
+ ;; Use the same buffer-file-coding-system as in the mail
+ ;; buffer, otherwise any write-region invocations (e.g., in
+ ;; mail-do-fcc below) will annoy with asking for a suitable
+ ;; encoding.
+ (set-buffer-file-coding-system smtpmail-code-conv-from nil t)
(insert-buffer-substring mailbuf)
(goto-char (point-max))
;; require one newline at the end.
(goto-char (point-min))
(unless (re-search-forward "^Date:" delimline t)
(insert "Date: " (message-make-date) "\n"))
+ ;; Possibly add a MIME header for the current coding system
+ (let (charset)
+ (goto-char (point-min))
+ (and (eq mail-send-nonascii 'mime)
+ (not (re-search-forward "^MIME-version:" delimline t))
+ (progn (skip-chars-forward "\0-\177")
+ (/= (point) (point-max)))
+ smtpmail-code-conv-from
+ (setq charset
+ (coding-system-get smtpmail-code-conv-from
+ 'mime-charset))
+ (goto-char delimline)
+ (insert "MIME-version: 1.0\n"
+ "Content-type: text/plain; charset="
+ (symbol-name charset)
+ "\nContent-Transfer-Encoding: 8bit\n")))
;; Insert an extra newline if we need it to work around
;; Sun's bug that swallows newlines.
(goto-char (1+ delimline))
;; Find and handle any FCC fields.
(goto-char (point-min))
(if (re-search-forward "^FCC:" delimline t)
- (mail-do-fcc delimline))
+ ;; Force mail-do-fcc to use the encoding of the mail
+ ;; buffer to encode outgoing messages on FCC files.
+ (let ((coding-system-for-write smtpmail-code-conv-from))
+ (mail-do-fcc delimline)))
(if mail-interactive
(with-current-buffer errbuf
(erase-buffer))))
(make-directory smtpmail-queue-dir t))
(with-current-buffer buffer-data
(erase-buffer)
+ (set-buffer-file-coding-system smtpmail-code-conv-from nil t)
(insert-buffer-substring tembuf)
(write-file file-data)
(set-buffer buffer-elisp)
+2006-11-24 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * pgg-pgp.el (pgg-pgp-process-region): Change `args' from a list of
+ strings to a single string. Quote `errors-file-name'.
+ (pgg-pgp-encrypt-region, pgg-pgp-decrypt-region, pgg-pgp-sign-region)
+ (pgg-pgp-verify-region, pgg-pgp-insert-key, pgg-pgp-snarf-keys-region):
+ Adjust calls. Use `shell-quote-argument'.
+
+2006-11-24 Juanma Barranquero <lekktu@gmail.com>
+
+ * gnus-agent.el (gnus-agent-expire-unagentized-dirs)
+ (gnus-agent-regenerate-group): Fix space/tab mixup in messages.
+
+ * gnus-art.el (gnus-article-x-face-command, gnus-numeric-save-name):
+ * gnus-group.el (gnus-group-sort-function, gnus-group-line-format)
+ (gnus-group-mode, gnus-group-read-group, gnus-group-delete-group)
+ (gnus-group-make-directory-group, gnus-group-transpose-groups):
+ * gnus-start.el (gnus-options-subscribe, gnus-options-not-subscribe)
+ (gnus-subscribe-newsgroup, gnus-1):
+ * gnus-sum.el (gnus-summary-make-false-root, gnus-make-threads):
+ * gnus.el (gnus-nntp-server, gnus-use-cross-reference)
+ (gnus-valid-select-methods, total-expire, gnus-summary-line-format)
+ (gnus-group-read-only-p): Fix space/tab mixup in docstrings.
+
2006-11-24 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-sum.el (gnus-summary-limit-to-headers): New command and
;; Local Variables:
;; coding: iso-2022-7bit
;; fill-column: 79
+;; add-log-time-zone-rule: t
;; End:
;;; arch-tag: 3f33a3e7-090d-492b-bedd-02a1417d32b4
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; For each article that I processed that is no longer
;; undownloaded, remove its processable mark.
- (mapc #'gnus-summary-remove-process-mark
+ (mapc #'gnus-summary-remove-process-mark
(gnus-sorted-ndifference gnus-newsgroup-processable gnus-newsgroup-undownloaded))
;; The preceeding call to (gnus-agent-summary-fetch-group)
;; First, we'll fix the sort.
(sort-numeric-fields 1 (point-min) (point-max))
- ;; but now we have to consider that we may have duplicate rows...
+ ;; but now we have to consider that we may have duplicate rows...
;; so reset to beginning of file
(goto-char (point-min))
(setq last -134217728)
-
+
;; and throw a code that restarts this scan
(throw 'problems t))
nil))))))
(or gnus-expert-user
(gnus-y-or-n-p
"gnus-agent-expire has identified local directories that are\
- not currently required by any agentized group. Do you wish to consider\
+ not currently required by any agentized group. Do you wish to consider\
deleting them?")))
(while to-remove
(let ((dir (pop to-remove)))
(dir (file-name-directory file))
point
(downloaded (if (file-exists-p dir)
- (sort (delq nil (mapcar (lambda (name)
+ (sort (delq nil (mapcar (lambda (name)
(and (not (file-directory-p (nnheader-concat dir name)))
(string-to-number name)))
(directory-files dir nil "^[0-9]+$" t)))
(gnus-agent-possibly-alter-active group group-active)))))
(when (and reread gnus-agent-article-alist)
- (gnus-agent-synchronize-group-flags
- group
+ (gnus-agent-synchronize-group-flags
+ group
(list (list
(if (listp reread)
reread
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
display -"))
"*String or function to be executed to display an X-Face header.
If it is a string, the command will be executed in a sub-shell
-asynchronously. The compressed face will be piped to this command."
+asynchronously. The compressed face will be piped to this command."
:type `(choice string
(function-item gnus-display-x-face-in-from)
function)
(defun gnus-numeric-save-name (newsgroup headers &optional last-file)
"Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE.
If variable `gnus-use-long-file-name' is non-nil, it is
-~/News/news.group/num. Otherwise, it is like ~/News/news/group/num."
+~/News/news.group/num. Otherwise, it is like ~/News/news/group/num."
(let ((default
(expand-file-name
(concat (if (gnus-use-long-file-name 'not-save)
`gnus-group-sort-by-score', `gnus-group-sort-by-method',
`gnus-group-sort-by-server', and `gnus-group-sort-by-rank'.
-This variable can also be a list of sorting functions. In that case,
+This variable can also be a list of sorting functions. In that case,
the most significant sort function should be the last function in the
list."
:group 'gnus-group-listing
Note that this format specification is not always respected. For
reasons of efficiency, when listing killed groups, this specification
-is ignored altogether. If the spec is changed considerably, your
+is ignored altogether. If the spec is changed considerably, your
output may end up looking strange when listing both alive and killed
groups.
All normal editing commands are switched off.
\\<gnus-group-mode-map>
-The group buffer lists (some of) the groups available. For instance,
+The group buffer lists (some of) the groups available. For instance,
`\\[gnus-group-list-groups]' will list all subscribed groups with unread articles, while `\\[gnus-group-list-zombies]'
lists all zombie groups.
If the prefix argument ALL is non-nil, already read articles become
readable. IF ALL is a number, fetch this number of articles. If the
optional argument NO-ARTICLE is non-nil, no article will be
-auto-selected upon group entry. If GROUP is non-nil, fetch that
+auto-selected upon group entry. If GROUP is non-nil, fetch that
group."
(interactive "P")
(let ((no-display (eq all 0))
(defun gnus-group-make-directory-group (dir)
"Create an nndir group.
The user will be prompted for a directory. The contents of this
-directory will be used as a newsgroup. The directory should contain
+directory will be used as a newsgroup. The directory should contain
mail messages or news articles in files that have numeric names."
(interactive
(list (read-file-name "Create group from directory: ")))
(defun gnus-group-transpose-groups (n)
"Move the current newsgroup up N places.
-If given a negative prefix, move down instead. The difference between
+If given a negative prefix, move down instead. The difference between
N and the number of steps taken is returned."
(interactive "p")
(unless (gnus-group-group-name)
(unless entry
(error "Trying to change non-existent group %s" method-only-group))
;; We have received parts of the actual group info - either the
- ;; select method or the group parameters. We first check
+ ;; select method or the group parameters. We first check
;; whether we have to extend the info, and if so, do that.
(let ((len (length info))
(total (if (eq part 'method) 5 6)))
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
(defcustom gnus-options-subscribe nil
"*All new groups matching this regexp will be subscribed unconditionally.
-Note that this variable deals only with new newsgroups. This variable
+Note that this variable deals only with new newsgroups. This variable
does not affect old newsgroups.
New groups that match this regexp will not be handled by
(defcustom gnus-options-not-subscribe nil
"*All new groups matching this regexp will be ignored.
-Note that this variable deals only with new newsgroups. This variable
+Note that this variable deals only with new newsgroups. This variable
does not affect old (already subscribed) newsgroups."
:group 'gnus-group-new
:type '(choice regexp
(defun gnus-subscribe-newsgroup (newsgroup &optional next)
"Subscribe new NEWSGROUP.
-If NEXT is non-nil, it is inserted before NEXT. Otherwise it is made
+If NEXT is non-nil, it is inserted before NEXT. Otherwise it is made
the first newsgroup."
(save-excursion
(goto-char (point-min))
(defun gnus-1 (&optional arg dont-connect slave)
"Read network news.
If ARG is non-nil and a positive number, Gnus will use that as the
-startup level. If ARG is non-nil and not a positive number, Gnus will
+startup level. If ARG is non-nil and not a positive number, Gnus will
prompt the user for the name of an NNTP server to use."
(interactive "P")
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
If this variable is `adopt', Gnus will make one of the \"children\"
the parent and mark all the step-children as such.
If this variable is `empty', the \"children\" are printed with empty
-subject fields. (Or rather, they will be printed with a string
+subject fields. (Or rather, they will be printed with a string
given by the `gnus-summary-same-subject' variable.)"
:group 'gnus-thread
:type '(choice (const :tag "off" nil)
infloop))
(defun gnus-make-threads ()
- "Go through the dependency hashtb and find the roots. Return all threads."
+ "Go through the dependency hashtb and find the roots. Return all threads."
(let (threads)
(while (catch 'infloop
(mapatoms
;; First go up in this thread until we find the root.
(setq last-id (gnus-root-id id)
headers (message-flatten-list (gnus-id-to-thread last-id)))
- ;; We have now found the real root of this thread. It might have
+ ;; We have now found the real root of this thread. It might have
;; been gathered into some loose thread, so we have to search
;; through the threads to find the thread we wanted.
(let ((threads gnus-newsgroup-threads)
(let ((case-fold-search t)
in-reply-to header p lines chars)
(goto-char (point-min))
- ;; Search to the beginning of the next header. Error messages
+ ;; Search to the beginning of the next header. Error messages
;; do not begin with 2 or 3.
(while (re-search-forward "^[23][0-9]+ " nil t)
(setq id nil
;; This implementation of this function, with nine
;; search-forwards instead of the one re-search-forward and
;; a case (which basically was the old function) is actually
- ;; about twice as fast, even though it looks messier. You
+ ;; about twice as fast, even though it looks messier. You
;; can't have everything, I guess. Speed and elegance
;; doesn't always go hand in hand.
(setq
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
(defcustom gnus-nntp-server nil
"*The name of the host running the NNTP server.
-This variable is semi-obsolete. Use the `gnus-select-method'
+This variable is semi-obsolete. Use the `gnus-select-method'
variable instead."
:group 'gnus-server
:type '(choice (const :tag "disable" nil)
(defcustom gnus-use-cross-reference t
"*Non-nil means that cross referenced articles will be marked as read.
If nil, ignore cross references. If t, mark articles as read in
-subscribed newsgroups. If neither t nor nil, mark as read in all
+subscribed newsgroups. If neither t nor nil, mark as read in all
newsgroups."
:group 'gnus-server
:type '(choice (const :tag "off" nil)
this method (i. e., `post', `mail', `none' or whatever) or other
properties that this method has (like being respoolable).
If you implement a new select method, all you should have to change is
-this variable. I think."
+this variable. I think."
:group 'gnus-server
:type '(repeat (group (string :tag "Name")
(radio-button-choice (const :format "%v " post)
"*Groups in which to perform expiry of all read articles.
Use with extreme caution. All groups that match this regexp will be
expiring - which means that all read articles will be deleted after
-\(say) one week. (This only goes for mail groups and the like, of
+\(say) one week. (This only goes for mail groups and the like, of
course.)"
:variable-group nnmail-expire
:variable-type '(choice (const nil)
The %U (status), %R (replied) and %z (zcore) specs have to be handled
with care. For reasons of efficiency, Gnus will compute what column
these characters will end up in, and \"hard-code\" that. This means that
-it is invalid to have these specs after a variable-length spec. Well,
+it is invalid to have these specs after a variable-length spec. Well,
you might not be arrested, but your summary buffer will look strange,
which is bad enough.
(defun gnus-group-read-only-p (&optional group)
"Check whether GROUP supports editing or not.
-If GROUP is nil, `gnus-newsgroup-name' will be checked instead. Note
+If GROUP is nil, `gnus-newsgroup-name' will be checked instead. Note
that that variable is buffer-local to the summary buffers."
(let ((group (or group gnus-newsgroup-name)))
(not (gnus-check-backend-function 'request-replace-article group))))
(not method)))
(defun gnus-server-extend-method (group method)
- ;; This function "extends" a virtual server. If the server is
+ ;; This function "extends" a virtual server. If the server is
;; "hello", and the select method is ("hello" (my-var "something"))
;; in the group "alt.alt", this will result in a new virtual server
;; called "hello+alt.alt".
(defun pgg-pgp-process-region (start end passphrase program args)
(let* ((errors-file-name (pgg-make-temp-file "pgg-errors"))
(args
- (append args
+ (concat args
pgg-pgp-extra-args
- (list (concat "2>" errors-file-name))))
+ " 2>" (shell-quote-argument errors-file-name)))
(shell-file-name pgg-pgp-shell-file-name)
(shell-command-switch pgg-pgp-shell-command-switch)
(process-environment process-environment)
(let ((coding-system-for-read 'binary)
(coding-system-for-write 'binary))
(setq process
- (apply #'funcall
- #'start-process-shell-command "*PGP*" output-buffer
- program args)))
+ (start-process-shell-command "*PGP*" output-buffer
+ (concat program " " args))))
(set-process-sentinel process #'ignore)
(when passphrase
(process-send-string process (concat passphrase "\n")))
pgg-pgp-user-id)
pgg-pgp-user-id))))
(args
- (append
- `("+encrypttoself=off +verbose=1" "+batchmode"
- "+language=us" "-fate"
- ,@(if recipients
- (mapcar (lambda (rcpt) (concat "\"" rcpt "\""))
- (append recipients
- (if pgg-encrypt-for-me
- (list pgg-pgp-user-id))))))
- (if sign '("-s" "-u" pgg-pgp-user-id)))))
+ (concat
+ "+encrypttoself=off +verbose=1 +batchmode +language=us -fate "
+ (if recipients
+ (mapconcat 'shell-quote-argument
+ (append recipients
+ (if pgg-encrypt-for-me
+ (list pgg-pgp-user-id)))))
+ (if sign (concat " -s -u " (shell-quote-argument pgg-pgp-user-id))))))
(pgg-pgp-process-region start end nil pgg-pgp-program args)
(pgg-process-when-success nil)))
(pgg-read-passphrase
(format "PGP passphrase for %s: " pgg-pgp-user-id) key)))
(args
- '("+verbose=1" "+batchmode" "+language=us" "-f")))
+ "+verbose=1 +batchmode +language=us -f"))
(pgg-pgp-process-region start end passphrase pgg-pgp-program args)
(pgg-process-when-success
(if pgg-cache-passphrase
(format "PGP passphrase for %s: " pgg-pgp-user-id)
(pgg-pgp-lookup-key pgg-pgp-user-id 'sign))))
(args
- (list (if clearsign "-fast" "-fbast")
- "+verbose=1" "+language=us" "+batchmode"
- "-u" pgg-pgp-user-id)))
+ (concat (if clearsign "-fast" "-fbast")
+ " +verbose=1 +language=us +batchmode"
+ " -u " (shell-quote-argument pgg-pgp-user-id))))
(pgg-pgp-process-region start end passphrase pgg-pgp-program args)
(pgg-process-when-success
(goto-char (point-min))
(defun pgg-pgp-verify-region (start end &optional signature)
"Verify region between START and END as the detached signature SIGNATURE."
(let* ((orig-file (pgg-make-temp-file "pgg"))
- (args '("+verbose=1" "+batchmode" "+language=us"))
+ (args "+verbose=1 +batchmode +language=us")
(orig-mode (default-file-modes)))
(unwind-protect
(progn
(if (stringp signature)
(progn
(copy-file signature (setq signature (concat orig-file ".asc")))
- (setq args (append args (list signature orig-file))))
- (setq args (append args (list orig-file))))
+ (setq args (concat args " " (shell-quote-argument signature)))))
+ (setq args (concat args " " (shell-quote-argument orig-file)))
(pgg-pgp-process-region (point)(point) nil pgg-pgp-program args)
(delete-file orig-file)
(if signature (delete-file signature))
"Insert public key at point."
(let* ((pgg-pgp-user-id (or pgg-pgp-user-id pgg-default-user-id))
(args
- (list "+verbose=1" "+batchmode" "+language=us" "-kxaf"
- (concat "\"" pgg-pgp-user-id "\""))))
+ (concat "+verbose=1 +batchmode +language=us -kxaf "
+ (shell-quote-argument pgg-pgp-user-id))))
(pgg-pgp-process-region (point)(point) nil pgg-pgp-program args)
(insert-buffer-substring pgg-output-buffer)))
(let* ((pgg-pgp-user-id (or pgg-pgp-user-id pgg-default-user-id))
(key-file (pgg-make-temp-file "pgg"))
(args
- (list "+verbose=1" "+batchmode" "+language=us" "-kaf"
- key-file)))
+ (concat "+verbose=1 +batchmode +language=us -kaf "
+ (shell-quote-argument key-file))))
(let ((coding-system-for-write 'raw-text-dos))
(write-region start end key-file))
(pgg-pgp-process-region start end nil pgg-pgp-program args)
(provide 'pgg-pgp)
-;;; arch-tag: 076b7801-37b2-49a6-97c3-218fdecde33c
+;; arch-tag: 076b7801-37b2-49a6-97c3-218fdecde33c
;;; pgg-pgp.el ends here