unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Amin Bandali <bandali@gnu.org>, 38289@debbugs.gnu.org
Subject: bug#38289: 27.0.50; C-c C-w not working if signature from gnus-posting-styles applies
Date: Thu, 21 Nov 2019 21:55:10 -0800	[thread overview]
Message-ID: <8736eg4fr5.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87y2w8u88n.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 22 Nov 2019 00:20:40 +0100")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> So that leaves the nil case -- `C-c C-w' could peek at the
>> global version of the variable if it's buffer-locally nil?
>
> I've now done this on the trunk.  It seems harmless and is more DWIM.

Okay, let me just float an idea here, and if it looks appealing I'll
open a separate bug report to keep it for posterity, and if it doesn't
we can just quietly let it go.

How about a Gnus-specific minor-mode to run in message buffers that are
expected to be tied to Gnus? Like gnus-message-minor-mode, whatever. The
minor mode could do two things:

1. Hook into header completion, so that completing a mail address in
any of the To/From/Cc/Bcc fields would run the whole message through
gnus-posting-styles again, possibly re-writing other parts of the draft
message.

2. Add an X-Gnus-Server header (stripped on sending), which could be set
as a part of posting styles, or associated with a From address, or
otherwise figured out later. The header value would be a Gnus server (eg
nntp:news.gmane.org), and other message action functions would be
patched by the minor mode to first query that server to see if it wants
to "handle" the action, before passing it on to the message-mode
functions.

The beautiful future I'm imagining is that an nnimap server queries its
remote server for "special use" mailboxes, so that it knows which of its
groups is \Drafts, which is \Sent, etc. Now we save the message as a
draft, and the minor mode first checks with the X-Gnus-Server: "can you
handle drafts?" The server can! Or it can't, and the message goes into
nndraft. Or the message is sent, and if there's no Gcc, the minor mode
asks the server, "Can you archive this somewhere?" And hey, maybe the
server can.

All this confined to a minor-mode, of course.

WDYT?





  reply	other threads:[~2019-11-22  5:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-20  6:44 bug#38289: 27.0.50; C-c C-w not working if signature from gnus-posting-styles applies Amin Bandali
2019-11-21 13:41 ` Lars Ingebrigtsen
2019-11-21 20:38   ` Amin Bandali
2019-11-21 23:04     ` Lars Ingebrigtsen
2019-11-21 23:20       ` Lars Ingebrigtsen
2019-11-22  5:55         ` Eric Abrahamsen [this message]
2019-11-22 12:38           ` Lars Ingebrigtsen
2019-11-22 18:20             ` Eric Abrahamsen
2019-11-23 12:01               ` Lars Ingebrigtsen
2019-11-23 14:19                 ` Eric Abrahamsen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736eg4fr5.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=38289@debbugs.gnu.org \
    --cc=bandali@gnu.org \
    --cc=larsi@gnus.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).