From: Colin Rafferty <craffert@ms.com>
Subject: [patch] gnus-start-date-timer vs. picons and single-article-buffer
Date: 11 Jan 1999 17:18:49 -0500 [thread overview]
Message-ID: <vgv7luttpva.fsf@ms.com> (raw)
In-Reply-To: Colin Rafferty's message of "11 Jan 1999 16:17:22 -0500"
[-- Attachment #1: Type: text/plain, Size: 136 bytes --]
Colin Rafferty writes:
> [bad patch deleted]
I am a moron. I hit C-c C-a on a file that I hadn't saved.
Here is the correct patch.
[-- Attachment #2: correct patch to make date-timers work with picons --]
[-- Type: text/plain, Size: 1909 bytes --]
1999-01-11 Colin Rafferty <colin@xemacs.org>
* gnus-art.el (article-update-date-lapsed): Made it work with
picons, and make it update on all visible frames.
(article-date-ut): Get summary-buffer's current-headers.
--- lisp/gnus-art.el~ Sun Jan 3 08:36:04 1999
+++ lisp/gnus-art.el Mon Jan 11 16:55:05 1999
@@ -1446,17 +1446,19 @@
"Mapping from time units to seconds.")
(defun article-date-ut (&optional type highlight header)
"Convert DATE date to universal time in the current article.
If TYPE is `local', convert to local time; if it is `lapsed', output
how much time has lapsed since DATE."
(interactive (list 'ut t))
(let* ((header (or header
- (mail-header-date gnus-current-headers)
+ (mail-header-date (save-excursion
+ (set-buffer gnus-summary-buffer)
+ gnus-current-headers))
(message-fetch-field "date")
""))
(date (if (vectorp header) (mail-header-date header)
header))
(date-regexp "^Date:[ \t]\\|^X-Sent:[ \t]")
(inhibit-point-motion-hooks t)
bface eface newline)
(when (and date (not (string= date "")))
@@ -1596,20 +1598,21 @@
(defun article-update-date-lapsed ()
"Function to be run from a timer to update the lapsed time line."
(let (deactivate-mark)
(save-excursion
(ignore-errors
(walk-windows
(lambda (w)
(set-buffer (window-buffer w))
- (when (eq major-mode 'gnus-article-mode)
+ (when (memq major-mode '(gnus-article-mode gnus-picons-mode))
(goto-char (point-min))
(when (re-search-forward "^X-Sent:" nil t)
- (article-date-lapsed t)))))))))
+ (article-date-lapsed t))))
+ nil 'visible)))))
(defun gnus-start-date-timer (&optional n)
"Start a timer to update the X-Sent header in the article buffers.
The numerical prefix says how frequently (in seconds) the function
is to run."
(interactive "p")
(unless n
(setq n 1))
[-- Attachment #3: Type: text/plain, Size: 10 bytes --]
;; Colin
prev parent reply other threads:[~1999-01-11 22:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-01-11 22:16 Colin Rafferty
1999-01-11 22:18 ` Colin Rafferty [this message]
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=vgv7luttpva.fsf@ms.com \
--to=craffert@ms.com \
/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).