Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <4uce.02.r.steib@gmx.net>
Subject: Re: Incorporate message-utils.el?
Date: Mon, 16 Sep 2002 20:01:47 +0200	[thread overview]
Message-ID: <v94rcpoltg.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <vaflm65ykfb.fsf@lucy.cs.uni-dortmund.de>

On Fri, Sep 13 2002, Kai Großjohann wrote:

> Reiner Steib <4uce.02.r.steib@gmx.net> writes:
[...]
> One suggestion: invoke message-make-reply-subject instead, and do
> something like
>
> (defcustom message-make-reply-subject-functions
>   '(message-strip-subject-re message-util-strip-was)
>   "Some useful docstring"
>   ...other.custom.stuff...)
>
> (defun message-make-reply-subject (subject)
>   (let ((funcs message-make-reply-subject-functions))
>     (while funcs
>       (setq subject (funcall (pop funcs) subject)))
>     subject))

Sorry Kai, I haven't received your message in time before I started to
change `message.el' (I had no net connection during the weekend), but
I think we can always add your suggestion later. Up to now, I'm
scrupling, because of the following (but I guess you will convince me
finally ;-) ):

- It would allow the user to produce strange subject like "Antwort:
  Re: ..." very easily. :-(

- Currently, I have the following code:

  (defun message-reply [...]
      (when gnus-list-identifiers
	(setq subject (message-strip-list-identifiers subject)))
      (setq subject (concat "Re: " (message-strip-subject-re subject)))
      (when message-subject-trailing-was-query
	(setq subject (message-strip-subject-trailing-was subject)))

  Should `message-strip-list-identifiers' be in
  `message-make-reply-subject-functions' too? Then m-s-l-i has to
  check for `gnus-list-identifiers' and we call m-s-l-i even if g-l-i
  is nil. For `message-strip-subject-trailing-was' it's similar:
  m-s-s-t-w does nothing when m-s-t-w-q is nil.

- Assume we add new functions later and the user has changed the
  default. If he used add-to-list it should be okay. What about
  customize? Does it respect the (changed) default or does it apply
  the (old) saved value? (Sorry, I don't use customize, so I don't
  know.)

Okay, what I have done so far is the following 

,----[ *Draft* for the ChangeLog entry ]
| 	* message.el (message-strip-subject-trailing-was,
| 	message-change-subject, message-add-archive-header,
| 	message-xpost-fup2-header, message-xpost-insert-note,
| 	message-xpost-fup2, message-reduce-to-to-cc): New functions
| 	adopted from message-utils.el.  Add functions to the keymap (TODO:
| 	in mode describtion) and menu.
| 	(message-change-subject,message-xpost-fup2): Signal error if
| 	current header is empty.
| 	(message-xpost-insert-note): Changed insert position.
| 	(message-archive-note): Ensure to insert note in message body.
| 	(message-archive-header, message-archive-note,
| 	message-xpost-default, message-xpost-note, message-fup2-note,
| 	message-xpost-note-function): New variables adopted from
| 	message-utils.el.  Changed some doc-strings.
| 	(message-mark-insert-{begin,end}): Rename from
| 	message-{begin,end}-inserted-text-mark (message-utils.el), changed
| 	values.
| 	(message-subject-trailing-was-query,
| 	message-subject-trailing-was-ask-regexp,
| 	message-subject-trailing-was-regexp): New variables.
| 	(message-to-list-only): Changed doc-string, added menu entry.
`----

As I moved everything to `message.el', `message-utils.el' can be
removed.

I'm not sure where to put the menu entries for the functions. Which
commands should be in the "Field" and which in the "Message" menu? I
would suggest to put commands acting on the headers of the message to
"Field" and others to "Message":

"Field" menu:

     ["To" message-goto-to t]
     ["From" message-goto-from t]
     ["Subject" message-goto-subject t]
+    ["Change subject" message-change-subject t]
     ["Cc" message-goto-cc t]
+    ["Bcc" message-goto-bcc t]
+    ["Fcc" message-goto-fcc t]
     ["Reply-To" message-goto-reply-to t]
+    "----"
+    ;; (typical) news stuff
     ["Summary" message-goto-summary t]
     ["Keywords" message-goto-keywords t]
     ["Newsgroups" message-goto-newsgroups t]
     ["Followup-To" message-goto-followup-to t]
-    ["Mail-Followup-To" message-goto-mail-followup-to t]
+    ;; ["Followup-To (with note in body)" message-xpost-fup2 t]
+    ["Crosspost / Followup-To" message-xpost-fup2 t]
     ["Distribution" message-goto-distribution t]
+    ["X-No-Archive:" message-add-archive-header t ]
+    "----"
+    ;; (typical) mailing-lists stuff
+    ["Send to list only" message-to-list-only t]
+    ["Mail-Followup-To" message-goto-mail-followup-to t]
+    ["Reduce To: to Cc:" message-reduce-to-to-cc t]
+    "----"
     ["Body" message-goto-body t]
     ["Signature" message-goto-signature t]))

"Message" menu:

+    ["Insert Region Marked" message-mark-inserted-region 
+    ["Insert File Marked" message-mark-insert-file 

But apparently, this is not the convention we have. Looking at the
manual, I found "Flag As (Un)important" in
<info://message/Header+Commands> and "Request Receipt" in
<info://message/Insertion>, though both are in the "Message" menu. I'm
confused. Could somebody explain the convention?

Now the key bindings: It's related to the previous question. If we
consider e.g. `message-change-subject' as a "Field"-command, it should
have a `C-c C-f' prefix, right? I'd suggest these:

+  (define-key message-mode-map "\C-c\C-fs"    'message-change-subject)
+  (define-key message-mode-map "\C-c\C-fx"    'message-xpost-fup2)
+  (define-key message-mode-map "\C-c\C-ft"    'message-reduce-to-to-cc)
+  (define-key message-mode-map "\C-c\C-fa"    'message-add-archive-header)
+  (define-key message-mode-map "\C-c\M-m" 'message-mark-inserted-region)
+  (define-key message-mode-map "\C-c\M-f" 'message-mark-insert-file)

Other suggestions for the key bindings, anyone?

If nobody has objections, I will also change the mode description (add
the key bindings) and the manual (describing the new functions and key
bindings). 

I didn't attach the patch to this message, because it's not complete
as long the above mentioned items are unclear for me.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/



  reply	other threads:[~2002-09-16 18:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-12 11:55 Kai Großjohann
2002-09-12 13:24 ` Reiner Steib
2002-09-12 13:35   ` Kai Großjohann
2002-09-12 20:12     ` Reiner Steib
2002-09-12 23:43       ` Daniel Pittman
2002-09-13  5:25       ` Mark Trettin
2002-09-13 13:15       ` Kai Großjohann
2002-09-13 15:14         ` Reiner Steib
2002-09-13 15:32           ` Kai Großjohann
2002-09-16 18:01             ` Reiner Steib [this message]
2002-09-16 19:32               ` Kai Großjohann
2002-12-29 17:21               ` Lars Magne Ingebrigtsen

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=v94rcpoltg.fsf@marauder.physik.uni-ulm.de \
    --to=4uce.02.r.steib@gmx.net \
    --cc=reiner.steib@gmx.de \
    /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).