(gnus-article-yanked-articles): New variable.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 29 Dec 2002 23:55:44 +0000 (23:55 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 29 Dec 2002 23:55:44 +0000 (23:55 +0000)
(gnus-inews-add-send-actions): Mark all answered messages as
answered.

2002-08-10  Jari Aalto  <jari.aalto@poboxes.com>

* nnmail.el (nnmail-split-it): Added tracing to
`:' split rule

2002-08-13  Hrvoje Niksic  <hniksic@xemacs.org>

* mm-decode.el (mm-mailcap-command): Remove the quotes around '%s'
and "%s" so we don't overquote them.

2002-08-13  Hrvoje Niksic  <hniksic@xemacs.org>

* (mm-display-external): Display the actual command that has been
executed in the echo area.

lisp/ChangeLog
lisp/gnus-msg.el
lisp/mm-decode.el
lisp/nnmail.el

index fcb5061..0267553 100644 (file)
@@ -1,3 +1,24 @@
+2002-12-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-msg.el (gnus-article-yanked-articles): New variable.
+       (gnus-inews-add-send-actions): Mark all answered messages as
+       answered. 
+
+2002-08-10  Jari Aalto  <jari.aalto@poboxes.com>
+
+       * nnmail.el (nnmail-split-it): Added tracing to
+       `:' split rule
+
+2002-08-13  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * mm-decode.el (mm-mailcap-command): Remove the quotes around '%s'
+       and "%s" so we don't overquote them.
+
+2002-08-13  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * (mm-display-external): Display the actual command that has been
+       executed in the echo area.
+
 2002-12-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-topic.el (gnus-topic-display-missing-topic): Bind entry. 
index 5e2ed7a..5b3a717 100644 (file)
@@ -272,6 +272,7 @@ If nil, the address field will always be empty after invoking
 (defvar gnus-inhibit-posting-styles nil
   "Inhibit the use of posting styles.")
 
+(defvar gnus-article-yanked-articles nil)
 (defvar gnus-message-buffer "*Mail Gnus*")
 (defvar gnus-article-copy nil)
 (defvar gnus-check-before-posting nil)
@@ -352,10 +353,12 @@ Thank you for your help in stamping out bugs.
   (let ((winconf (make-symbol "gnus-setup-message-winconf"))
        (buffer (make-symbol "gnus-setup-message-buffer"))
        (article (make-symbol "gnus-setup-message-article"))
+       (yanked (make-symbol "gnus-setup-yanked-articles"))
        (group (make-symbol "gnus-setup-message-group")))
     `(let ((,winconf (current-window-configuration))
           (,buffer (buffer-name (current-buffer)))
           (,article gnus-article-reply)
+          (,yanked gnus-article-yanked-articles)
           (,group gnus-newsgroup-name)
           (message-header-setup-hook
            (copy-sequence message-header-setup-hook))
@@ -377,7 +380,8 @@ Thank you for your help in stamping out bugs.
        (unwind-protect
           (progn
             ,@forms)
-        (gnus-inews-add-send-actions ,winconf ,buffer ,article ,config)
+        (gnus-inews-add-send-actions ,winconf ,buffer ,article ,config
+                                     ,yanked)
         (gnus-inews-insert-draft-meta-information ,group ,article)
         (setq gnus-message-buffer (current-buffer))
         (set (make-local-variable 'gnus-message-group-art)
@@ -475,7 +479,8 @@ Gcc: header for archiving purposes."
                         (symbol-value (car elem))))
            (throw 'found (cons (cadr elem) (caddr elem)))))))))
 
-(defun gnus-inews-add-send-actions (winconf buffer article &optional config)
+(defun gnus-inews-add-send-actions (winconf buffer article
+                                           &optional config yanked)
   (make-local-hook 'message-sent-hook)
   (add-hook 'message-sent-hook (if gnus-agent 'gnus-agent-possibly-do-gcc
                                 'gnus-inews-do-gcc) nil t)
@@ -494,8 +499,8 @@ Gcc: header for archiving purposes."
        (set-buffer ,buffer)
        ,(when article
           (if (eq config 'forward)
-              `(gnus-summary-mark-article-as-forwarded ',article)
-            `(gnus-summary-mark-article-as-replied ',article)))))
+              `(gnus-summary-mark-article-as-forwarded ',yanked)
+            `(gnus-summary-mark-article-as-replied ',yanked)))))
    'send))
 
 (put 'gnus-setup-message 'lisp-indent-function 1)
@@ -834,6 +839,7 @@ header line with the old Message-ID."
   (when article-buffer
     (gnus-copy-article-buffer))
   (let ((gnus-article-reply (and article-buffer (gnus-summary-article-number)))
+       (gnus-article-yanked-articles yank)
        (add-to-list gnus-add-to-list))
     (gnus-setup-message (cond (yank 'reply-yank)
                              (article-buffer 'reply)
@@ -1033,6 +1039,7 @@ If VERY-WIDE, make a very wide reply."
                (caar yank)
              (car yank)))
           (gnus-article-reply (or article (gnus-summary-article-number)))
+          (gnus-article-yanked-articles yank)
           (headers ""))
       ;; Stripping headers should be specified with mail-yank-ignored-headers.
       (when yank
@@ -1165,7 +1172,8 @@ For the `inline' alternatives, also see the variable
                message-forward-show-mml nil))
         (t
          (setq message-forward-as-mime (not message-forward-as-mime))))
-       (let ((gnus-article-reply (gnus-summary-article-number)))
+       (let* ((gnus-article-reply (gnus-summary-article-number))
+              (gnus-article-yanked-articles (list (list gnus-article-reply))))
          (gnus-setup-message 'forward
            (gnus-summary-select-article)
            (let ((mail-parse-charset
index 4b35fa4..0e76d92 100644 (file)
@@ -700,36 +700,33 @@ external if displayed external."
          (message "Viewing with %s" method)
          (cond
           (needsterm
-           (unwind-protect
-               (if window-system
-                   (start-process "*display*" nil
-                                  mm-external-terminal-program
-                                  "-e" shell-file-name
-                                  shell-command-switch
-                                  (mm-mailcap-command
-                                   method file (mm-handle-type handle)))
-                 (require 'term)
-                 (require 'gnus-win)
-                 (set-buffer
-                  (setq buffer
-                        (make-term "display"
-                                   shell-file-name
-                                   nil
-                                   shell-command-switch
-                                   (mm-mailcap-command
-                                    method file
-                                    (mm-handle-type handle)))))
-                 (term-mode)
-                 (term-char-mode)
-                 (set-process-sentinel
-                  (get-buffer-process buffer)
-                  `(lambda (process state)
-                     (if (eq 'exit (process-status process))
-                         (gnus-configure-windows
-                          ',gnus-current-window-configuration))))
-                 (gnus-configure-windows 'display-term))
-             (mm-handle-set-external-undisplayer handle (cons file buffer)))
-           (message "Displaying %s..." (format method file))
+           (let ((command (mm-mailcap-command
+                           method file (mm-handle-type handle))))
+             (unwind-protect
+                 (if window-system
+                     (start-process "*display*" nil
+                                    mm-external-terminal-program
+                                    "-e" shell-file-name
+                                    shell-command-switch command)
+                   (require 'term)
+                   (require 'gnus-win)
+                   (set-buffer
+                    (setq buffer
+                          (make-term "display"
+                                     shell-file-name
+                                     nil
+                                     shell-command-switch command)))
+                   (term-mode)
+                   (term-char-mode)
+                   (set-process-sentinel
+                    (get-buffer-process buffer)
+                    `(lambda (process state)
+                       (if (eq 'exit (process-status process))
+                           (gnus-configure-windows
+                            ',gnus-current-window-configuration))))
+                   (gnus-configure-windows 'display-term))
+               (mm-handle-set-external-undisplayer handle (cons file buffer)))
+             (message "Displaying %s..." command))
            'external)
           (copiousoutput
            (with-current-buffer outbuf
@@ -756,17 +753,17 @@ external if displayed external."
                   (ignore-errors (kill-buffer buffer))))))
            'inline)
           (t
-           (unwind-protect
-               (start-process "*display*"
-                              (setq buffer
-                                    (generate-new-buffer " *mm*"))
-                              shell-file-name
-                              shell-command-switch
-                              (mm-mailcap-command
-                               method file (mm-handle-type handle)))
-             (mm-handle-set-external-undisplayer
-              handle (cons file buffer)))
-           (message "Displaying %s..." (format method file))
+           (let ((command (mm-mailcap-command
+                           method file (mm-handle-type handle))))
+             (unwind-protect
+                 (start-process "*display*"
+                                (setq buffer
+                                      (generate-new-buffer " *mm*"))
+                                shell-file-name
+                                shell-command-switch command)
+               (mm-handle-set-external-undisplayer
+                handle (cons file buffer)))
+             (message "Displaying %s..." command))
            'external)))))))
 
 (defun mm-mailcap-command (method file type-list)
@@ -774,7 +771,8 @@ external if displayed external."
        (beg 0)
        (uses-stdin t)
        out sub total)
-    (while (string-match "%{\\([^}]+\\)}\\|'%s'\\|%s\\|%t\\|%%" method beg)
+    (while (string-match "%{\\([^}]+\\)}\\|'%s'\\|\"%s\"\\|%s\\|%t\\|%%"
+                        method beg)
       (push (substring method beg (match-beginning 0)) out)
       (setq beg (match-end 0)
            total (match-string 0 method)
@@ -782,7 +780,10 @@ external if displayed external."
       (cond
        ((string= total "%%")
        (push "%" out))
-       ((or (string= total "%s") (string= total "'%s'"))
+       ((or (string= total "%s")
+           ;; We do our own quoting.
+           (string= total "'%s'")
+           (string= total "\"%s\""))
        (setq uses-stdin nil)
        (push (mm-quote-arg
               (gnus-map-function mm-path-name-rewrite-functions file)) out))
index 823c86c..c5eef6c 100644 (file)
@@ -1270,6 +1270,8 @@ See the documentation for the variable `nnmail-split-fancy' for details."
 
      ;; Builtin : operation.
      ((eq (car split) ':)
+      (when nnmail-split-tracing
+       (push split nnmail-split-trace))
       (nnmail-split-it (save-excursion (eval (cdr split)))))
 
      ;; Builtin ! operation.