summaryrefslogtreecommitdiff
path: root/lisp/gnus
AgeCommit message (Collapse)Author
2026-05-26Gnus: Prefer passing functions to message-add-actionStefan Monnier
Building code with code is tricky. E.g. the code in gnus-draft-setup suffered from a security issue because it forgot to quote some arguments (see commit 142b1e0d4c3). * lisp/gnus/gnus-salt.el (gnus-pick-setup-message): * lisp/gnus/gnus-msg.el (gnus-inews-add-send-actions): * lisp/gnus/gnus-draft.el (gnus-draft-setup): Prefer passing functions to message-add-action over passing it ELisp expressions. * lisp/gnus/message.el (message-do-actions): Drop errors but not silently.
2026-05-23Rename `icalendar-recur' type and related functionsRichard Lawrence
More context in Bug#80786 and: https://lists.gnu.org/archive/html/emacs-orgmode/2026-03/msg00286.html `icalendar-recur' as a type name for RRULE values was confusing and made the accessors for this type difficult to discover, because `icalendar-recur-' is also used as a prefix in icalendar-recur.el. This change renames the `icalendar-recur' type to `icalendar-rrule-value' and renames the accessor functions for these values appropriately. * lisp/calendar/icalendar-parser.el: Rename symbols as follows: (icalendar-recur): `icalendar-rrule-value' (icalendar-read-recur-rule-part): `icalendar-read-rrule-part' (icalendar-print-recur-rule-part): `icalendar-print-rrule-part' (icalendar-recur-rule-part): `icalendar-rrule-part' (icalendar-read-recur): `icalendar-read-rrule-value' (icalendar-print-recur): `icalendar-print-rrule-value' (icalendar--recur-value-types): `icalendar--rrule-value-types' (icalendar-recur-value-p): `icalendar-rrule-value-p' (icalendar-recur-freq): `icalendar-rrule-freq' (icalendar-recur-interval-size): `icalendar-rrule-interval-size' (icalendar-recur-until): `icalendar-rrule-until' (icalendar-recur-count): `icalendar-rrule-count' (icalendar-recur-weekstart): `icalendar-rrule-weekstart' (icalendar-recur-by*): `icalendar-rrule-by*'. (icalendar-rrule): (icalendar-index-insert): (icalendar-index-get): Update references. * lisp/calendar/icalendar-recur.el (icalendar-recur-find-interval): (icalendar-recur-nth-interval): (icalendar-recur-next-interval): (icalendar-recur-previous-interval): (icalendar-recur-refine-from-clauses): (icalendar-recur-recurrences-in-interval): (icalendar-recur-recurrences-in-window): (icalendar-recur-recurrences-to-count): (icalendar-recur-tz-observance-on): Update references. * lisp/calendar/diary-icalendar.el: Update references. * lisp/calendar/icalendar-shortdoc.el (icalendar): Update shortdoc examples. * lisp/gnus/gnus-icalendar.el: Update references. * test/lisp/calendar/diary-icalendar-tests.el: * test/lisp/calendar/icalendar-parser-tests.el: * test/lisp/calendar/icalendar-recur-tests.el: Update references in tests.
2026-05-22Fix Lisp injection via X-Draft-From in GnusJacek Migacz
* lisp/gnus/gnus-msg.el (gnus-inews-make-draft-meta-information): Escape the group name with prin1-to-string to prevent arbitrary Lisp injection through crafted group names. The unescaped group name was embedded into a Lisp-readable string, parsed back with read-from-string in gnus-draft-setup, and eventually eval'd via message-do-actions, allowing code execution when a draft was sent.
2026-05-10; * lisp/gnus/message.el (message-server-alist): Doc fix (bug#80880).Augusto Stoffel
2026-05-09; Fix last changeMichael Albinus
* doc/misc/gnus.texi (System Sleep Integration): Move @anchor up. * etc/NEWS: gnus-dbus.el is obsolete. Presentational fixes and improvements. * lisp/gnus/gnus-start.el (gnus-close-on-sleep): Add :version. (gnus-sleep-handler): Use `ignore-errors'.
2026-05-09Move gnus-dbus.el to obsolete/gnus-dbus.elMorgan Smith
* lisp/gnus/gnus-dbus.el: Move from here... * lisp/obsolete/gnus-dbus.el: ...to here.
2026-05-09Gnus: Use new sleep libraryMorgan Smith
* etc/NEWS: Announce. * lisp/gnus/gnus-start.el: Don't require gnus-dbus. (gnus-sleep-handler): New function. (gnus-close-on-sleep): New variable. (gnus-1): Add `gnus-sleep-handler' to `system-sleep-event-functions' when `gnus-close-on-sleep' is non-nil. * doc/misc/gnus.texi: Update documentation.
2026-05-05Accept stream type as 4th argument of X-Message-SMTP-Method headerAugusto Stoffel
* lisp/gnus/message.el (message-multi-smtp-send-mail): Set 'smtpmail-stream-type' if specificed in the header. * doc/misc/message.texi (Mail Variables): Document that. (Bug#80880)
2026-05-03Gnus logo in server buffer's mode line (bug#80850)Manuel Giraud
* lisp/gnus/gnus-srvr.el (gnus-server-mode): Initialize needed format specifications and call 'gnus-set-mode-line' for the server buffer. * lisp/gnus/gnus-sum.el (gnus-set-mode-line): Handle when WHERE is set to 'server. * lisp/gnus/gnus.el (gnus-updated-mode-lines): Add server.
2026-03-28Update gnus-icalendar to use new iCalendar libraryRichard Lawrence
This change updates gnus-icalendar.el to use the new iCalendar library instead of obsolete functions from icalendar.el. * lisp/gnus/gnus-icalendar.el (gnus-icalendar-event) (gnus-icalendar-event:recurring-p) (gnus-icalendar-event:recurring-interval) (gnus-icalendar-event:recurring-days) (gnus-icalendar-event--find-attendee) (gnus-icalendar-event-from-ical) (gnus-icalendar-event-from-buffer) (gnus-icalendar-event--build-reply) (gnus-icalendar-event-reply-from-buffer) (gnus-icalendar-event:org-repeat): Reimplement using new iCalendar functions. (gnus-icalendar-event--attendees-by-type): Rename from `gnus-icalendar-event--get-attendee-names'. (gnus-icalendar-event--build-reply): Rename from `gnus-icalendar-event--build-reply-event-body'. (gnus-icalendar--format-participant-list): Expect list of `icalendar-attendee's. Add docstring. (Bug#80426) * test/lisp/gnus/gnus-icalendar-tests.el: Update tests.
2026-03-28; * lisp/gnus/gnus-delay.el (gnus-delay-article): Fix last change.Eli Zaretskii
2026-03-28Gnus: Accept date and time when specifying delay of a new articleAdam Sjøgren
* lisp/gnus/gnus-delay.el (gnus-delay-article): Accept YYYY-MM-DD hh:mm(:ss) as a valid format. (Bug#80637) Copyright-paperwork-exempt: yes
2026-03-15Merge remote-tracking branch 'origin/scratch/error-API'Stefan Monnier
2026-03-11Add ecomplete support for more header typesPhilip Kaludercic
* lisp/gnus/message.el (message-put-addresses-in-ecomplete): Handle "BCC" and "X-Debbugs-CC" headers.
2026-03-11Tweak recent error descriptor changesBasil L. Contovounesios
* etc/NEWS: Fix capitalization and markup. * lisp/emacs-lisp/ert.el (ert--should-error-handle-error): Prefer any over cl-some where either will do. * lisp/epa-file.el (epa-file--find-file-not-found-function): Reindent. (epa-file--error-add-context): Use correct variables. Add docstring. * lisp/ffap.el (ffap-machine-p): * lisp/gnus/nnmaildir.el (nnmaildir--emlink-p): Prefer string-equal-ignore-case over case fiddling. * lisp/gnus/gnus-search.el (gnus-search-run-query): Fix typo in error re-signaling. * lisp/ibuffer.el (ibuffer-confirm-operation-on): Prefer string search over regexp matching where either will do. * test/lisp/vc/vc-tests/vc-tests.el (vc-test--run-maybe-unsupported-function): Pacify unused condition-case error variable warnings (bug#72212).
2026-03-10Use single-arg form of `signal` to re-throw an errorStefan Monnier
* lisp/vc/smerge-mode.el (smerge-extend): * lisp/vc/diff-mode.el (diff-beginning-of-file-and-junk): * lisp/transient.el (transient--with-emergency-exit): * lisp/textmodes/tex-mode.el (latex-forward-sexp): * lisp/tar-mode.el (tar-mode): * lisp/savehist.el (savehist--reload): * lisp/progmodes/octave.el (inferior-octave-resync-dirs): * lisp/progmodes/js.el (js--re-search-forward): * lisp/plstore.el (plstore--decrypt): * lisp/net/dbus.el (dbus-ignore-errors, dbus-register-signal) (dbus-handle-event): * lisp/mouse.el (mouse-drag-track, mouse-drag-region-rectangle): * lisp/minibuffer.el (completion-pcm--find-all-completions): * lisp/mail/rfc2231.el (rfc2231-parse-string): * lisp/mail/rfc2047.el (rfc2047-encode-region): * lisp/jit-lock.el (jit-lock-fontify-now): * lisp/international/ja-dic-utl.el (skkdic-lookup-key): * lisp/gnus/nnselect.el (nnselect-generate-artlist): * lisp/gnus/mml-sec.el (mml-secure-epg-encrypt, mml-secure-epg-sign): * lisp/gnus/mail-source.el (mail-source-fetch-pop) (mail-source-check-pop): * lisp/gnus/gnus-art.el (gnus-article-read-summary-keys): * lisp/files.el (basic-save-buffer-2, files--ensure-directory) (files--force, copy-directory): * lisp/eshell/esh-io.el (eshell-output-object-to-target): * lisp/epa.el (epa-decrypt-file, epa-verify-file, epa-sign-file) (epa-encrypt-file, epa-decrypt-region, epa-verify-region) (epa-sign-region, epa-encrypt-region, epa-delete-keys) (epa-export-keys, epa-insert-keys): * lisp/emacs-lisp/package.el (package--unless-error): * lisp/emacs-lisp/multisession.el (multisession--read-file-value): * lisp/emacs-lisp/lisp.el (up-list-default-function): * lisp/desktop.el (desktop-kill): * lisp/calendar/time-date.el (date-to-time): * lisp/calendar/appt.el (appt-display-message): * lisp/calc/calc.el (calc-do): * lisp/bookmark.el (bookmark-handle-bookmark): * src/fileio.c (report_file_errno): * lisp/vc/vc.el (vc-checkout, vc-pull): Use `(signal err)` instead of `(signal (car err) (cdr err))`.
2026-03-10Use the new error API functionsStefan Monnier
* lisp/epa-file.el (epa-file--find-file-not-found-function): Use `error-slot-value` and `error-data`. (epa-file-insert-file-contents): Use `error-has-type-p`, `error-slot-value`, and `error-data`. * lisp/jka-compr.el (jka-compr-insert-file-contents): Use `error-has-type-p` and `error-slot-value` as well as new re-signaling form of `signal`. * lisp/simple.el (minibuffer-error-function): Use `error-has-type-p`. * lisp/startup.el (startup--load-user-init-file): Use `error-message-string`. (command-line): Use `error-has-type-p` and `error-message-string`. * lisp/type-break.el (type-break-demo-life): Use `error-message-string`. * lisp/emacs-lisp/bytecomp.el (batch-byte-compile-file): Use `error-message-string` and `error-has-type-p`. * lisp/emacs-lisp/edebug.el (edebug-safe-eval, edebug-report-error) (edebug-eval-expression): * lisp/emacs-lisp/debug.el (debugger-eval-expression): Use `error-message-string`. * lisp/emacs-lisp/ert.el (ert--should-error-handle-error): Use `error-has-type-p` and `error-type`. * lisp/net/sasl.el (sasl-error): Use `define-error`. * lisp/net/tramp-compat.el (tramp-error-type-p): New function. (tramp-permission-denied, tramp-compat-permission-denied): Use it. * lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Use `error-type-p`. * lisp/xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal) (turn-off-xterm-mouse-tracking-on-terminal): Use `error-slot-value`. * lisp/simple.el (next-line, previous-line): Remove useless `condition-case` handler, and hence the whole `condition-case`, and then simplify. * lisp/gnus/nnrss.el (nnrss-insert): Use `with-demoted-errors`. * lisp/gnus/nnmaildir.el (nnmaildir--emlink-p, nnmaildir--enoent-p) (nnmaildir--eexist-p): Use `error-has-type-p`. (nnmaildir--new-number, nnmaildir-request-set-mark): Use single-arg `signal`. * lisp/ffap.el (ffap-machine-p): Use `error-slot-value`. * lisp/emacs-lisp/comp.el (comp--native-compile): Use `error-has-type-p` as well as single-arg `signal`. * lisp/net/ange-ftp.el (ange-ftp-hook-function): Use single-arg `signal`. * lisp/ebuff-menu.el (electric-buffer-menu-looper): Use `error-has-type-p`. * lisp/progmodes/ebrowse.el (ebrowse-electric-list-looper): Use `error-has-type-p`. (ebrowse-electric-position-looper): Make it an alias of `ebrowse-electric-list-looper`. * lisp/ibuffer.el (ibuffer-confirm-operation-on): * lisp/ls-lisp.el (ls-lisp--insert-directory): * lisp/gnus/gnus-search.el (gnus-search-run-query): * lisp/mail/mail-extr.el (mail-extr-safe-move-sexp): * lisp/net/dbus.el (dbus-set-property): * lisp/net/eudc-export.el (eudc-bbdbify-phone): * lisp/net/imap.el (imap-fetch-safe): * lisp/vc/vc.el (vc-root-dir): Use `error-slot-value` and single-arg `signal` to re-signal.
2026-03-10Error handling clarifications found during error-APIStefan Monnier
* lisp/simple.el (next-line, previous-line): Remove useless `condition-case` handler, and hence the whole `condition-case`, and then simplify. * lisp/emacs-lisp/comp.el (comp--error-add-context): New function. (comp--native-compile): Use it. * lisp/gnus/nnrss.el (nnrss-insert): Use `with-demoted-errors`.
2026-02-21Remove one lambda level in some Gnus' functionsManuel Giraud
* lisp/gnus/gnus-agent.el (gnus-agent-get-undownloaded-list): * lisp/gnus/gnus-cloud.el (gnus-cloud-prune-old-chunks): * lisp/gnus/gnus-draft.el (gnus-draft-check-draft-articles): * lisp/gnus/gnus-group.el (gnus-group-sort-flat) (gnus-group-expire-all-groups): * lisp/gnus/gnus-sum.el (gnus-thread-highest-number): * lisp/gnus/gnus-topic.el (gnus-topic-init-alist) (gnus-topic-sort-topic): Replace the (lambda (x) (fun x)) pattern with #'fun. (Bug#80382)
2026-02-09Fix selected group sort with topics (bug#80341)Manuel Giraud
* lisp/gnus/gnus-topic.el (gnus-group-sort-selected-topic): New function to sort selected groups into topic. (gnus-topic-mode): Use it as sort selected function in topic mode. * etc/NEWS: Announce the change.
2026-02-09Add missing symbolic prefix keybindingManuel Giraud
* lisp/gnus/gnus-group.el (:keymap): Add symbolic prefix to group keymap. * etc/NEWS: Announce the change.
2026-01-20Call browser functions via `browse-url'Daniel Mendler
This is in order to apply `browse-url-transform-alist'. * lisp/net/browse-url.el (browse-url-with-browser-kind) (browse-url-button-open, browse-url-button-open-url): * lisp/net/shr.el (shr-browse-url): * lisp/net/eww.el (eww-browse-with-external-browser): * lisp/gnus/gnus-sum.el (gnus-summary-browse-url): * lisp/emacs-lisp/package.el (package-browse-url): Let-bind `browse-url-browser-function' and call `browse-url'.
2026-01-17; Gnus: Remove redundant cl-lib runtime dependenciesUSAMI Kenta
Since Emacs 31 moves 'incf' and 'decf' to core, these Gnus libraries no longer require 'cl-lib' at runtime. * lisp/gnus/gnus-async.el: * lisp/gnus/gnus-cache.el: * lisp/gnus/gnus-logic.el: * lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-spec.el: * lisp/gnus/gnus-srvr.el: * lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-uu.el: * lisp/gnus/gnus-win.el: * lisp/gnus/mm-encode.el: * lisp/gnus/mm-url.el: * lisp/gnus/nnatom.el: * lisp/gnus/nnbabyl.el: * lisp/gnus/nndoc.el: * lisp/gnus/nneething.el: * lisp/gnus/nnmail.el: * lisp/gnus/nnoo.el: * lisp/gnus/nnspool.el: * lisp/gnus/nnvirtual.el: * lisp/gnus/nnweb.el: Remove redundant (require 'cl-lib). (Bug#80129)
2026-01-17gnus-msg-mail: Attempt to start Gnus if not yet aliveDaniel Mendler
* lisp/gnus/gnus-msg.el (gnus-msg-mail): Attempt to start Gnus if not yet alive. In case of failure, fall back to plain message mode. (Bug#80173)
2026-01-01; Add 2026 to copyright years.Sean Whitton
2025-12-23Revert the commit 70678cd5 (bug#80052)Katsumi Yamaoka
* message.el (message-get-reply-headers): Revert.
2025-12-13nnatom: Fix parsing of empty articlesDaniel Semyonov
* lisp/gnus/nnatom.el (nnatom--read-parts): Fix typo (bug#77539).
2025-12-03gnus-icalendar.el: Avoid EIEIO's non-standard FOO-p predicatesStefan Monnier
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event->gnus-calendar) (gnus-icalendar-event:inline-org-buttons): Avoid EIEIO's non-standard FOO-p predicates.
2025-11-29Add current subject to future history in `message-change-subject'Rudolf Adamkovič
* lisp/gnus/message.el (message-change-subject): Read the new subject with the old subject in the "future history". * etc/NEWS (minutes): Announce the feature. (Bug#79815)
2025-11-15Merge from origin/emacs-30Eli Zaretskii
9b3eb06c76e Indent jsx_text properly with modern grammars 1c87be8ac95 ; * lisp/gnus/gnus.el (gnus-summary-line-format): Reindent.
2025-11-15* lisp/gnus/gnus.el (gnus-summary-line-format): Doc fix (bug#79820).Marc Herbert
Copyright-paperwork-exempt: yes
2025-11-12; * lisp/gnus/gnus.el (gnus-summary-line-format): Reindent.Sean Whitton
2025-11-12; gnus-summary-line-format: Fix '%&user-date;' docs (bug#79820).Marc Herbert
2025-10-18Merge from origin/emacs-30Eli Zaretskii
53aac6aecd2 ; Improve documentation of commands that split current wi...
2025-10-18; Improve documentation of commands that split current windowEli Zaretskii
* doc/emacs/sending.texi (Sending Mail): * doc/emacs/dired.texi (Dired Enter, Dired Visiting): * doc/emacs/maintaining.texi (Old Revisions) (Change Log Commands, Looking Up Identifiers): * doc/emacs/windows.texi (Displaying Buffers): * doc/emacs/files.texi (Visiting): Add cross-references to where user options are described which control how windows are split. * lisp/mail/sendmail.el (mail-other-window): * lisp/gnus/message.el (message-mail-other-window) (message-news-other-window): * lisp/replace.el (occur-mode-goto-occurrence-other-window): * lisp/vc/vc.el (vc-revision-other-window): * lisp/vc/vc-dir.el (vc-dir-find-file-other-window): * lisp/progmodes/xref.el (xref-find-definitions-other-window): * lisp/simple.el (compose-mail-other-window) (clone-indirect-buffer-other-window): * lisp/vc/add-log.el (add-change-log-entry-other-window): * lisp/view.el (view-file-other-window) (view-buffer-other-window): * lisp/window.el (switch-to-buffer-other-window): * lisp/files.el (find-file-other-window) (find-file-read-only-other-window) (find-alternate-file-other-window): * lisp/dired.el (dired-other-window) (dired-mouse-find-file-other-window) (dired-find-file-other-window, dired-jump-other-window): Mention in the doc strings how to control the way the current window is split.
2025-09-29Fix 'mm-copy-to-buffer' when original text is multibyteEli Zaretskii
* lisp/gnus/mm-decode.el (mm-copy-to-buffer): Always return a unibyte buffer. If the original text was multibyte, encode it while inserting it into the copy buffer. (Bug#79376)
2025-09-26nnmbox-read-mbox: fix Xref header parsingJakub Ječmínek
* lisp/gnus/nnmbox.el (nnmbox-read-mbox): Use the 'mail-fetch-field' function instead of a broken regexp which matched Date-like headers. (Bug#79167)
2025-08-28Prefer tls to ssl in nnimap and smtpmail codeRobert Pluim
* lisp/gnus/nnimap.el (nnimap-open-connection): Use 'tls. (nnimap-open-connection-1): Check 'tls before 'ssl. * lisp/mail/smtpmail.el (smtpmail-stream-type): Add 'ssl to allowed values, state 'tls is preferred.
2025-08-16Handle 'lexical-binding' cookie in nnrss outputManuel Giraud
* lisp/gnus/nnrss.el (nnrss-save-server-data) (nnrss-save-group-data): Add a 'lexical-binding' cookie. * lisp/gnus/nnrss.el (nnrss-read-server-data) (nnrss-read-group-data): Allow missing 'lexical-binding' cookie. (Bug#79199)
2025-08-02Merge from origin/emacs-30Eli Zaretskii
477335a10ba ; Fix documentation of 'find-file-noselect' 9e3720bbb11 * doc/misc/gnus.texi (Category Syntax): Update gnus-agent... 456f44a7b3c ; Improve documentation of change hooks f20d5e63bc0 ; * lisp/image.el (image-supported-file-p): Doc fix (bug#... 8ec2ddebdd4 ; Update documentation of GC in ELisp manual 57a9798c22a Prefer "tls" to "ssl" in documentation
2025-07-28Prefer "tls" to "ssl" in documentationRobert Pluim
* doc/misc/gnus.texi (NNTP): Refer to 'nntp-open-tls-stream'. (Direct Functions, Customizing the IMAP Connection): Add commentary about desirability of STARTTLS. Correct documentation about use of GnuTLS. Use 'tls in example. * lisp/gnus/nnimap.el (nnimap-server-port): Mention 'tls in preference to 'ssl. * lisp/gnus/nntp.el (nntp-open-connection-function) (nntp-never-echoes-commands): Document 'nntp-open-tls-stream' as preferred to 'nntp-open-ssl-stream'.
2025-07-25Add new function 'dom-inner-text'Jim Porter
This replaces 'dom-text' and 'dom-texts', and is both more correct and more efficient than them. * lisp/dom.el (dom-text, dom-texts): Make obsolete in favor of... (dom-inner-text--1, dom-inner-text): ... these new functions. Update callers. * doc/lispref/text.texi (Document Object Model): Update documentation to refer to 'dom-inner-text'. * etc/NEWS: Announce this change.
2025-06-29Display SVG images inline in GnusJuri Linkov
* lisp/gnus/mm-decode.el (mm-inline-media-tests): Add "image/svg+xml".
2025-05-10Merge from origin/emacs-30Eli Zaretskii
0d493864cee Fix indentation of XML comments 1a2c29b5317 Improve Tramp's make-process handling for Solaris a7dffc2ea38 Document 'time-stamp-time-zone' in Emacs Manual 0b4eb525b69 Make treesit--simple-indent-eval more permissive (bug#78065) ed7b55f6bf1 Adapt Tramp tests b172a1478c1 ; * doc/lispref/tips.texi (Library Headers): Fix wording ... 81629b2b2ba ; * lisp/gnus/mail-source.el (mail-sources): Fix a typo (...
2025-05-04; * lisp/gnus/mail-source.el (mail-sources): Fix a typo (bug#78235).Eli Zaretskii
2025-04-26nnfeed: Pass through list request failure reportsDaniel Semyonov
* lisp/gnus/nnfeed.el (nnfeed-request-list): Report the same message reported by the inheriting backend on failure. (Bug#74857)
2025-04-13lisp/gnus/gnus-start.el (gnus-dribble-eval-file): Ignore lexbind warningStefan Monnier
2025-04-05* lisp/gnus/nnfeed.el (nnfeed--write-server): Use default print settings.James Thomas
Bug#77113
2025-03-25lisp/gnus/mm-encode.el (mm-default-buffer-type): Obey the mode hierarchyStefan Monnier
2025-03-25* lisp/gnus/mm-encode.el (mm-default-buffer-type): Check `major-mode'.Michael Albinus