diff --git a/oni-gnus.el b/oni-gnus.el index aa7e9a5..9c45931 100644 --- a/oni-gnus.el +++ b/oni-gnus.el @@ -34,6 +34,24 @@ (require 'oni-data-dir) (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") gnus-article-save-directory gnus-directory gnus-cache-directory gnus-directory