unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46840: 27.1; Add gnus-draft-mode-prepared-hook
@ 2021-02-28 17:02 積丹尼 Dan Jacobson
  2021-03-01 13:01 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-02-28 17:02 UTC (permalink / raw)
  To: 46840

If there were a gnus-draft-mode-prepared-hook, this could be simplified:
(add-hook
 'gnus-summary-prepared-hook ;gnus-draft-mode-hook won't work until second visit, so use:
 (lambda () ;No other way to start at the last article instead of the first.
   (if (string-match gnus-newsgroup-name "nndraft:drafts")
       (progn
	 (goto-char (point-max))(forward-line -1))))); not the middle of the line, but good enough.

Also gnus-draft-mode-prepared-hook would sound clearer than
gnus-draft-prepared-hook, which seems like it is talking about a single draft.

P.S.,
(info "(gnus) Various Summary Stuff") mentions that mode's hooks, but
(info "(gnus) Drafts") doesn't. There are at least a couple.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#46840: 27.1; Add gnus-draft-mode-prepared-hook
  2021-02-28 17:02 bug#46840: 27.1; Add gnus-draft-mode-prepared-hook 積丹尼 Dan Jacobson
@ 2021-03-01 13:01 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-03-01 13:01 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 46840

積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:

> If there were a gnus-draft-mode-prepared-hook, this could be simplified:

Sorry; that doesn't seem very useful -- as you've found out, you can
trivially do that from `gnus-summary-prepared-hook'.  Closing.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-01 13:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-28 17:02 bug#46840: 27.1; Add gnus-draft-mode-prepared-hook 積丹尼 Dan Jacobson
2021-03-01 13:01 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).