[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103043: nnimap.el (nnimap-wait-for-r
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103043: nnimap.el (nnimap-wait-for-response): Wait for results in a more secure manner. |
Date: |
Mon, 31 Jan 2011 04:41:38 +0000 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103043
author: Lars Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Mon 2011-01-31 04:41:38 +0000
message:
nnimap.el (nnimap-wait-for-response): Wait for results in a more secure
manner.
gnus-art.el (article-update-date-lapsed): Try to avoid having point move
around by not using save-window-excursion. It seems to work...
modified:
lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el
lisp/gnus/nnimap.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2011-01-31 03:35:09 +0000
+++ b/lisp/gnus/ChangeLog 2011-01-31 04:41:38 +0000
@@ -1,3 +1,11 @@
+2011-01-31 Lars Ingebrigtsen <address@hidden>
+
+ * nnimap.el (nnimap-wait-for-response): Wait for results in a more
+ secure manner.
+
+ * gnus-art.el (article-update-date-lapsed): Try to avoid having point
+ move around by not using save-window-excursion. It seems to work...
+
2011-01-31 Katsumi Yamaoka <address@hidden>
* gnus-art.el (article-make-date-line): Work for user-defined format.
=== modified file 'lisp/gnus/gnus-art.el'
--- a/lisp/gnus/gnus-art.el 2011-01-31 02:55:13 +0000
+++ b/lisp/gnus/gnus-art.el 2011-01-31 04:41:38 +0000
@@ -3646,31 +3646,31 @@
(defun article-update-date-lapsed ()
"Function to be run from a timer to update the lapsed time line."
(save-match-data
- (let (deactivate-mark)
- (save-window-excursion
- (ignore-errors
- (walk-windows
- (lambda (w)
- (set-buffer (window-buffer w))
- (when (eq major-mode 'gnus-article-mode)
- (let ((old-line (count-lines (point-min) (point)))
- (old-column (current-column)))
- (goto-char (point-min))
- (while (re-search-forward "^Date:" nil t)
- (let ((type (get-text-property (match-beginning 0)
'gnus-date-type)))
- (when (memq type '(lapsed combined-lapsed user-format))
- (save-excursion
- (article-date-ut type t (match-beginning 0)))
- (forward-line 1))))
- (goto-char (point-min))
- (when (> old-column 0)
- (setq old-line (1- old-line)))
- (forward-line old-line)
- (end-of-line)
- (when (> (current-column) old-column)
- (beginning-of-line)
- (forward-char old-column)))))
- nil 'visible))))))
+ (let ((buffer (current-buffer)))
+ (ignore-errors
+ (walk-windows
+ (lambda (w)
+ (set-buffer (window-buffer w))
+ (when (eq major-mode 'gnus-article-mode)
+ (let ((old-line (count-lines (point-min) (point)))
+ (old-column (current-column)))
+ (goto-char (point-min))
+ (while (re-search-forward "^Date:" nil t)
+ (let ((type (get-text-property (match-beginning 0)
'gnus-date-type)))
+ (when (memq type '(lapsed combined-lapsed user-format))
+ (save-excursion
+ (article-date-ut type t (match-beginning 0)))
+ (forward-line 1))))
+ (goto-char (point-min))
+ (when (> old-column 0)
+ (setq old-line (1- old-line)))
+ (forward-line old-line)
+ (end-of-line)
+ (when (> (current-column) old-column)
+ (beginning-of-line)
+ (forward-char old-column)))))
+ nil 'visible))
+ (set-buffer buffer))))
(defun gnus-start-date-timer (&optional n)
"Start a timer to update the Date headers in the article buffers.
=== modified file 'lisp/gnus/nnimap.el'
--- a/lisp/gnus/nnimap.el 2011-01-30 01:46:32 +0000
+++ b/lisp/gnus/nnimap.el 2011-01-31 04:41:38 +0000
@@ -1589,17 +1589,14 @@
(goto-char (point-max))
(while (and (setq openp (memq (process-status process)
'(open run)))
- (not (re-search-backward
- (format "^%d .*\n" sequence)
- (if nnimap-streaming
- (max (point-min)
- (min
- (- (point) 500)
- (save-excursion
- (forward-line -3)
- (point))))
- (point-min))
- t)))
+ (progn
+ ;; Skip past any "*" lines that the server has
+ ;; output.
+ (while (and (not (bobp))
+ (progn
+ (forward-line -1)
+ (looking-at "\\*"))))
+ (not (looking-at (format "%d " sequence)))))
(when messagep
(nnheader-message 7 "nnimap read %dk" (/ (buffer-size) 1000)))
(nnheader-accept-process-output process)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103043: nnimap.el (nnimap-wait-for-response): Wait for results in a more secure manner.,
Katsumi Yamaoka <=