* [PATCH] Set window-point-insertion-type to t in imap log.
@ 2012-06-17 23:12 Michael Welsh Duggan
2012-06-19 8:58 ` Julien Danjou
0 siblings, 1 reply; 2+ messages in thread
From: Michael Welsh Duggan @ 2012-06-17 23:12 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 262 bytes --]
Please consider this tiny patch to nnimap.el. Its purpose is to have
the point in IMAP log windows scroll if the point is at EOB. It
accomplishes this my setting a buffer-local version of
window-point-insertion-type to t when the IMAP log buffer is created.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Set-window-point-insertion-type-to-t-in-imap-log.patch --]
[-- Type: text/x-diff, Size: 1477 bytes --]
From d607c784881a5b49b1f060b1fd9a742ce6cc038f Mon Sep 17 00:00:00 2001
From: Michael Welsh Duggan <md5i@md5i.com>
Date: Sun, 17 Jun 2012 18:39:51 -0400
Subject: [PATCH] Set window-point-insertion-type to t in imap log.
---
lisp/nnimap.el | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/lisp/nnimap.el b/lisp/nnimap.el
index 1fa0bea..3cfe10b 100644
--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -1730,15 +1730,23 @@ if READ-ONLY is set, send EXAMINE rather than SELECT to the server."
(defvar nnimap-record-commands nil
"If non-nil, log commands to the \"*imap log*\" buffer.")
+(defun nnimap-log-buffer ()
+ (let ((name "*imap log*"))
+ (or (get-buffer name)
+ (with-current-buffer (get-buffer-create name)
+ (make-local-variable 'window-point-insertion-type)
+ (setq window-point-insertion-type t)
+ (current-buffer)))))
+
(defun nnimap-log-command (command)
(when nnimap-record-commands
- (with-current-buffer (get-buffer-create "*imap log*")
+ (with-current-buffer (nnimap-log-buffer)
(goto-char (point-max))
(insert (format-time-string "%H:%M:%S")
- " [" nnimap-address "] "
- (if nnimap-inhibit-logging
- "(inhibited)\n"
- command))))
+ " [" nnimap-address "] "
+ (if nnimap-inhibit-logging
+ "(inhibited)\n"
+ command))))
command)
(defun nnimap-command (&rest args)
--
1.7.10.4
[-- Attachment #3: Type: text/plain, Size: 42 bytes --]
--
Michael Welsh Duggan
(md5i@md5i.com)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Set window-point-insertion-type to t in imap log.
2012-06-17 23:12 [PATCH] Set window-point-insertion-type to t in imap log Michael Welsh Duggan
@ 2012-06-19 8:58 ` Julien Danjou
0 siblings, 0 replies; 2+ messages in thread
From: Julien Danjou @ 2012-06-19 8:58 UTC (permalink / raw)
To: Michael Welsh Duggan; +Cc: ding
[-- Attachment #1: Type: text/plain, Size: 362 bytes --]
On Mon, Jun 18 2012, Michael Welsh Duggan wrote:
> Please consider this tiny patch to nnimap.el. Its purpose is to have
> the point in IMAP log windows scroll if the point is at EOB. It
> accomplishes this my setting a buffer-local version of
> window-point-insertion-type to t when the IMAP log buffer is created.
Pushed.
--
Julien
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-19 8:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-17 23:12 [PATCH] Set window-point-insertion-type to t in imap log Michael Welsh Duggan
2012-06-19 8:58 ` Julien Danjou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).