[oni-gnus] Make point always move to the ‘:’ after the size
This commit is contained in:
parent
13e7e8767f
commit
f78a8b1a4e
1 changed files with 18 additions and 0 deletions
18
oni-gnus.el
18
oni-gnus.el
|
@ -34,6 +34,24 @@
|
||||||
(require 'oni-data-dir)
|
(require 'oni-data-dir)
|
||||||
(require 'sendmail)
|
(require 'sendmail)
|
||||||
|
|
||||||
|
(defun oni-gnus-goto-bracket-then-colon ()
|
||||||
|
"Find the first occurrence of [ on the current line and then :.
|
||||||
|
The default function ‘gnus-goto-colon' only goes to the first
|
||||||
|
colon and then stops there. When there is a date with a time
|
||||||
|
involved, it just goes to the time, not the colon after the size
|
||||||
|
of the email."
|
||||||
|
(move-beginning-of-line 1)
|
||||||
|
(let ((eol (point-at-eol)))
|
||||||
|
(goto-char (or (text-property-any (point) eol 'gnus-position t)
|
||||||
|
(progn (search-forward "[" eol t)
|
||||||
|
(search-forward ":" eol t))
|
||||||
|
(point)))))
|
||||||
|
|
||||||
|
;;; Make sure that repositioning point in Gnus means that first the bracket is
|
||||||
|
;;; found and then the following colon, instead of the first colon which is
|
||||||
|
;;; possibly one from a time stamp.
|
||||||
|
(defalias 'gnus-summary-position-point 'oni-gnus-goto-bracket-then-colon)
|
||||||
|
|
||||||
(setq gnus-directory (oni-data-dir-locate "News")
|
(setq gnus-directory (oni-data-dir-locate "News")
|
||||||
gnus-article-save-directory gnus-directory
|
gnus-article-save-directory gnus-directory
|
||||||
gnus-cache-directory gnus-directory
|
gnus-cache-directory gnus-directory
|
||||||
|
|
Loading…
Reference in a new issue