Gnus development mailing list
 help / color / mirror / Atom feed
From: Jack Vinson <jvinson@chevax.ecs.umass.edu>
Subject: Re: change message variables from backend?
Date: 29 Jan 1999 10:03:17 -0600	[thread overview]
Message-ID: <wksocukqwq.fsf@chevax.ecs.umass.edu> (raw)
In-Reply-To: Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Fri, 29 Jan 1999 00:24:26 +0100"

>>>>> "KG" == Kai Grossjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:

KG> Suppose I wanted to hack a backend which stores todo items.  I would
KG> then want to arrange that message-send-mail-function is not set to the
KG> usual value in all messages created from its summary buffers.  How
KG> would I go about this?

It would have to be done in one of the many Summary-related hooks.  Since
this would not particularly affect the *generation* of the summary buffer,
I would go with gnus-select-group-hook.  Making message-send-mail-function
buffer local should make things easier as well:

;; THIS IS UNTESTED CODE!
(defun jmv-change-msmf ()
  (make-variable-buffer-local 'message-send-mail-function)
  (setq message-send-mail-function 'my-message-send-mail-function)
)
(defun jmv-select-hook ()
  (cond (;; Change settings based on the newsgroup name
	 (string-match "nntodo" gnus-newsgroup-name)
	 (jmv-change-msmf)
	 )
	(;; Otherwise 
	 t nil)
	))
(add-hook 'gnus-select-group-hook 'jmv-select-hook)

Here is a list of the hooks related to the Summary buffer, from Apropos:

gnus-select-group-hook
  Variable: *A hook called when a newsgroup is selected.
  Plist: standard-value variable-documentation custom-type custom-requests
gnus-summary-generate-hook
  Variable: *A hook run just before generating the summary buffer.
  Plist: standard-value variable-documentation custom-type custom-requests
gnus-summary-menu-hook
  Variable: *Hook run after the creation of the summary mode menu.
  Plist: standard-value variable-documentation custom-type custom-requests
gnus-summary-mode-hook
  Variable: *A hook for Gnus summary mode.
  Plist: standard-value variable-documentation custom-type custom-requests
gnus-summary-prepare-exit-hook
  Variable: *A hook called when preparing to exit from the summary buffer.
  Plist: standard-value variable-documentation custom-type custom-requests
gnus-summary-prepare-hook
  Variable: *A hook called after the summary buffer has been generated.
  Plist: standard-value variable-documentation custom-type custom-requests
gnus-summary-prepared-hook
  Variable: *A hook called as the last thing after the summary buffer has been generated.
  Plist: standard-value variable-documentation custom-type custom-requests
gnus-summary-update-hook
  Variable: *A hook called when a summary line is changed.
  Plist: standard-value variable-documentation custom-type custom-requests


-- 
Jack Vinson <jvinson@chevax.ecs.umass.edu>    http://www.cis.upenn.edu/~vinson/
Zippy: I am having a CONCEPTION--



  reply	other threads:[~1999-01-29 16:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-28 23:24 Kai.Grossjohann
1999-01-29 16:03 ` Jack Vinson [this message]
1999-01-29 18:08 ` Kai.Grossjohann

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=wksocukqwq.fsf@chevax.ecs.umass.edu \
    --to=jvinson@chevax.ecs.umass.edu \
    /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).