From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INVALID_MSGID, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from mx1.math.uh.edu (mx1.math.uh.edu [129.7.128.32]) by inbox.vuxu.org (Postfix) with ESMTP id 52A572EE8C for ; Tue, 3 Dec 2024 21:38:35 +0100 (CET) Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1tIZfA-00000008YRT-3uRF for ml@inbox.vuxu.org; Tue, 03 Dec 2024 14:38:32 -0600 Received: from lists1.math.uh.edu ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.97.1) (envelope-from ) id 1tIZf9-00000007Uy9-2qr0 for ml@inbox.vuxu.org; Tue, 03 Dec 2024 14:38:27 -0600 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtp (Exim 4.97.1) (envelope-from ) id 1tIZf1-00000007Uy0-2dpz for ding@lists.math.uh.edu; Tue, 03 Dec 2024 14:38:24 -0600 Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1tIZex-00000008YR3-08Vs for ding@lists.math.uh.edu; Tue, 03 Dec 2024 14:38:19 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=HECULNPjYoQMvF13j7Kw1CgkNC2hX/o98P8vMKWyvas=; b=krK80414beZbJRvOdNIZwLiFsl dgdGHZuz/B8midCcycDYfCzUQCQp71bjZqQkNkGZQ7V1WB014Ca+Vki/stTw7sBJUwpEPQ9gIPG/P MvneMczevD+qXlptYeeA/hDwGN0wvcOTsjOnmicKzZyAUOTxYbOpa+vtGN+5AvSbhVLo=; Received: from thaodan.de ([185.216.177.71]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tIZep-0000xB-3T for ding@gnus.org; Tue, 03 Dec 2024 21:38:09 +0100 Received: from odin (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49]) by thaodan.de (Postfix) with ESMTPSA id 3BEC8D0004F; Tue, 3 Dec 2024 22:38:05 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1733258285; bh=1ijulqMTjpolzpHGdto/6upUd8r+Mw5z+CCEjDpUJIQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=Kjw2mqVkgJUZgDOLE9vxVLVX0y+MNu1kzJvRed7MmwgI73JyNK40xOimxW5UlYeEO ypwy4MQXK4m0TQJRZ/H3steVsRekzeDvD4S64UgIxV5VYszl0yyb3IuY80LyZMZPAH 3hXyGJSMHuTb+suPZFWRHTYHcDaRI3JUQJkrGb0YmwbPdYJUIIZtvoY+zx/0SSqBlE tR44TrLO9ZNwG+2dOh/Lvx4uFL0Nwmvi/EVouidv1tAFjIefZIgqQNeop2hOnE7e7v DGfhtMUpXaEn73vmmu7b6sVHYXpkAQXP4+ehTRKubFwNPlbuu+lfuEYx52NoHKZ2Kx tWZBwnbCSfwLDdSgQCa5+9OmtRytSy9ELDvioLL18I2bC1mYJjW3iPOgi9H0qrcBan nGgPw1rnuJwlcUYoiuihFW2qeyIMxjjD6+m0rFUkBSjCpm5SjBD6ei8Du0y0DfFaGe +Z9EIbODZ/EcIXcEj/HvHpvbI132phhdUr/FQ7Gr1ytrfLmpkC3+xFALjA/O+BBBFd n13LeCLRl4bRvpGme3hkj+JtLLAP/UISJzFPbo8a8/E1ymlV3ptS9xvsbfLk0aH8ZP wdF7UH/3yrubP9W/f9fmuxUIiavTDamp3FGMkyNHzIxN/5WsojzUMTQKw1jtpcor6p Lz4ByNQUgFvrNfzwTsnyri5c= From: =?utf-8?Q?Bj=C3=B6rn?= Bidar To: =?utf-8?Q?Bj=C3=B8rn?= Mork Cc: ding@gnus.org Subject: Re: What's the best way to auto-sign some emails but not all? In-Reply-To: <87zfldc82a.fsf@miraculix.mork.no> (=?utf-8?Q?=22Bj=C3=B8rn?= Mork"'s message of "Tue, 03 Dec 2024 12:36:13 +0100") References: <871pyuksd7.fsf@miraculix.mork.no> <87jzckmv6k.fsf@gmail.com> <87o71wikra.fsf@miraculix.mork.no> <874j3mdsr7.fsf@miraculix.mork.no> <87zfldc82a.fsf@miraculix.mork.no> Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGw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JnUfJnbvJy GxyCDThR+zYBAKG6/jdwmZkBQZKslnDAbMMd2WfiZZT5JW3IWC4EaKMO7HkBAKYPGZ3UbfkRvfFK S+pQ9CgtNfkSJQBtT1Ob7Y6nsacgAQCpyXN7yppmhW/oBgivITPy9Lkg+V4NK9WZYZCU9Q7LBA== Mail-Followup-To: =?utf-8?Q?Bj=C3=B8rn?= Mork , ding@gnus.org Date: Tue, 03 Dec 2024 22:38:04 +0200 Message-ID: <877c8gh58z.fsf@> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-ID: Precedence: bulk Bj=C3=B8rn Mork writes: > Bj=C3=B6rn Bidar writes: >> Bj=C3=B8rn Mork writes: >> >>> Most of the suggestions depend on message-setup-hook in some way, making >>> them work and fail similar to my existing gnus-posting-styles setup. One >>> exception is gnus-alias which AFAIU can apply a new identity to an >>> existing message buffer. But that's an interactive choice, which is >>> what I'm trying to avoid. >> >> That is not true. gnus-alias has rules which make it possible to >> automatically apply an identity. Check C-h v gnus-alias-identity-rules R= ET.=20 > > Yes, I know, and I didn't mean to say anything else. > > But AFAICS, the result of the gnus-alias automatic identity mapping is > limited by what is possible in a message-setup-hook. That's what I tried > to express. > >> Message-signature manual or automatically should also take into account >> a yanked article AFAIU. > > Sorry if I've misunderstood something, but I really don't understand how > that could work. Not sure where the authoritative source of gnus-alias > is. Doesn't look like it is part of emacs. Google gave me a github > repo, but I don't know if that's correct? I was talking of the builtin message-signature function which can be called automatically or manually using C-c C-w. From what I read it did look like that these look to not insert into the yanked article but at the signature marker at the end of the article where the don't conflict with the yanked article/message. > Anyway, that version seems to do automatic identity mapping by adding a > hook to message-setup-hook - which makes sense: > > https://github.com/altruizine/gnus-alias/blob/master/gnus-alias.el#L666 > > I understand that you can insert anything into the message buffer here. > But Gnus has not yet inserted the yanked text, so you cannot position > your inserts relative to that text. Anything you place at the beginning > of the body will be moved around later. > > There's a lot of code spread over many functions, but I believe > gnus-summary-reply() is the best place to start looking at the problem: > > https://github.com/emacs-mirror/emacs/blob/master/lisp/gnus/gnus-msg.el#L= 1061 > > It ends with: > > (message-reply nil wide) > (when yank > (gnus-inews-yank-articles yank)) > (gnus-summary-handle-replysign))))) > > Where message-reply() will call message-setup() as its final step, which > in turn will run all the message-setup-hook hooks. See > > https://github.com/emacs-mirror/emacs/blob/master/lisp/gnus/message.el#L7= 314 > https://github.com/emacs-mirror/emacs/blob/master/lisp/gnus/message.el#L6= 823 > > This means that gnus-inews-yank-articles() runs after any automatic > message setup by gnus-posting-styles, gnus-alias or my own personal > setup hook. > gnus-inews-yank-articles() can be configured to insert the quoted text > above or below the message, but I can't see any obvious way to allow it > to insert the text between any existing mml tag and the rest of the > message body. Which is where I'd like it to end up. >From what I read the message-mode yank functions took account of not interfering with the signature. To me it does sound like a bug if gnus-inews-yank-articles would break the signature. Looking at comment in message.el:4037 at (message--yank-original-internal (arg)): ;; Add a `message-setup-very-last-hook' here? It does appear like this a known possible issue. I assume gnus-message-setup-hook doesn't work either. Maybe it's worth to look for an existing bug report for possible context or open a new one. Anway good that you found a solution.