Re: [defadvice, advice-add ]
2025-02-12
Thread
Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
> Uwe Brauer via "Announcements and discussions for GNUS, the GNU Emacs > Usenet newsreader (in English)" writes: > Most nadvice pieces, including :before advice pieces, are passed the > arguments that are passed to the advised function. > `gnus-summary-followup-with-original' is always called with at least one > argument. You can just throw all arguments away: > (defun my-toggle-bcc-check (&rest _) ...). Was it that? So the following seems to solve my issues with advice --8<---cut here---start->8--- (defun check-my-to-field (&optional arg) "This function will be run before you execute followup. And it warns you if your email address is not in the To field. That warning is a safty message if you had been only on the BCC field!!" (interactive "P") --8<---cut here---end--->8--- Thanks!!! Still the function should be generalised with a more sophisticated search, but right now it more than sufficient for my purposes and just a couple of minutes ago I faced a situation where I was in the BCC BTW I am still wondering that such a functionality is not implemented, yet. Uwe Brauer
Re: [defadvice, advice-add ]
2025-02-12
Thread
Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
>>> "CG" == Christoph Groth writes: > Uwe Brauer wrote: >> BTW I am still wondering that such a functionality is not implemented, >> yet. > Could you please post the complete code once you are more or less done > with it? Sure, I am still testing it a bit. So, I will send it over the weekend. I might also send it to the dev list and ask for more opinions since it is not very sophisticated. Right now, in newsgroups, it indicates false positives, so I deactivate it manually using a function that I have bound to a key. A better solution would be to modify the search, but I don’t have time for that. In your mailbox, emails from mailing lists might also cause false positives. I can live with false positives, but false negatives are much more damaging. Uwe -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. smime.p7s Description: S/MIME cryptographic signature
Re: [defadvice, advice-add ]
Uwe Brauer wrote: > BTW I am still wondering that such a functionality is not implemented, > yet. Could you please post the complete code once you are more or less done with it? Thanks Christoph
Custom article quit function and reopen issue
I attempted to create a custom function to close the article buffer and delete its window: --8<---cut here---start->8--- (defun my-gnus-article-quit () "Close the current article buffer and delete its window." (interactive) (kill-current-buffer) (delete-window)) (define-key gnus-article-mode-map (kbd "q") #'my-gnus-article-quit) --8<---cut here---end--->8--- While this works in closing the article buffer, reopening the same article results in a blank article in edit mode, which seems like another potential issue. Could you confirm if this is expected behavior or a bug? If it's a bug, is there a recommended fix or workaround? Best regards, Bart
Re: Checking if user-mail-address is in To or CC (to avoid an embarrassing social situation) BCC
Uwe Brauer via "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)" writes: >> Uwe Brauer writes: > >> Have you ruled out using the message-prune-recipient-rules and >> message-dont-reply-to-names in (info "(message) Wide Reply")? They may >> be enough for you (I haven't read your code). > > Thanks, but these have very different purpose. You use them to avoid > doble sending to addresses you know in advance. > My use case is very different as I described in my first posting. So I > cannot know beforehand which address to include in one of these rules! Sorry I meant the 'message-wide-reply-to-function' in the same page. On the face of it, it seems to cover this use case: > Robert can only avoid this by using a function (before replying to > all) that checks whether the sender was included in the original > email’s *To* or *CC* fields. --