home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky gnu.emacs.help:5150 gnu.emacs.gnus:1426
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!spool.mu.edu!agate!naughty-peahen
- From: Jym Dyer <jym@mica.berkeley.edu>
- Newsgroups: gnu.emacs.help,gnu.emacs.gnus
- Subject: Re: Two suggestions on changes in gnus (sig-inclusion and fill-mode)
- Date: 22 Dec 1992 00:44:44 GMT
- Organization: The Naughty Peahen Party Line
- Lines: 85
- Message-ID: <Jym.21Dec1992.1644@naughty-peahen>
- References: <KREJ.92Dec17132445@lithiumx.electrum.kth.se>
- <9212171838.AA23722@acorn.co.uk>
- NNTP-Posting-Host: remarque.berkeley.edu
- In-reply-to: pd@x.co.UK's message of 17 Dec 92 14:05:47 GMT
-
- [I've added gnu.emacs.help to this thread, since my replies
- apply to rnews as well as to gnus.]
-
- >> [Suggestion One] I would like to have a variable which
- >> changes [gnus'] behavior to that of elm; the signature is
- >> appended automatically before I start to write the article.
-
- =+= This can be done in both gnus and rnewspost by setting the
- news-setup-hook variable. Here's an example (which will only
- insert signature files for gnus, but won't break rnewspost):
-
- =============8<=============Cut-Here=============8<=============
- (setq news-setup-hook
- (function
- (lambda ()
- (let ((sigfile
- (nth 1 (assoc (eval (make-local-variable
- 'gnus-newsgroup-name))
- '(("alt.angst" "angst.sig")
- ("alt.tv.simpsons" "hell.sig")
- ("rec.arts.comics.misc"
- "moore.sig")
- ("rec.arts.comics.strips"
- "hobbes.sig") )))))
- (if (stringp sigfile)
- (progn
- (goto-char (point-max))
- (insert "--\n")
- (insert-file (concat "~/" (eval sigfile))) )) ))))
- =============>8=============Cut-Here=============>8=============
-
- =+= A few notes:
-
- o The above code actually selects from a number of signature
- files, each tailored to specific newsgroups. If you want to
- insert just one file, unconditionally, something like this
- would suffice:
-
- (goto-char (point-max)
- (insert "--\n")
- (insert-file "~/.signature")
-
- o The mucking about with (eval) and (make-local-variable) is
- because rnews doesn't know the gnus-newsgroup-name variable.
-
- o Unfortunately, you're always going to be left with your
- cursor set *after* the signature, because the function
- that runs this hook always does a (goto-char (point-max))
- afterwards. This can't be fixed without changing the
- rnewspost.el file in the Emacs lisp library.
-
- >> [Suggestion Two] It would be nice to have an easy way to
- >> make emacs toggle into auto-fill-mode when starting to write
- >> on an article . . .
-
- =+= For this you use the news-reply-mode-hook variable. Here's
- how mine is set:
-
- =============8<=============Cut-Here=============8<=============
- (setq news-reply-mode-hook
- (function
- (lambda ()
- (auto-fill-mode 1) )))
- =============>8=============Cut-Here=============>8=============
-
- Setting text-mode-hook to the same value will have the same
- effect.
-
- =+= If you don't like the default value of the fill column,
- you can't change it everywhere just by changing the value of
- the fill-column variable. This variable "automatically becomes
- local when set in any fashion." If you want to set it to
- another value, you need to use (setq-default):
-
- =============8<=============Cut-Here=============8<=============
- (setq-default fill-column 64)
- =============>8=============Cut-Here=============>8=============
-
- > If you do do this I've found my subject and other header lines
- > can get filled with bad (illegal header) results when you
- > modify them.
-
- =+= This is a hassle, but on balance I find it easier to fix
- those header lines by hand than to fill the text by hand.
- <_Jym_>
-