From: Michael Welsh Duggan <md5i@md5i.com>
To: ding@gnus.org
Subject: [PATCH] Set window-point-insertion-type to t in imap log.
Date: Sun, 17 Jun 2012 19:12:31 -0400 [thread overview]
Message-ID: <877gv5fs80.fsf@maru.md5i.com> (raw)
[-- 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)
next reply other threads:[~2012-06-17 23:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-17 23:12 Michael Welsh Duggan [this message]
2012-06-19 8:58 ` Julien Danjou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877gv5fs80.fsf@maru.md5i.com \
--to=md5i@md5i.com \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).