Commit graph

4868 commits

Author SHA1 Message Date
Jai Flack
77f3bc37e1 Add a mu backend for gnus-search
* lisp/gnus-search.el (gnus-search-mu-program): New defcustom
(gnus-search-mu-switches): New defcustom
(gnus-search-mu-remove-prefix): New defcustom
(gnus-search-mu-config-directory): New defcustom
(gnus-search-mu-raw-queries-p): New defcustom
(gnus-search-mu): New subclass of gnus-search-indexed
(gnus-search-transform-expression): New method
(gnus-search-mu-handle-date): New function
(gnus-search-mu-handle-flag): New function
(gnus-search-indexed-extract): New method
(gnus-search-indexed-search-command): New method (bug#54662).
2022-04-07 13:14:01 +02:00
James Thomas
9f521db6fe Ensure re-encoding after change in gnus-inews-do-gcc
* lisp/gnus/gnus-msg.el (gnus-inews-do-gcc): Re-encode the message
body if it has been modified by gnus-gcc-pre-body-encode-hook
(bug#54687).
2022-04-03 14:14:24 +02:00
Andrew G Cohen
a15f9d4e58 ; gnus/nnselect must get headers from the right group
* lisp/gnus/nnselect.el (nnselect-retrieve-headers): Make sure we are
in the right group. It might have been affected by another request.
2022-04-02 07:15:23 +08:00
Andrew G Cohen
3b6e74f08e ; * lisp/gnus/nnselect.el (nnselect-get-artlist): Fix last change. 2022-03-26 07:04:39 +08:00
Andrew G Cohen
413ef5a7e6 ; Restore regexp-quote for gnus subject match
* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Restore
regexp-quote that was inadvertently dropped in commit 2021-12-21 "Fix
gnus subject matching when subject is empty".
2022-03-26 06:23:20 +08:00
Andrew G Cohen
eb25ae3f2d Refactor gnus/nnselect artlist saving and getting
* lisp/gnus/nnselect.el (nnselect-generate-run): New function that
replaces nnselect-run.
(nnselect-store-artlist): New function.
(nnselect-get-artlist): Update function.
(nnselect-request-group, nnselect-request-thread)
(nnselect-request-create-group, nnselect-request-group-scan): Use the
new functions.
* doc/misc/gnus.texi (Selection Groups): Document artlist storage and
retrieval.
2022-03-23 08:13:28 +08:00
Andrew G Cohen
01336a2582 Fix imap fetching multiple mailboxes (bug#54158)
* lisp/gnus/mail-source.el (mail-source-fetch-imap): Variables
mailbox-source-string and remove should be reset for each mailbox.
2022-03-21 07:56:34 +08:00
Stefan Monnier
f51e12fece * lisp/gnus/mail-source.el (mail-source-set-1): Fix indent and simplify 2022-03-18 11:51:46 -04:00
Andrew G Cohen
7fef2e04b2 Improve propagation of gnus/nnselect group info
* lisp/gnus/nnselect.el (nnselect-push-info): Speed up pushing the
nnselect info back to the originating groups.
2022-03-17 19:19:39 +08:00
Andrew G Cohen
90040f0e9f Fix bug in nnselect fetching new articles in a thread
* lisp/gnus/nnselect.el (nnselect-request-thread): Ignore the
Retrieval Status Value in comparing whether articles are the same.
2022-03-17 19:19:39 +08:00
Sean Whitton
da0d598190 Don't use the original sender's address as the envelope-from
* lisp/gnus/message.el (message-resend): Avoid setting the
envelope-from to the original sender's address rather than the
resender's (bug#54429).
2022-03-17 11:57:14 +01:00
Sam Steingold
d932e256a4 Extract gnus-collect-urls-from-article' from gnus-summary-browse-url'
* lisp/gnus-sum.el (gnus-collect-urls-from-article):
New function, extracted from `gnus-summary-browse-url'.
(gnus-summary-browse-url): Use it.
2022-03-15 12:22:48 -04:00
Lars Ingebrigtsen
8a9b4cfdff Revert "New command `gnus-summary-browse-all-urls' bound to "v""
This reverts commit f52dcfd03a.

It was never agreed that this should be added.
2022-03-15 12:36:06 +01:00
Sam Steingold
f52dcfd03a New command `gnus-summary-browse-all-urls' bound to "v"
* lisp/gnus-sum.el (gnus-collect-urls-from-article): New function,
  extracted from `gnus-summary-browse-url'.
(gnus-summary-browse-url): Use it; also use `browse-url-button-open-url'
  to handle the prefix argument.
(gnus-summary-browse-all-urls): New command.
(gnus-summary-mode-map): Bind `gnus-summary-browse-all-urls' to "v".
2022-03-14 11:28:02 -04:00
Alexander Adolf
f143fcc0ed Facilitate Customisation of Message-Mode Header Completion Behaviour
* lisp/gnus/message.el (message-email-recipient-header-regexp):
New user option.
(message-completion-alist): Use it here.
2022-03-12 18:15:24 +01:00
Lars Ingebrigtsen
5b7ce98ea0 Fix syntax error in obsolete message function
* lisp/gnus/message.el (message-send-mail-function): Fix syntax error.
2022-03-06 19:34:54 +01:00
Eli Zaretskii
33958bcd3d Fix wording and punctuation in recent Gnus documentation changes
* lisp/gnus/nnselect.el (nnselect-allow-ephemeral-expiry): Make
the first sentence of the doc string be a single line.

* doc/misc/gnus.texi (Creating Search Groups): Fix space between
sentences.
2022-03-04 13:52:09 +02:00
Andrew G Cohen
62d97d4afd Turn expiry on for nnselect groups
Articles in (persistent) groups from the gnus/nnselect backend will
now be run through the expiry process upon exit, like other persistent
groups. Expiry is not on by default for ephemeral nnselect groups but
may be turned on with nnselect-allow-ephemeral-expiry set to t.

* lisp/gnus/nnselect.el (nnselect-request-expire-articles): Make
article expiry work.
(nnselect-allow-ephemeral-expiry): New variable.
* doc/misc/gnus.texi (Creating Search Groups): Document
nnselect-allow-ephemeral-expiry.
2022-03-04 16:20:01 +08:00
Andrew G Cohen
4f6583ab8a ; Fetch the nnselect-rescan parameter from the topic or group
* lisp/gnus/nnselect.el (nnselect-request-scan-group): Allow the
nnselect-rescan parameter to be set in the topic or the group.
2022-03-04 16:08:32 +08:00
Matthias Meulien
06b7c53927 Add more bookmark types
* lisp/gnus/gnus-sum.el (gnus-summary-bookmark-jump):
* lisp/man.el (Man-bookmark-jump): Mark the bookmark type
(bug#54030).
2022-02-20 13:23:33 +01:00
Eric Abrahamsen
51e51ce2df Handle multiple directory separators in gnus-search results
Try to treat the file names more like file names, less like strings
to massage.

* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Use
`expand-file-name' to collapse separators and generally canonicalize
the name. Use `file-name-split' and joining instead of regexp
munging.
2022-02-18 08:37:33 -08:00
Andrew G Cohen
9a9a3390ad Make sure nnselect search query is properly parsed
* lisp/gnus/gnus-search.el (gnus-search-make-spec): The search query
should not be interpreted as raw, but whatever the underlying search
engine expects.
2022-02-18 14:01:55 +08:00
Andrew G Cohen
8a924c8b49 Fix gnus searching of native servers
* lisp/gnus/gnus-group.el (gnus-group-make-search-group):
(gnus-group-read-ephemeral-search-group):  Find the real server even
when the group is native.
2022-02-18 13:59:34 +08:00
Eric Abrahamsen
86ebc88cd8 Fix gnus-search-run-search methods
* lisp/gnus/gnus-search.el (gnus-search-run-search): Both these
implementations were setting the current buffer and then not setting
it back.
2022-02-17 21:29:36 -08:00
Eric Abrahamsen
246f627a41 Fix gnus-search notmuch thread searches
* lisp/gnus/gnus-search.el (gnus-search-run-search): Multiple things
wrong with collecting thread ids from the search results, and
constructing a new search query.
(gnus-search-indexed-search-command): Use list appending rather than
backtick construction, that was more confusing than it was helpful.
2022-02-17 13:11:25 -08:00
Eric Abrahamsen
d43ca38556 Fix docstring and init of Gnus search -remove-prefix options
* lisp/gnus/gnus-search.el (*-remove-prefix): For all engine defaults,
remove incorrect docs stating this is a regexp (it's a string). Also,
use `expand-file-name' to get the correct default value, not `concat'
and (getenv "HOME").
2022-02-14 16:06:14 -08:00
Philip Kaludercic
35bb4c1c3c Improve stability of message-hide-headers
* message.el (message-hide-headers): Use a pointer instead of tracking
the "end-of-headers" point manually (bug#53991).
2022-02-14 11:51:48 +01:00
Lars Ingebrigtsen
53ef883b52 Cross-link message-expand-name-standard-ui-relevant doc strings
* lisp/gnus/message.el (message-expand-name-standard-ui): Mention
the other relevant variables in the doc string (bug#50667).
2022-02-12 06:47:25 +01:00
Andrew G Cohen
48e8569c87 Allow searching of nnselect (search) groups
* lisp/gnus/gnus-group.el (gnus-group-make-search-group):
(gnus-group-read-ephemeral-search-group):  Ensure the server is
correctly identified even for nnselect groups.
* lisp/gnus/gnus-search.el (gnus-search-nnselect): New function.
(gnus-search-default-engines): Use it.
(gnus-search-make-spec): Queries from nnselect should always be raw.
* lisp/gnus/nnselect.el (gnus-search): Silence the byte-compiler.
2022-02-11 15:09:46 +08:00
Andrew G Cohen
58172cc28a nnselect.el: Speed up group info updating
* lisp/gnus/nnselect.el (nnselect-request-update-info): Use a hash and
other tricks to speed things up.
(nnselect-request-group-scan): Make sure the artlist is uncompressed.
2022-02-08 14:05:02 +08:00
Stefan Monnier
d52c929e31 (with-demoted-errors): Warn on missing format arg
The `format` arg has been mandatory for a while, but the backward
compatibility code that handled the case of a missing `format` arg
made it hard to notice when using the old calling convention.

* lisp/subr.el (with-demoted-errors): Warn on missing `format` arg.

* lisp/emacs-lisp/smie.el (smie-indent--separator-outdent): Don't abuse
`with-demoted-errors`.
(smie-indent-line, smie-auto-fill):
* test/lisp/emacs-lisp/ert-tests.el (ert-test-with-demoted-errors):
* lisp/vc/vc-hooks.el (vc-refresh-state):
* lisp/vc/vc-annotate.el (vc-annotate-background-mode):
* lisp/vc/diff-mode.el (diff-syntax-fontify-hunk):
* lisp/textmodes/reftex-toc.el (reftex-re-enlarge):
* lisp/progmodes/sh-script.el (sh-smie-sh-rules):
* lisp/progmodes/octave.el (inferior-octave-startup):
* lisp/pcmpl-gnu.el (pcmpl-gnu-make-all-targets):
* lisp/org/org-refile.el (org-refile):
* lisp/org/org-capture.el (org-capture-store-last-position):
* lisp/nxml/nxml-mode.el (nxml-mode):
* lisp/notifications.el (notifications-notify):
* lisp/gnus/mm-view.el (mm-display-inline-fontify):
* lisp/finder.el (finder-unload-function):
* lisp/files.el (safe-local-variable-p, backup-buffer-copy
* lisp/autorevert.el (auto-revert-notify-handler):
Pass `format` arg to `with-demoted-errors`.
2022-02-04 19:39:53 -05:00
Andrew G Cohen
634cedfea1 Improve compression of article lists in gnus/nnselect
* lisp/gnus/nnselect.el (nnselect-compress-artlist): Allow compressed list.
nnselect-uncompress-artlist): Properly loop over rsv values.
2022-02-04 09:04:20 +08:00
Lars Ingebrigtsen
63edde9f0e Fix nnregistry byte compilation warning
* lisp/gnus/nnregistry.el (nnregistry-server-opened)
(nnregistry-open-server): Fix byte compilation warning.
2022-01-31 22:36:25 +01:00
Stefan Monnier
cce477cad7 (byte-compile-eval): Adjust to changes in load-history
The `function-history` patch introduced a regression which caused
spurious compiler warnings.  Fix it.
The new code also fixes a bug in the old code, thus causing some
new non-spurious warnings.  Fix them as well.

* lisp/emacs-lisp/bytecomp.el (byte-compile-eval): Adjust to changes in
`load-history`.

* lisp/gnus/gnus-group.el (nnrss-discover-feed)
(nnrss-save-server-data): Use `declare-function`.

* lisp/cedet/semantic/wisent/comp.el (wisent-defcontext)
(wisent-with-context):
* lisp/emacs-lisp/comp.el (comp-op-case): Silence compiler warning.
2022-01-31 16:25:09 -05:00
Eric Abrahamsen
5819fcb63b Don't remove dummy.group from gnus-newsrc-alist on Gnus save
bug#53352

* lisp/gnus/gnus-start.el (gnus-gnus-to-quick-newsrc-format): This
function was removing dummy.group from the global value of
`gnus-newsrc-alist' on save; we only wanted to remove it temporarily.
2022-01-31 11:26:23 -08:00
Eric Abrahamsen
161382f76d Obsolete gnus-registry-enabled in favor of checking gnus-registry-db
* lisp/gnus/gnus-registry.el (gnus-registry-enabled): Obsolete this
variable; recommend using `gnus-registry-db' as a boolean instead.
(gnus-registry-load, gnus-registry-register-message-ids,
gnus-registry-article-marks-to-chars,
gnus-registry-article-marks-to-names, gnus-registry-clear,
gnus-registry-install-p): In all these functions, test
`gnus-registry-db' instead of `gnus-registry-enabled'. We no longer
set or clear that variable.
2022-01-31 11:25:42 -08:00
Lars Ingebrigtsen
90bbf27f02 Make Gnus address checking more resilient
* lisp/gnus/gnus-art.el (article--check-suspicious-addresses):
Check that we have an email address before checking the validity
(bug#53651).
2022-01-31 16:41:32 +01:00
Jae-hyeon Park
852a5f24bb Make gnus-icalendar-with-decoded-handle more DWIM
* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-with-decoded-handle): Assume that calendars with
no charset is utf-8.

Copyright-paperwork-exempt: yes
2022-01-29 15:44:44 +01:00
Lars Ingebrigtsen
8f16b1aef1 Fix gnus-article-truncate-lines doc string
* lisp/gnus/gnus-art.el (gnus-article-truncate-lines): Fix doc
string.
2022-01-24 19:52:02 +01:00
Lars Ingebrigtsen
842ea1e22f Fix Gnus registry key bindings
* lisp/gnus/gnus-registry.el (gnus-registry-install-shortcuts):
Don't overwrite all other M M commands (bug#53492).
2022-01-24 11:09:40 +01:00
Lars Ingebrigtsen
d7f0a0538d Followup fix to previous message-update-smtp-method-header change
* lisp/gnus/message.el (message-update-smtp-method-header): Narrow
to the headers first.
2022-01-21 14:20:31 +01:00
Lars Ingebrigtsen
1fefb15aa8 Allow From to be part of message-hidden-headers
* lisp/gnus/message.el (message-update-smtp-method-header): Don't
bug out if the From header is part of `message-hidden-headers'
(bug#52871).
2022-01-21 14:18:19 +01:00
Lars Ingebrigtsen
7eb53e8a72 Clean up mm-display-inline-fontify slightly
* lisp/gnus/mm-view.el (mm-display-inline-fontify): Remove some
left-over compat code.
2022-01-21 12:07:31 +01:00
Lars Ingebrigtsen
55c1670bc5 Rename the textsec-check function to textsec-suspicious-p
* lisp/net/shr.el (shr-tag-a):
* lisp/international/textsec-check.el (textsec-suspicious-p):
* lisp/gnus/message.el (message-send-mail):
* lisp/gnus/gnus-art.el (article--check-suspicious-addresses):
* etc/NEWS (like):
* doc/lispref/text.texi (Suspicious Text):
(Suspicious Text): Rename the textsec-check function to
textsec-suspicious-p.
2022-01-20 14:33:36 +01:00
Lars Ingebrigtsen
e4f59a6d1a Make article--check-suspicious-addresses more resilient
* lisp/gnus/gnus-art.el (article--check-suspicious-addresses): Be
more resilient to junk in headers.  (But all this should be rewritten
eventually, because the entire process is way too convoluted.)
2022-01-20 06:42:56 +01:00
Lars Ingebrigtsen
1476b0d7a6 Make article--check-suspicious-addresses more resilient
* lisp/gnus/gnus-art.el (article--check-suspicious-addresses):
Don't bug out on mbox-less addresses.
2022-01-19 19:44:29 +01:00
Lars Ingebrigtsen
775faf6efa Tweak the previous suspicious Message change
* lisp/gnus/message.el (message-check-recipients)
(message-send-mail): Move the check to after encoding.
2022-01-19 19:10:45 +01:00
Lars Ingebrigtsen
ec0abf37ee Make Message check for invalid recipients before sending
* lisp/gnus/message.el (message-check-recipients): Check for
suspicious addresses before sending (bug#51733).
2022-01-19 19:00:13 +01:00
Lars Ingebrigtsen
b28f420737 Make Gnus check for suspicious headers
* lisp/gnus/gnus-art.el (gnus-treat-suspicious-headers): New user
option.
(gnus-article-treat-suspicious-headers): New function.
(article-decode-encoded-words): Hook into the machinery to check
headers.
(article--check-suspicious-addresses): New function.
2022-01-19 18:43:43 +01:00
Lars Ingebrigtsen
39d4e1ca21 Move the Gnus range functions to a new range.el file
* lisp/emacs-lisp/range.el: New file.

* lisp/gnus/gnus-agent.el (range):
(gnus-agent-synchronize-group-flags):
(gnus-agent-possibly-alter-active):
(gnus-agent-fetch-headers):
(gnus-agent-read-agentview):
(gnus-agent-fetch-group-1):
(gnus-agent-read-p):
(gnus-agent-expire-group-1):
(gnus-agent-retrieve-headers): Adjust callers.

* lisp/gnus/gnus-art.el (range):
(gnus-article-describe-bindings):

* lisp/gnus/gnus-cloud.el (range):
(gnus-cloud-available-chunks):

* lisp/gnus/gnus-draft.el (gnus-group-send-queue):

* lisp/gnus/gnus-group.el (range):
(gnus-group-line-format-alist):
(gnus-number-of-unseen-articles-in-group):
(gnus-group-update-eval-form):
(gnus-group-read-group):
(gnus-group-delete-articles):
(gnus-group-catchup):
(gnus-group-expire-articles-1):
(gnus-add-marked-articles):

* lisp/gnus/gnus-int.el (gnus-request-marks):

* lisp/gnus/gnus-kill.el (gnus-apply-kill-file-internal):

* lisp/gnus/gnus-range.el (gnus-range-difference)
(gnus-sorted-range-intersection, gnus-uncompress-range)
(gnus-add-to-range, gnus-remove-from-range)
(gnus-member-of-range, gnus-list-range-intersection)
(gnus-list-range-difference, gnus-range-length, gnus-range-add)
(gnus-range-map): Make into obsolete aliases.

* lisp/gnus/gnus-start.el (gnus-make-articles-unread):
(gnus-convert-old-ticks):
(gnus-read-old-newsrc-el-file):

* lisp/gnus/gnus-sum.el (gnus-select-newsgroup):
(gnus-articles-to-read):
(gnus-articles-to-read):
(gnus-killed-articles):
(gnus-adjust-marked-articles):
(gnus-update-marks):
(gnus-update-marks):
(gnus-compute-read-articles):
(gnus-list-of-read-articles):
(gnus-summary-update-info):
(gnus-summary-move-article):
(gnus-summary-expire-articles):
(gnus-update-read-articles):
(gnus-summary-insert-old-articles):
(gnus-summary-insert-old-articles):
(gnus-summary-insert-old-articles):

* lisp/gnus/mail-source.el (gnus-range):
(gnus-compress-sequence):

* lisp/gnus/nnheader.el (range):
(gnus-range-add):
(nnheader-update-marks-actions):

* lisp/gnus/nnimap.el (nnimap-update-info):
(nnimap-update-info):
(nnimap-update-info):
(nnimap-update-qresync-info):
(nnimap-update-qresync-info):
(nnimap-update-qresync-info):
(nnimap-parse-copied-articles):

* lisp/gnus/nnmaildir.el (nnmaildir-request-update-info):
(nnmaildir-request-update-info):
(nnmaildir-request-expire-articles):
(nnmaildir-request-expire-articles):
(nnmaildir-request-set-mark):

* lisp/gnus/nnmairix.el (nnmairix-request-set-mark):

* lisp/gnus/nnmbox.el (nnmbox-record-active-article):
(nnmbox-record-deleted-article):

* lisp/gnus/nnml.el (nnml-request-compact-group):

* lisp/gnus/nnvirtual.el (nnvirtual-request-expire-articles):
* lisp/gnus/nnselect.el (numbers-by-group):
(nnselect-request-update-info):
(nnselect-push-info):
2022-01-17 15:47:50 +01:00