* change message variables from backend?
@ 1999-01-28 23:24 Kai.Grossjohann
1999-01-29 16:03 ` Jack Vinson
1999-01-29 18:08 ` Kai.Grossjohann
0 siblings, 2 replies; 3+ messages in thread
From: Kai.Grossjohann @ 1999-01-28 23:24 UTC (permalink / raw)
Suppose I wanted to hack a backend which stores todo items. I would
then want to arrange that message-send-mail-function is not set to the
usual value in all messages created from its summary buffers. How
would I go about this?
kai
--
Abort this operation? [Abort] [Cancel]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: change message variables from backend?
1999-01-28 23:24 change message variables from backend? Kai.Grossjohann
@ 1999-01-29 16:03 ` Jack Vinson
1999-01-29 18:08 ` Kai.Grossjohann
1 sibling, 0 replies; 3+ messages in thread
From: Jack Vinson @ 1999-01-29 16:03 UTC (permalink / raw)
>>>>> "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--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: change message variables from backend?
1999-01-28 23:24 change message variables from backend? Kai.Grossjohann
1999-01-29 16:03 ` Jack Vinson
@ 1999-01-29 18:08 ` Kai.Grossjohann
1 sibling, 0 replies; 3+ messages in thread
From: Kai.Grossjohann @ 1999-01-29 18:08 UTC (permalink / raw)
Kai.Grossjohann@CS.Uni-Dortmund.DE writes:
> Suppose I wanted to hack a backend which stores todo items. I
> would then want to arrange that message-send-mail-function is not
> set to the usual value in all messages created from its summary
> buffers. How would I go about this?
Hm. When a message buffer is created, all variables local in the
summary buffer are copied to it. So how do I make
message-send-mail-function be local in the right summary buffers?
It appears that Gnus goes through the group parameters and sets a
local variable with the name of the parameter to the value gotten by
evaling the parameter value. This means that I could put
(message-send-mail-function 'kai-special-send-mail-function)
or maybe
(message-send-mail-function ''kai-special-send-mail-function)
into the group parameters. Can I do this from the backend? Hm.
kai
--
Abort this operation? [Abort] [Cancel]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-01-29 18:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-28 23:24 change message variables from backend? Kai.Grossjohann
1999-01-29 16:03 ` Jack Vinson
1999-01-29 18:08 ` Kai.Grossjohann
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).