Gnus development mailing list
 help / color / mirror / Atom feed
From: Per Abrahamsen <abraham@dina.kvl.dk>
Subject: Re: message-subject-re
Date: 30 Aug 2001 16:17:25 +0200	[thread overview]
Message-ID: <rj3d69fx8q.fsf@ssv2.dina.kvl.dk> (raw)
In-Reply-To: <iluy9o2pru6.fsf@barbar.josefsson.org> (Simon Josefsson's message of "Wed, 29 Aug 2001 21:51:45 +0200")

Simon Josefsson <jas@extundo.com> writes:

> Simon Josefsson <jas@extundo.com> writes:
> 
>> +  :type '(radio (function-item message-strip-subject-re)
>> +		(function-item message-strip-list-identifiers)
>> +		(repeat :tag "List of functions" function)))
> 
> This :type isn't perfect, replacing `radio' with `checklist' would be
> better (if `checklist' existed..), but the following seem to be as
> close as you can get:
> 
>  :type '(repeat :tag "List of functions" function))

What do you mean "if `checklist' existed.."?

There exists a widget named 'checklist', although 'set' would be more
appropriate for a top level customize type.  However, a checklist
isn't expandable.

It would be tempting to give the option the 'hook' type, which would
work perfectly... except that it would be a lie, hook functions
doesn't take arguments.

The correct solution would probably be to create an 'expandable-list'
widget, which mimics the 'alist' and 'plist' widgets, and derive
'function-list' and 'hook' from that.  Someone remind me of that when
Emacs 21 is released.

For now, do it by hand.  Here is an example.

(defcustom message-make-re-subject-functions
  '(message-strip-list-identifiers
    message-strip-subject-re message-add-subject-re)
  "List of functions called to massage subject lines when replying.
The subject generated by the previous function is passed into each
successive function.

The provided functions (which both are used by default) are:

* `message-strip-list-identifiers' (Removes `gnus-list-identifiers'.)
* `message-strip-subject-re' (Removes `message-subject-re-regexp'.)
* `message-add-subject-re' (Prepends \"Re: \".)
"
  :group 'message-various
  :type '(list (checklist :inline t
			  :greedy t
			  (function-item message-strip-subject-re)
			  (function-item message-strip-list-identifiers))
	       (editable-list :inline t
			      :tag "List of functions" function)))

Some style notes: I believe '-functions' (not '-function') is the
conventional suffix for a list functions.  Also, the user is unlikely
to set this variable during a normal Emacs session, so there should
not be any '*' at the start of the documentation string.  The '*' does
not mean "user option".  'defcustom' means "user option".  The '*'
means it make sense to change interactively during normal use.  A good
example is 'case-fold-search'.

> Wouldn't it be nice if the `function' behaved like `function-item' and
> displayed the documentation for the function currently entered?

I think it could be confusing during editing.

> (Maybe there is a Custom list for this..)

<URL: mailto:emacs-custom@sunsite.dk >


  reply	other threads:[~2001-08-30 14:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-29 18:25 message-subject-re Michael.Cook
2001-08-29 18:29 ` message-subject-re Paul Jarc
2001-08-29 18:34   ` message-subject-re Michael.Cook
2001-08-29 18:48     ` message-subject-re Paul Jarc
2001-08-29 19:33       ` message-subject-re Simon Josefsson
2001-08-29 19:40         ` message-subject-re Henrik Enberg
2001-08-29 19:46           ` message-subject-re Paul Jarc
2001-08-29 20:08             ` message-subject-re Michael.Cook
2001-08-29 19:51           ` message-subject-re Frank Schmitt
2001-08-29 20:11             ` message-subject-re Michael.Cook
2001-08-29 23:52               ` message-subject-re Daniel Pittman
2001-08-30  1:50                 ` message-subject-re Michael.Cook
2001-08-30  2:31                   ` message-subject-re Daniel Pittman
2001-08-30  4:44                   ` message-subject-re Paul Jarc
2001-08-30 16:32                     ` message-subject-re Michael.Cook
2001-08-30 16:39                       ` message-subject-re Jesper Harder
2001-08-30 13:38             ` message-subject-re Per Abrahamsen
2001-08-29 19:43         ` message-subject-re Paul Jarc
2001-08-29 19:51         ` message-subject-re Simon Josefsson
2001-08-30 14:17           ` Per Abrahamsen [this message]
2001-08-31 23:26             ` message-subject-re Simon Josefsson
2001-09-01 14:34               ` message-subject-re Per Abrahamsen
2001-08-30  2:16   ` message-subject-re Steve Youngs
2001-09-05 15:02   ` message-change-subject-interactively (was: message-subject-re) Toby Speight
2001-09-05 15:12   ` message-subject-re Colin Marquardt
2001-09-05 16:10     ` message-subject-re Michael.Cook

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=rj3d69fx8q.fsf@ssv2.dina.kvl.dk \
    --to=abraham@dina.kvl.dk \
    /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).