emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103665: Merge changes made in Gnus t


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103665: Merge changes made in Gnus trunk.
Date: Tue, 15 Mar 2011 22:38:41 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103665
author: Gnus developers <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Tue 2011-03-15 22:38:41 +0000
message:
  Merge changes made in Gnus trunk.
  
  message.texi (Insertion Variables): Document message-cite-style.
  nnimap.el (nnimap-open-connection-1): Allow `network-only', too.
  gssapi.el: New file separated out from imap.el to provide a general Kerberos 
5 connection facility for Emacs.
  message.el (message-elide-ellipsis): Document the format spec ellipsis.
  message.el (message-elide-region): Allow the ellipsis to say how many lines 
were removed.
  gnus-win.el (gnus-configure-frame): Protect against trying to restore window 
configurations containing buffers that are now dead.
  nnimap.el (nnimap-parse-flags): Remove all MODSEQ entries before parsing to 
avoid integer overflows.
   (nnimap-parse-flags): Simplify the last change.
   (nnimap-parse-flags): Store HIGHESTMODSEQ as a string, since it may be too 
large for 32-bit Emacsen.
  gnus-art.el (gnus-article-treat-body-boundary): Fix boundary width on XEmacs, 
which was one character too wide.
  gnus-sum.el (gnus-articles-to-read): Use gnus-large-newsgroup as default 
number of articles to display.
   (gnus-articles-to-read): Use pretty names for prompt.
  gnus-int.el (gnus-open-server): Ditto.
  gnus-start.el (gnus-activate-group): Give a backtrace if debug-on-quit is set 
and the user hits `C-g'.
   (gnus-read-active-file): Ditto.
  gnus-group.el (gnus-group-read-ephemeral-group): Ditto.
added:
  lisp/gnus/gssapi.el
modified:
  doc/misc/ChangeLog
  doc/misc/message.texi
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-art.el
  lisp/gnus/gnus-group.el
  lisp/gnus/gnus-int.el
  lisp/gnus/gnus-start.el
  lisp/gnus/gnus-sum.el
  lisp/gnus/gnus-win.el
  lisp/gnus/message.el
  lisp/gnus/nnimap.el
=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog        2011-03-14 16:39:58 +0000
+++ b/doc/misc/ChangeLog        2011-03-15 22:38:41 +0000
@@ -1,4 +1,8 @@
-2011-03-14  Michael Albinus <address@hidden>
+2011-03-15  Antoine Levitt  <address@hidden>
+
+       * message.texi (Insertion Variables): Document message-cite-style.
+
+2011-03-14  Michael Albinus  <address@hidden>
 
        * tramp.texi (Remote processes): New subsection "Running shell on
        a remote host".

=== modified file 'doc/misc/message.texi'
--- a/doc/misc/message.texi     2011-03-08 14:26:05 +0000
+++ b/doc/misc/message.texi     2011-03-15 22:38:41 +0000
@@ -1930,6 +1930,25 @@
 @section Insertion Variables
 
 @table @code
address@hidden message-cite-style
address@hidden message-cite-style
+The overall style to be used when replying to messages. This controls
+things like where the reply should be put relative to the original,
+how the citation is formatted, where the signature goes, etc.
+
+Value is either @code{nil} (no variable overrides) or a let-style list
+of pairs @code{(VARIABLE VALUE)} to override default values.
+
+See @code{gnus-posting-styles} to set this variable for specific
+groups. Presets to impersonate popular mail agents are available in the
address@hidden variables.
+
address@hidden message-cite-reply-position
address@hidden message-cite-reply-position
+Where the reply should be positioned. Available styles are
address@hidden to reply inline, @code{above} for top-posting, and
address@hidden for bottom-posting
+
 @item message-ignored-cited-headers
 @vindex message-ignored-cited-headers
 All headers that match this regexp will be removed from yanked

=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2011-03-15 17:39:56 +0000
+++ b/lisp/gnus/ChangeLog       2011-03-15 22:38:41 +0000
@@ -1,8 +1,55 @@
+2011-03-15  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * nnimap.el (nnimap-open-connection-1): Allow `network-only', too.
+
+       * gssapi.el: New file separated out from imap.el to provide a general
+       Kerberos 5 connection facility for Emacs.
+
+       * message.el (message-elide-ellipsis): Document the format spec
+       ellipsis.
+
+2011-03-15  Reiner Steib  <address@hidden>
+
+       * message.el (message-elide-region): Allow the ellipsis to say how many
+       lines were removed.
+
+2011-03-15  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * gnus-win.el (gnus-configure-frame): Protect against trying to restore
+       window configurations containing buffers that are now dead.
+
+       * nnimap.el (nnimap-parse-flags): Remove all MODSEQ entries before
+       parsing to avoid integer overflows.
+       (nnimap-parse-flags): Simplify the last change.
+       (nnimap-parse-flags): Store HIGHESTMODSEQ as a string, since it may be
+       too large for 32-bit Emacsen.
+
 2011-03-15  Stefan Monnier  <address@hidden>
 
        * auth-source.el (auth-source-netrc-create):
        * message.el (message-yank-original): Fix use of `case'.
 
+2011-03-15  Nelson Ferreira  <address@hidden>  (tiny change)
+
+       * gnus-art.el (gnus-article-treat-body-boundary): Fix boundary width on
+       XEmacs, which was one character too wide.
+
+2011-03-09  Antoine Levitt  <address@hidden>
+
+       * gnus-sum.el (gnus-articles-to-read): Use gnus-large-newsgroup as
+       default number of articles to display.
+       (gnus-articles-to-read): Use pretty names for prompt.
+
+2011-03-15  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * gnus-int.el (gnus-open-server): Ditto.
+
+       * gnus-start.el (gnus-activate-group): Give a backtrace if
+       debug-on-quit is set and the user hits `C-g'.
+       (gnus-read-active-file): Ditto.
+
+       * gnus-group.el (gnus-group-read-ephemeral-group): Ditto.
+
 2011-03-15  Teodor Zlatanov  <address@hidden>
 
        * message.el (message-yank-original): Use cond instead of CL case.

=== modified file 'lisp/gnus/gnus-art.el'
--- a/lisp/gnus/gnus-art.el     2011-03-02 12:34:12 +0000
+++ b/lisp/gnus/gnus-art.el     2011-03-15 22:38:41 +0000
@@ -2337,10 +2337,12 @@
       (let ((start (point)))
        (insert "X-Boundary: ")
        (gnus-add-text-properties start (point) '(invisible t intangible t))
-       (insert (let (str)
-                 (while (>= (window-width) (length str))
+       (insert (let (str (max (window-width)))
+                 (if (featurep 'xemacs)
+                     (setq max (1- max)))
+                 (while (>= max (length str))
                    (setq str (concat str gnus-body-boundary-delimiter)))
-                 (substring str 0 (window-width)))
+                 (substring str 0 max))
                "\n")
        (gnus-put-text-property start (point) 'gnus-decoration 'header)))))
 

=== modified file 'lisp/gnus/gnus-group.el'
--- a/lisp/gnus/gnus-group.el   2011-03-05 21:56:00 +0000
+++ b/lisp/gnus/gnus-group.el   2011-03-15 22:38:41 +0000
@@ -2313,9 +2313,10 @@
                       gnus-fetch-old-ephemeral-headers))
                  (gnus-group-read-group (or number t) t group select-articles))
            group)
-       ;;(error nil)
        (quit
-        (message "Quit reading the ephemeral group")
+        (if debug-on-quit
+            (debug "Quit")
+          (message "Quit reading the ephemeral group"))
         nil)))))
 
 (defcustom gnus-gmane-group-download-format

=== modified file 'lisp/gnus/gnus-int.el'
--- a/lisp/gnus/gnus-int.el     2011-01-28 02:07:48 +0000
+++ b/lisp/gnus/gnus-int.el     2011-03-15 22:38:41 +0000
@@ -270,7 +270,9 @@
                               server (error-message-string err))
                 nil)
                (quit
-                (gnus-message 1 "Quit trying to open server %s" server)
+                (if debug-on-quit
+                    (debug "Quit")
+                  (gnus-message 1 "Quit trying to open server %s" server))
                 nil)))
             open-offline)
        ;; If this hasn't been opened before, we add it to the list.

=== modified file 'lisp/gnus/gnus-start.el'
--- a/lisp/gnus/gnus-start.el   2011-03-08 14:26:05 +0000
+++ b/lisp/gnus/gnus-start.el   2011-03-15 22:38:41 +0000
@@ -1462,9 +1462,10 @@
               (inline (gnus-request-group group (or dont-sub-check dont-check)
                                           method
                                           (gnus-get-info group)))
-            ;;(error nil)
             (quit
-             (message "Quit activating %s" group)
+             (if debug-on-quit
+                 (debug "Quit")
+               (message "Quit activating %s" group))
              nil)))
         (unless dont-check
           (setq active (gnus-parse-active))
@@ -2004,7 +2005,9 @@
              ;; We catch C-g so that we can continue past servers
              ;; that do not respond.
              (quit
-              (message "Quit reading the active file")
+              (if debug-on-quit
+                  (debug "Quit")
+                (message "Quit reading the active file"))
               nil))))))))
 
 (defun gnus-read-active-file-1 (method force)

=== modified file 'lisp/gnus/gnus-sum.el'
--- a/lisp/gnus/gnus-sum.el     2011-03-05 13:01:56 +0000
+++ b/lisp/gnus/gnus-sum.el     2011-03-15 22:38:41 +0000
@@ -5848,13 +5848,13 @@
                         (input
                          (read-string
                           (format
-                           "How many articles from %s (%s %d): "
-                           (gnus-group-decoded-name gnus-newsgroup-name)
-                           (if initial "max" "default")
-                           number)
-                          (if initial
-                              (cons (number-to-string initial)
-                                    0)))))
+                           "How many articles from %s (available %d, default 
%d): "
+                           (gnus-group-decoded-name (gnus-group-real-name 
gnus-newsgroup-name))
+                           number
+                           (or initial gnus-large-newsgroup))
+                          nil
+                          nil
+                          (number-to-string (or initial 
gnus-large-newsgroup)))))
                    (if (string-match "^[ \t]*$" input) number input)))
                 ((and (> scored marked) (< scored number)
                       (> (- scored number) 20))
@@ -5862,7 +5862,7 @@
                         (read-string
                          (format "%s %s (%d scored, %d total): "
                                  "How many articles from"
-                                 (gnus-group-decoded-name group)
+                                 (gnus-group-decoded-name 
(gnus-group-real-name gnus-newsgroup-name))
                                  scored number))))
                    (if (string-match "^[ \t]*$" input)
                        number input)))

=== modified file 'lisp/gnus/gnus-win.el'
--- a/lisp/gnus/gnus-win.el     2011-01-28 23:07:38 +0000
+++ b/lisp/gnus/gnus-win.el     2011-03-15 22:38:41 +0000
@@ -268,8 +268,10 @@
            (error "Invalid buffer type: %s" type))
          (let ((buf (gnus-get-buffer-create
                      (gnus-window-to-buffer-helper buffer))))
-           (if (eq buf (window-buffer (selected-window))) (set-buffer buf)
-             (switch-to-buffer buf)))
+           (when (buffer-name buf)
+             (if (eq buf (window-buffer (selected-window)))
+                 (set-buffer buf)
+               (switch-to-buffer buf))))
          (when (memq 'frame-focus split)
            (setq gnus-window-frame-focus window))
          ;; We return the window if it has the `point' spec.

=== added file 'lisp/gnus/gssapi.el'
--- a/lisp/gnus/gssapi.el       1970-01-01 00:00:00 +0000
+++ b/lisp/gnus/gssapi.el       2011-03-15 22:38:41 +0000
@@ -0,0 +1,105 @@
+;;; gssapi.el --- GSSAPI/Kerberos 5 interface for Emacs
+
+;; Copyright (C) 2011 Free Software Foundation, Inc.
+
+;; Author: Simon Josefsson <address@hidden>
+;;         Lars Magne Ingebrigtsen <address@hidden>
+;; Keywords: network
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; 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
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'format-spec)
+
+(defcustom gssapi-program (list
+                          (concat "gsasl %s %p "
+                                  "--mechanism GSSAPI "
+                                  "--authentication-id %l")
+                          "imtest -m gssapi -u %l -p %p %s")
+  "List of strings containing commands for GSSAPI (krb5) authentication.
+%s is replaced with server hostname, %p with port to connect to, and
+%l with the value of `imap-default-user'.  The program should accept
+IMAP commands on stdin and return responses to stdout.  Each entry in
+the list is tried until a successful connection is made."
+  :group 'network
+  :type '(repeat string))
+
+(defun open-gssapi-stream (name buffer server port)
+  (let ((cmds gssapi-program)
+       cmd done)
+    (with-current-buffer buffer
+      (while (and (not done)
+                 (setq cmd (pop cmds)))
+       (message "Opening GSSAPI connection with `%s'..." cmd)
+       (erase-buffer)
+       (let* ((coding-system-for-read 'binary)
+              (coding-system-for-write 'binary)
+              (process (start-process
+                        name buffer shell-file-name shell-command-switch
+                        (format-spec
+                         cmd
+                         (format-spec-make
+                          ?s server
+                          ?p (number-to-string port)
+                          ?l imap-default-user))))
+              response)
+         (when process
+           (while (and (memq (process-status process) '(open run))
+                       (goto-char (point-min))
+                       ;; Athena IMTEST can output SSL verify errors
+                       (or (while (looking-at "^verify error:num=")
+                             (forward-line))
+                           t)
+                       (or (while (looking-at "^TLS connection established")
+                             (forward-line))
+                           t)
+                       ;; cyrus 1.6.x (13? < x <= 22) queries capabilities
+                       (or (while (looking-at "^C:")
+                             (forward-line))
+                           t)
+                       ;; cyrus 1.6 imtest print "S: " before server greeting
+                       (or (not (looking-at "S: "))
+                           (forward-char 3)
+                           t)
+                       ;; GNU SASL may print 'Trying ...' first.
+                       (or (not (looking-at "Trying "))
+                           (forward-line)
+                           t)
+                       (not (and (looking-at "\\* \\(OK\\|PREAUTH\\|BYE\\) ")
+                                 ;; success in imtest 1.6:
+                                 (re-search-forward
+                                  (concat "^\\(\\(Authenticat.*\\)\\|\\("
+                                          "Client authentication "
+                                          "finished.*\\)\\)")
+                                  nil t)
+                                 (setq response (match-string 1)))))
+             (accept-process-output process 1)
+             (sit-for 1))
+           (erase-buffer)
+           (message "GSSAPI IMAP connection: %s" (or response "failed"))
+           (if (and response (let ((case-fold-search nil))
+                               (not (string-match "failed" response))))
+               (setq done process)
+             (delete-process process)
+             nil))))
+      done)))
+
+(provide 'gssapi)
+
+;;; gssapi.el ends here

=== modified file 'lisp/gnus/message.el'
--- a/lisp/gnus/message.el      2011-03-15 17:39:56 +0000
+++ b/lisp/gnus/message.el      2011-03-15 22:38:41 +0000
@@ -49,6 +49,7 @@
 (require 'mail-parse)
 (require 'mml)
 (require 'rfc822)
+(require 'format-spec)
 
 (autoload 'mailclient-send-it "mailclient") ;; Emacs 22 or contrib/
 
@@ -438,7 +439,10 @@
   :group 'message-various)
 
 (defcustom message-elide-ellipsis "\n[...]\n\n"
-  "*The string which is inserted for elided text."
+  "*The string which is inserted for elided text.
+This is a format-spec string, and you can use %l to say how many
+lines were removed, and %c to say how many characters were
+removed."
   :type 'string
   :link '(custom-manual "(message)Various Commands")
   :group 'message-various)
@@ -3535,8 +3539,12 @@
 An ellipsis (from `message-elide-ellipsis') will be inserted where the
 text was killed."
   (interactive "r")
-  (kill-region b e)
-  (insert message-elide-ellipsis))
+  (let ((lines (count-lines b e))
+        (chars (- e b)))
+    (kill-region b e)
+    (insert (format-spec message-elide-ellipsis
+                         `((?l . ,lines)
+                           (?c . ,chars))))))
 
 (defvar message-caesar-translation-table nil)
 

=== modified file 'lisp/gnus/nnimap.el'
--- a/lisp/gnus/nnimap.el       2011-03-09 13:39:35 +0000
+++ b/lisp/gnus/nnimap.el       2011-03-15 22:38:41 +0000
@@ -340,6 +340,7 @@
           (ports
            (cond
             ((or (eq nnimap-stream 'network)
+                 (eq nnimap-stream 'network-only)
                  (eq nnimap-stream 'starttls))
              (nnheader-message 7 "Opening connection to %s..."
                                nnimap-address)
@@ -1452,6 +1453,11 @@
   ;; Change \Delete etc to %Delete, so that the reader can read it.
   (subst-char-in-region (point-min) (point-max)
                        ?\\ ?% t)
+  ;; Remove any MODSEQ entries in the buffer, because they may contain
+  ;; numbers that are too large for 32-bit Emacsen.
+  (while (re-search-forward " MODSEQ ([0-9]+)" nil t)
+    (replace-match "" t t))
+  (goto-char (point-min))
   (let (start end articles groups uidnext elems permanent-flags
              uidvalidity vanished highestmodseq)
     (dolist (elem sequences)
@@ -1491,9 +1497,9 @@
                            (match-string 1)))
                 (goto-char start)
                 (setq highestmodseq
-                      (and (search-forward "HIGHESTMODSEQ "
+                      (and (re-search-forward "HIGHESTMODSEQ \\([0-9]+\\)"
                                            (or end (point-min)) t)
-                           (read (current-buffer))))
+                           (match-string 1)))
                 (goto-char end)
                 (forward-line -1))
               ;; The UID FETCH FLAGS was successful.
@@ -1507,18 +1513,7 @@
            (goto-char end))
          (while (re-search-forward "^\\* [0-9]+ FETCH " start t)
            (let ((p (point)))
-             ;; FIXME: For FETCH lines like "* 2971 FETCH (FLAGS (%Recent) UID
-             ;; 12509 MODSEQ (13419098521433281274))" we get an
-             ;; overflow-error.  The handler simply deletes that large number
-             ;; and reads again.  But maybe there's a better fix...
-             (setq elems (condition-case nil (read (current-buffer))
-                           (overflow-error
-                            ;; After an overflow-error, point is just after
-                            ;; the too large number.  So delete it and try
-                            ;; again.
-                            (delete-region (point) (progn (backward-word) 
(point)))
-                            (goto-char p)
-                            (read (current-buffer)))))
+             (setq elems (read (current-buffer)))
              (push (cons (cadr (memq 'UID elems))
                          (cadr (memq 'FLAGS elems)))
                    articles)))
@@ -1674,6 +1669,8 @@
            (goto-char (point-max)))
           openp)
       (quit
+       (when debug-on-quit
+        (debug "Quit"))
        ;; The user hit C-g while we were waiting: kill the process, in case
        ;; it's a gnutls-cli process that's stuck (tends to happen a lot behind
        ;; NAT routers).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]