From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#31388: 27.0.50; message-mode hard-codes key bindings in docstring Date: Tue, 08 May 2018 20:11:58 +0100 Message-ID: <87wowe55dt.fsf@tcd.ie> References: <874lji6k7h.fsf@tcd.ie> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1525806671 25642 195.159.176.226 (8 May 2018 19:11:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 8 May 2018 19:11:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Lars Ingebrigtsen To: <31388@debbugs.gnu.org> Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 08 21:11:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fG80w-0006XD-6w for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 May 2018 21:11:06 +0200 Original-Received: from localhost ([::1]:52963 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fG831-0008RI-Ft for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 May 2018 15:13:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fG82u-0008R8-IM for bug-gnu-emacs@gnu.org; Tue, 08 May 2018 15:13:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fG82p-0000nH-HV for bug-gnu-emacs@gnu.org; Tue, 08 May 2018 15:13:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46634) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fG82p-0000n9-9F for bug-gnu-emacs@gnu.org; Tue, 08 May 2018 15:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fG82n-0004eT-S8 for bug-gnu-emacs@gnu.org; Tue, 08 May 2018 15:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 May 2018 19:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31388 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31388-submit@debbugs.gnu.org id=B31388.152580672817818 (code B ref 31388); Tue, 08 May 2018 19:13:01 +0000 Original-Received: (at 31388) by debbugs.gnu.org; 8 May 2018 19:12:08 +0000 Original-Received: from localhost ([127.0.0.1]:54529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fG81v-0004dI-MO for submit@debbugs.gnu.org; Tue, 08 May 2018 15:12:08 -0400 Original-Received: from mail-wm0-f47.google.com ([74.125.82.47]:39596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fG81t-0004cn-Nm for 31388@debbugs.gnu.org; Tue, 08 May 2018 15:12:06 -0400 Original-Received: by mail-wm0-f47.google.com with SMTP id f8-v6so23452748wmc.4 for <31388@debbugs.gnu.org>; Tue, 08 May 2018 12:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:subject:references:cc:mail-followup-to:date:in-reply-to :message-id:user-agent:mime-version; bh=A+no1fL81J0ZFvZiP2CIyNQMFbN9jtlibjkn9ZIGKHU=; b=KoWKByh3HWIxPbJrYKg3Hatr3uFoC7Npjo3fVtrwazmOsLqTic6dLQ6qY3o6q/CQhG dbcmEuKlknQbT55MM9tF47urIoCRAev3Tshm3Fmj6d8OmYSHELApe8VBfZ/ZLBcqetSV EWc5BpYgifMJxfmTKDhsf2WQf91lgYptNI4ep7rKe+jPAfQrOHoCsg1tz1uQi2GiZTzP CEF0UxyYSo+nzB8FhWGZhYG10ojjN3elvshG6mbQQbMm8PecPkzGcz5bGlv37TfdKZr0 hkmzfamnYb4WAl2eMlFGJ4gihEi2s9kCcC70byeAotOjrizI3XYMR8ewzzIu2q/eKPk7 bgag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:cc:mail-followup-to :date:in-reply-to:message-id:user-agent:mime-version; bh=A+no1fL81J0ZFvZiP2CIyNQMFbN9jtlibjkn9ZIGKHU=; b=E8gD45GmRYPPq14tqZQzm3Vi2wjs38+f9H3+s7hBnBLAruAbzgTl1mt2HsHq1oc3iG tZcDqMAcUsmS2X6OxtawqRb5Y7KepnpLoDgNEx7xO3DajFGof55jP9lxoqQtqKSayUNF IxED2D+KMsY6iFTC0u4kkaE5BfyoimY7mQsbbtm9vlaageEVBm920hdyj3rACOREhOoR nEax6uKSmwumoTo3r0dRrejyZ4zspYLh1yjb15UFlek0+6t7ABA3qvZtvBJJZ0+dswPf YT3diL/+kfgtgKaDrwoacvqLCFxpcFlZ0JYqATBH/Trne8BvaNB3KXU/2l/Xra6/IB4p AYRA== X-Gm-Message-State: ALQs6tA89SM7rnkHHhMC03CIhUrCGXC6svtl/ZHghymiuYzAOSmlN6iz HsczdnRwnMNJ+7GRpz0xYPq8BQJ3 X-Google-Smtp-Source: AB8JxZox/OLfKHn1hVKiQfYXFNRu8D1Eb32q0wa2pTmfFUxYFPOCyJ+mQj4968LQV5416k4Upe6DQw== X-Received: by 2002:a50:87ee:: with SMTP id 43-v6mr56606116edz.1.1525806719761; Tue, 08 May 2018 12:11:59 -0700 (PDT) Original-Received: from localhost ([89.100.107.149]) by smtp.gmail.com with ESMTPSA id d18-v6sm14900778edb.97.2018.05.08.12.11.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 May 2018 12:11:58 -0700 (PDT) Mail-Followup-To: <31388@debbugs.gnu.org>, Lars Ingebrigtsen In-Reply-To: <874lji6k7h.fsf@tcd.ie> (Basil L. Contovounesios's message of "Tue, 08 May 2018 20:06:26 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146082 Archived-At: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Do-not-hard-code-message-mode-keys-in-docstring.patch >From 0d0afd160b16decb77a9358a49efab5fdf307ba6 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Mon, 7 May 2018 16:29:19 +0100 Subject: [PATCH] Do not hard-code message-mode keys in docstring * lisp/gnus/message.el (message-mode): Replace hard-coded bindings with \[command] sequences in docstring. --- lisp/gnus/message.el | 101 ++++++++++++++++++++++++++++--------------- 1 file changed, 65 insertions(+), 36 deletions(-) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 867c3d271b..c407fb0a6a 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -2893,42 +2893,71 @@ message--syntax-propertize ;;;###autoload (define-derived-mode message-mode text-mode "Message" "Major mode for editing mail and news to be sent. -Like Text Mode but with these additional commands:\\ -C-c C-s `message-send' (send the message) C-c C-c `message-send-and-exit' -C-c C-d Postpone sending the message C-c C-k Kill the message -C-c C-f move to a header field (and create it if there isn't): - C-c C-f C-t move to To C-c C-f C-s move to Subject - C-c C-f C-c move to Cc C-c C-f C-b move to Bcc - C-c C-f C-w move to Fcc C-c C-f C-r move to Reply-To - C-c C-f C-u move to Summary C-c C-f C-n move to Newsgroups - C-c C-f C-k move to Keywords C-c C-f C-d move to Distribution - C-c C-f C-o move to From (\"Originator\") - C-c C-f C-f move to Followup-To - C-c C-f C-m move to Mail-Followup-To - C-c C-f C-e move to Expires - C-c C-f C-i cycle through Importance values - C-c C-f s change subject and append \"(was: )\" - C-c C-f x crossposting with FollowUp-To header and note in body - C-c C-f t replace To: header with contents of Cc: or Bcc: - C-c C-f a Insert X-No-Archive: header and a note in the body -C-c C-t `message-insert-to' (add a To header to a news followup) -C-c C-l `message-to-list-only' (removes all but list address in to/cc) -C-c C-n `message-insert-newsgroups' (add a Newsgroup header to a news reply) -C-c C-b `message-goto-body' (move to beginning of message text). -C-c C-i `message-goto-signature' (move to the beginning of the signature). -C-c C-w `message-insert-signature' (insert `message-signature-file' file). -C-c C-y `message-yank-original' (insert current message, if any). -C-c C-q `message-fill-yanked-message' (fill what was yanked). -C-c C-e `message-elide-region' (elide the text between point and mark). -C-c C-v `message-delete-not-region' (remove the text outside the region). -C-c C-z `message-kill-to-signature' (kill the text up to the signature). -C-c C-r `message-caesar-buffer-body' (rot13 the message body). -C-c C-a `mml-attach-file' (attach a file as MIME). -C-c C-u `message-insert-or-toggle-importance' (insert or cycle importance). -C-c M-n `message-insert-disposition-notification-to' (request receipt). -C-c M-m `message-mark-inserted-region' (mark region with enclosing tags). -C-c M-f `message-mark-insert-file' (insert file marked with enclosing tags). -M-RET `message-newline-and-reformat' (break the line and reformat)." +Like `text-mode' but with these additional commands:\\ +\\[message-send] `message-send' (send the message) +\\[message-send-and-exit] `message-send-and-exit' +\\[message-dont-send] Postpone sending the message +\\[message-kill-buffer] Kill the message +Commands for moving to a header field, creating it as required: + \\[message-goto-to] Move to To + \\[message-goto-subject] Move to Subject + \\[message-goto-cc] Move to Cc + \\[message-goto-bcc] Move to Bcc + \\[message-goto-fcc] Move to Fcc + \\[message-goto-reply-to] Move to Reply-To + \\[message-goto-summary] Move to Summary + \\[message-goto-newsgroups] Move to Newsgroups + \\[message-goto-keywords] Move to Keywords + \\[message-goto-distribution] Move to Distribution + \\[message-goto-from] Move to From (\"Originator\") + \\[message-goto-followup-to] Move to Followup-To + \\[message-goto-mail-followup-to] Move to Mail-Followup-To + \\[message-insert-expires] Move to Expires + \\[message-insert-or-toggle-importance]\ + Cycle through Importance values + \\[message-change-subject]\ + Change subject and append \"(was: )\" + \\[message-cross-post-followup-to]\ + Crosspost with Followup-To header and note in body + \\[message-reduce-to-to-cc]\ + Replace To header with contents of Cc or Bcc + \\[message-add-archive-header]\ + Insert X-No-Archive header and note in body +\\[message-insert-to]\ + `message-insert-to' (add To header to a news followup) +\\[message-to-list-only]\ + `message-to-list-only' (remove all but list address in To/Cc) +\\[message-insert-newsgroups]\ + `message-insert-newsgroups' (add Newsgroup header to a news reply) +\\[message-goto-body]\ + `message-goto-body' (move to beginning of message text) +\\[message-goto-signature]\ + `message-goto-signature' (move to beginning of the signature) +\\[message-insert-signature]\ + `message-insert-signature' (insert `message-signature-file' file) +\\[message-yank-original]\ + `message-yank-original' (insert current message, if any) +\\[message-fill-yanked-message]\ + `message-fill-yanked-message' (fill what was yanked) +\\[message-elide-region]\ + `message-elide-region' (elide text between point and mark) +\\[message-delete-not-region]\ + `message-delete-not-region' (remove text outside the region) +\\[message-kill-to-signature]\ + `message-kill-to-signature' (kill text up to the signature) +\\[message-caesar-buffer-body]\ + `message-caesar-buffer-body' (rot13 the message body) +\\[mml-attach-file] `mml-attach-file' (attach a file as MIME) +\\[message-insert-or-toggle-importance]\ + `message-insert-or-toggle-importance' (insert or cycle importance) +\\[message-insert-disposition-notification-to]\ + `message-insert-disposition-notification-to' (request receipt) +\\[message-mark-inserted-region]\ + `message-mark-inserted-region' (mark region with enclosing tags) +\\[message-mark-insert-file]\ + `message-mark-insert-file' (insert file marked with enclosing tags) +\\[message-newline-and-reformat]\ + `message-newline-and-reformat' (break line and reformat)" (set (make-local-variable 'message-reply-buffer) nil) (set (make-local-variable 'message-inserted-headers) nil) (set (make-local-variable 'message-send-actions) nil) -- 2.17.0 --=-=-= Content-Type: text/plain "Basil L. Contovounesios" writes: > One solution is to replace the hard-coded bindings with > \[command]-sequences; another to replace the whole listing with > \{message-mode-map}. In both cases, the binding listed for > message-insert-or-toggle-importance will be C-c C-u instead of > C-c C-f C-i, due to the higher precedence of the former. WDYT? I attach a patch as an example of doing the former. The latter would probably look as follows: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Do-not-hard-code-message-mode-keys-in-docstring.patch >From e1b28796dc2c6b6828d73740dd98f4fd83771caa Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Mon, 7 May 2018 16:42:41 +0100 Subject: [PATCH] Do not hard-code message-mode keys in docstring * lisp/gnus/message.el (message-mode): Replace hard-coded bindings in docstring with summary of message-mode-map. --- lisp/gnus/message.el | 39 +++------------------------------------ 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 867c3d271b..a85925d94d 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -2893,42 +2893,9 @@ message--syntax-propertize ;;;###autoload (define-derived-mode message-mode text-mode "Message" "Major mode for editing mail and news to be sent. -Like Text Mode but with these additional commands:\\ -C-c C-s `message-send' (send the message) C-c C-c `message-send-and-exit' -C-c C-d Postpone sending the message C-c C-k Kill the message -C-c C-f move to a header field (and create it if there isn't): - C-c C-f C-t move to To C-c C-f C-s move to Subject - C-c C-f C-c move to Cc C-c C-f C-b move to Bcc - C-c C-f C-w move to Fcc C-c C-f C-r move to Reply-To - C-c C-f C-u move to Summary C-c C-f C-n move to Newsgroups - C-c C-f C-k move to Keywords C-c C-f C-d move to Distribution - C-c C-f C-o move to From (\"Originator\") - C-c C-f C-f move to Followup-To - C-c C-f C-m move to Mail-Followup-To - C-c C-f C-e move to Expires - C-c C-f C-i cycle through Importance values - C-c C-f s change subject and append \"(was: )\" - C-c C-f x crossposting with FollowUp-To header and note in body - C-c C-f t replace To: header with contents of Cc: or Bcc: - C-c C-f a Insert X-No-Archive: header and a note in the body -C-c C-t `message-insert-to' (add a To header to a news followup) -C-c C-l `message-to-list-only' (removes all but list address in to/cc) -C-c C-n `message-insert-newsgroups' (add a Newsgroup header to a news reply) -C-c C-b `message-goto-body' (move to beginning of message text). -C-c C-i `message-goto-signature' (move to the beginning of the signature). -C-c C-w `message-insert-signature' (insert `message-signature-file' file). -C-c C-y `message-yank-original' (insert current message, if any). -C-c C-q `message-fill-yanked-message' (fill what was yanked). -C-c C-e `message-elide-region' (elide the text between point and mark). -C-c C-v `message-delete-not-region' (remove the text outside the region). -C-c C-z `message-kill-to-signature' (kill the text up to the signature). -C-c C-r `message-caesar-buffer-body' (rot13 the message body). -C-c C-a `mml-attach-file' (attach a file as MIME). -C-c C-u `message-insert-or-toggle-importance' (insert or cycle importance). -C-c M-n `message-insert-disposition-notification-to' (request receipt). -C-c M-m `message-mark-inserted-region' (mark region with enclosing tags). -C-c M-f `message-mark-insert-file' (insert file marked with enclosing tags). -M-RET `message-newline-and-reformat' (break the line and reformat)." +Like `text-mode', but with these additional commands: + +\\{message-mode-map}" (set (make-local-variable 'message-reply-buffer) nil) (set (make-local-variable 'message-inserted-headers) nil) (set (make-local-variable 'message-send-actions) nil) -- 2.17.0 --=-=-= Content-Type: text/plain -- Basil --=-=-=--