+2011-01-27 Lars Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-art.el (article-update-date-lapsed): Ensure that point stays at
+ the "same place" even if point is on the line being replaced.
+ (article-update-date-lapsed): Allow updating both the combined lapsed
+ and the lapsed headers.
+ (article-update-date-lapsed): Skip past all the X-Sent/Date headers.
+ (article-make-date-line): Limit the number of segments dynamically to
+ avoid too-long lines.
+
+2011-01-27 Julien Danjou <julien@danjou.info>
+
+ * mml2015.el (mml2015-epg-sign): Add and use mml2015-sign-with-sender.
+ (mml2015-epg-encrypt): Use mml2015-sign-with-sender.
+
2011-01-27 Katsumi Yamaoka <yamaoka@jpl.org>
* shr.el (shr-expand-newlines, shr-previous-newline-padding-width):
(concat "X-Sent: " (article-lapsed-string time)))
;; A combined date/lapsed format.
((eq type 'combined-lapsed)
- (concat (article-make-date-line date 'original)
- " (" (article-lapsed-string time 3) ")"))
+ (let ((date-string (article-make-date-line date 'original))
+ (segments 3)
+ lapsed-string)
+ (while (and
+ (setq lapsed-string
+ (concat " (" (article-lapsed-string time segments) ")"))
+ (> (+ (length date-string)
+ (length lapsed-string))
+ (+ fill-column 10))
+ (> segments 0))
+ (setq segments (1- segments)))
+ (if (> segments 0)
+ (concat date-string lapsed-string)
+ date-string)))
;; Display the date in proper English
((eq type 'english)
(let ((dtime (decode-time time)))
"Function to be run from a timer to update the lapsed time line."
(save-match-data
(let (deactivate-mark)
- (save-excursion
+ (save-window-excursion
(ignore-errors
(walk-windows
(lambda (w)
(set-buffer (window-buffer w))
(when (eq major-mode 'gnus-article-mode)
- (let ((mark (point-marker)))
+ (let ((mark (point-marker))
+ (old-point (point)))
(goto-char (point-min))
(when (re-search-forward "^X-Sent:\\|^Date:" nil t)
- (if gnus-treat-date-combined-lapsed
- (article-date-combined-lapsed t)
+ ;; If the point is on the Date line, then use that
+ ;; absolute position. Otherwise, use the mark.
+ ;; This will ensure that point stays at the "same
+ ;; place".
+ (when (or (< old-point (match-beginning 0))
+ (> old-point (progn
+ (forward-line 1)
+ (while (and (not (eobp))
+ (looking-at "X-Sent:\\|Date:"))
+ (forward-line))
+ (point))))
+ (setq old-point nil))
+ (when gnus-treat-date-combined-lapsed
+ (article-date-combined-lapsed t))
+ (when gnus-treat-date-lapsed
(article-date-lapsed t)))
- (goto-char (marker-position mark))
+ (goto-char (or old-point (marker-position mark)))
(move-marker mark nil))))
nil 'visible))))))
:group 'mime-security
:type '(repeat (string :tag "Key ID")))
+(defcustom mml2015-sign-with-sender nil
+ "If t, use message sender so find a key to sign with."
+ :group 'mime-security
+ :type 'boolean
+ :version "24.1")
+
(defcustom mml2015-encrypt-to-self nil
"If t, add your own key ID to recipient list when encryption."
:group 'mime-security
(let* ((inhibit-redisplay t)
(context (epg-make-context))
(boundary (mml-compute-boundary cont))
- (sender (message-options-get 'message-sender))
+ (sender (when mml2015-sign-with-sender
+ message-options-get 'message-sender))
signer-key
(signers
(or (message-options-get 'mml2015-epg-signers)
(let ((inhibit-redisplay t)
(context (epg-make-context))
(config (epg-configuration))
- (sender (message-options-get 'message-sender))
+ (sender (when mml2015-sign-with-sender
+ (message-options-get 'message-sender)))
(recipients (message-options-get 'mml2015-epg-recipients))
cipher signers
(boundary (mml-compute-boundary cont))