From 4b90b6e7ce9be06087e727f7c6305a2a545660fc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 10 Aug 2025 11:45:31 +0300 Subject: ; * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Doc fix (bug#79206). --- lisp/emacs-lisp/cl-generic.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 3aa26fba3c3..7e0f115ebcb 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -230,9 +230,11 @@ SPECIALIZERS-FUNCTION takes as first argument a tag value TAG (defmacro cl-defgeneric (name args &rest options-and-methods) "Create a generic function NAME. DOC-STRING is the base documentation for this class. A generic -function has no body, as its purpose is to decide which method body -is appropriate to use. Specific methods are defined with `cl-defmethod'. -With this implementation the ARGS are currently ignored. +function usually has no body, as its purpose is to decide which +method body is appropriate to use; ARGS are currently ignored if +there's no body. If BODY is present, it provides the default +implementation. +Specific implementation methods are defined with `cl-defmethod'. OPTIONS-AND-METHODS currently understands: - (:documentation DOCSTRING) - (declare DECLARATIONS) -- cgit v1.2.1 From 49d64bfb1a4ca5fc8b3a4d215fb6cabbb9780f9b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 14 Aug 2025 03:03:07 -0400 Subject: ; * etc/NEWS: Update for Emacs 30.2. --- etc/NEWS | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index c52929b6d38..dfe6c5cafe6 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -16,31 +16,8 @@ You can narrow news to a specific version by calling 'view-emacs-news' with a prefix argument or by typing 'C-u C-h C-n'. -* Installation Changes in Emacs 30.2 - - -* Startup Changes in Emacs 30.2 - - * Changes in Emacs 30.2 - - -* Editing Changes in Emacs 30.2 - - -* Changes in Specialized Modes and Packages in Emacs 30.2 - - -* New Modes and Packages in Emacs 30.2 - - -* Incompatible Lisp Changes in Emacs 30.2 - - -* Lisp Changes in Emacs 30.2 - - -* Changes in Emacs 30.2 on Non-Free Operating Systems +Emacs 30.2 is a bug-fix release with no new features. * Installation Changes in Emacs 30.1 -- cgit v1.2.1 From 8ddef0ad4d6a7a53c84000303923b9530ab28b6c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 14 Aug 2025 03:52:16 -0400 Subject: Bump Emacs version * README: * configure.ac: * exec/configure.ac: * java/AndroidManifest.xml.in (Version-code): * nt/README.W32: * msdos/sed2v2.inp: Bump Emacs version to 30.2. --- README | 2 +- configure.ac | 2 +- exec/configure.ac | 2 +- java/AndroidManifest.xml.in | 2 +- msdos/sed2v2.inp | 2 +- nt/README.W32 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README b/README index d0f2d580b4f..9f7008748ac 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ Copyright (C) 2001-2025 Free Software Foundation, Inc. See the end of the file for license conditions. -This directory tree holds version 30.1.90 of GNU Emacs, the extensible, +This directory tree holds version 30.2 of GNU Emacs, the extensible, customizable, self-documenting real-time display editor. The file INSTALL in this directory says how to build and install GNU diff --git a/configure.ac b/configure.ac index e57cf55fe86..aedf5de759f 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ dnl along with GNU Emacs. If not, see . AC_PREREQ([2.65]) dnl Note this is parsed by (at least) make-dist and lisp/cedet/ede/emacs.el. -AC_INIT([GNU Emacs], [30.1.90], [bug-gnu-emacs@gnu.org], [], +AC_INIT([GNU Emacs], [30.2], [bug-gnu-emacs@gnu.org], [], [https://www.gnu.org/software/emacs/]) if test "$XCONFIGURE" = "android"; then diff --git a/exec/configure.ac b/exec/configure.ac index c66c7276d8c..40df33d5cfc 100644 --- a/exec/configure.ac +++ b/exec/configure.ac @@ -22,7 +22,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with GNU Emacs. If not, see . AC_PREREQ([2.65]) -AC_INIT([libexec], [30.1.90], [bug-gnu-emacs@gnu.org], [], +AC_INIT([libexec], [30.2], [bug-gnu-emacs@gnu.org], [], [https://www.gnu.org/software/emacs/]) AH_TOP([/* Copyright (C) 2024-2025 Free Software Foundation, Inc. diff --git a/java/AndroidManifest.xml.in b/java/AndroidManifest.xml.in index 711d34cff30..afc38bbb6b0 100644 --- a/java/AndroidManifest.xml.in +++ b/java/AndroidManifest.xml.in @@ -350,6 +350,6 @@ repositories require an incrementing numeric version code to detect upgrades, which is provided here and is altered by admin/admin.el. Refer to e.g. https://forum.f-droid.org/t/emacs-packaging/30424/25. -Version-code: 300190000 +Version-code: 300200000 --> diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index f9b5af84e25..e487e169f54 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -67,7 +67,7 @@ /^#undef PACKAGE_NAME/s/^.*$/#define PACKAGE_NAME ""/ /^#undef PACKAGE_STRING/s/^.*$/#define PACKAGE_STRING ""/ /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/ -/^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION "30.1.90"/ +/^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION "30.2"/ /^#undef SYSTEM_TYPE/s/^.*$/#define SYSTEM_TYPE "ms-dos"/ /^#undef HAVE_DECL_GETENV/s/^.*$/#define HAVE_DECL_GETENV 1/ /^#undef SYS_SIGLIST_DECLARED/s/^.*$/#define SYS_SIGLIST_DECLARED 1/ diff --git a/nt/README.W32 b/nt/README.W32 index bdd726f038d..4a588d7b4a8 100644 --- a/nt/README.W32 +++ b/nt/README.W32 @@ -1,7 +1,7 @@ Copyright (C) 2001-2025 Free Software Foundation, Inc. See the end of the file for license conditions. - Emacs version 30.1.90 for MS-Windows + Emacs version 30.2 for MS-Windows This README file describes how to set up and run a precompiled distribution of the latest version of GNU Emacs for MS-Windows. You -- cgit v1.2.1 From ebeca61755e61feed530179dd538b4f0f08862bc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 14 Aug 2025 03:54:52 -0400 Subject: * admin/admin.el (set-version): Fix handling of official releases. --- admin/admin.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/admin/admin.el b/admin/admin.el index 0f02ac8d9b1..66c83225aef 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -128,8 +128,13 @@ Root must be the root of an Emacs source tree." (submatch (1+ (in "0-9.")))))) (set-version-in-file root "java/AndroidManifest.xml.in" (apply #'format "%02d%02d%02d000" - (mapcar #'string-to-number - (split-string version "\\."))) + (let ((ver-list + (mapcar #'string-to-number + (split-string version "\\.")))) + ;; Official releases are XX.YY, not XX.YY.ZZ + (if (= 2 (length ver-list)) + (setq ver-list (append ver-list '(0)))) + ver-list)) admin-android-version-code-regexp) (set-version-in-file root "nt/README.W32" version (rx (and "version" (1+ space) -- cgit v1.2.1 From 8960e3af819f67799ef141c7b62d5abcdcdd7efc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 14 Aug 2025 04:05:28 -0400 Subject: Update files for Emacs 30.2 * ChangeLog.5: * etc/AUTHORS: * etc/HISTORY: Update for Emacs 30.2. * admin/admin.el (set-version): Fix handling of official releases. --- ChangeLog.5 | 305 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- etc/AUTHORS | 42 +++++---- etc/HISTORY | 2 + 3 files changed, 330 insertions(+), 19 deletions(-) diff --git a/ChangeLog.5 b/ChangeLog.5 index c74daeb3aed..4f27baa2d22 100644 --- a/ChangeLog.5 +++ b/ChangeLog.5 @@ -1,3 +1,306 @@ +2025-08-14 Eli Zaretskii + + * Version 30.2 released. + +2025-08-14 Eli Zaretskii + + * README: + * configure.ac: + * exec/configure.ac: + * java/AndroidManifest.xml.in (Version-code): + * nt/README.W32: + * msdos/sed2v2.inp: Bump Emacs version to 30.2. + + * ChangeLog.5: + * etc/AUTHORS: + * etc/HISTORY: Update for Emacs 30.2. + + * admin/admin.el (set-version): Fix handling of official releases. + +2025-08-07 Vinícius Moraes (tiny change) + + Handle remote file names in cmuscheme.el + + * lisp/cmuscheme.el (scheme-load-file, scheme-compile-file): Use + 'file-local-name' to handle file names on remote systems. + (Bug#79163) + +2025-08-06 Sean Whitton + + * lisp/vc/vc.el (vc-register): Fix interactive spec (bug#79183). + +2025-07-31 James Thomas + + * doc/misc/gnus.texi (Category Syntax): Update gnus-agent-predicate. + + This updates the Gnus manual due to recent code change (bug#79123). + +2025-07-28 Robert Pluim + + Prefer "tls" to "ssl" in documentation + + * 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-26 Sean Whitton + + loaddefs-generate--rubric: Note about committing ldefs-boot.el + + * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric): + Note that ldefs-boot.el should be committed on its own. + +2025-07-21 Jim Porter + + Fix Eshell call to 'string-suffix-p' when checking for trailing newline + + * lisp/eshell/esh-io.el (eshell--output-maybe-n): Fix call. + + * test/lisp/eshell/esh-io-tests.el + (esh-io-test/output-newline/add-newline) + (esh-io-test/output-newline/no-newline) + (esh-io-test/output-newline/no-extra-newline): New tests (bug#79063). + +2025-07-21 Robert Pluim + + * etc/PROBLEMS: Describe how to work around screen reader TAB issue + +2025-07-21 Sean Whitton + + (gnus)Scoring Tips: New tip regarding header continuation lines + + * doc/misc/gnus.texi (Scoring Tips): New "Continuation lines + when scoring on other headers" tip. + +2025-07-16 Ken Mankoff + + Fix :box attribute of faces in Leuven themes. + + * etc/themes/leuven-dark-theme.el: + * etc/themes/leuven-theme.el: Fix 'lui-highlight-face' face. + (Bug#79029) + +2025-07-09 Andrea Corallo + + Nativecomp don't error with undeclared types (bug#6573) (don't merge) + + Backporting f38e969e472 from trunk to emacs-30 + + * test/src/comp-resources/comp-test-funcs.el (comp-test-76573-1-f): New + function. + * lisp/emacs-lisp/comp-cstr.el (comp-supertypes): Don't error if 'type' + is unknown. + +2025-07-06 Eli Zaretskii + + Fix 'kill-ring-deindent-mode' + + * lisp/indent-aux.el + (kill-ring-deindent-buffer-substring-function): Fix deindenting + for modes which set 'indent-tab-mode' to nil. (Bug#77981) + + (cherry picked from commit 1c7fe501fedb41aaf5b22d82dab5a365f86e4c85) + +2025-07-04 Yuan Fu + + Handle ts_node_type return NULL (bug#78938) + + * src/treesit.c (treesit_traverse_match_predicate): Handle the + case when ts_node_type returns NULL. + (Ftreesit_node_type): Add some comment. + +2025-07-04 Eli Zaretskii + + Improve documentation of 'warning-display-at-bottom' + + * lisp/emacs-lisp/warnings.el (warning-display-at-bottom): + * doc/lispref/display.texi (Warning Options): + * doc/emacs/windows.texi (Temporary Displays): + * etc/NEWS: Improve documentation of 'warning-display-at-bottom'. + See https://lists.gnu.org/archive/html/emacs-devel/2025-07/msg00024.html + for more details. + +2025-07-04 Yuan Fu + + Handle the case when ts_node_type returns NULL (bug#78938) + + * src/treesit.c (Ftreesit_node_type): Handle NULL. + +2025-06-29 Jim Porter + + Populate the ':title' in EWW when defaulting to readable mode + + Do not merge to master. + + * lisp/net/eww.el (eww-display-document): Always render the full + document first to populate ':title' (bug#77299). + +2025-06-28 Liam Hupfer + + bug#78901: [PATCH] js-ts-mode: Fix auto-mode-alist regexp + + Align the js-ts-mode entry with the javascript-mode entries in the + default auto-mode-alist value in lisp/files.el. Otherwise, js-ts-mode is + not associated with .js files. + + * lisp/progmodes/js.el (js-ts-mode): Fix auto-mode-alist regexp. + + Fixes: 2023-01-20 6b2f85caa6ca "Make tree-sitter based modes optional" + +2025-06-25 Eli Zaretskii + + Fix 'insert-directory' in Turkish language-environment + + * lisp/files.el (insert-directory-clean, insert-directory): Use + case-sensitive search for "//DIRED//" and similar strings. + (Bug#78894) + +2025-06-25 Michael Albinus + + Fix job control in remote shell + + * lisp/net/tramp-sh.el (tramp-methods) : + Adapt `tramp-direct-async' argument. (Bug#71050, Bug#71259) + +2025-06-21 Eli Zaretskii + + Workaround for "M-x man" on macOS 15 and later + + * lisp/man.el (Man-init-defvars): Workaround for macOS Sed. Do + not merge to master. (Bug#77944) + +2025-06-11 Sean Whitton + + Insert missing step to make use of directory tracking OSC codes + + * doc/emacs/misc.texi (Interactive Shell): Say to add + comint-osc-process-output to comint-output-filter-function. + +2025-06-11 Robert Pluim + + * lisp/keymap.el (keymap-set): Refer to 'key-description'. (Bug#78714) + +2025-06-11 Yuan Fu + + Support new tree-sitter grammar filename format (bug#78754) + + Previously Emacs only looks for filenames like + libtree-sitter-json.so.0.0. Now Emacs also look for filenames + like libtree-sitter-json.so.15.0. + + * src/treesit.c: + (treesit_load_language_push_for_each_suffix): Add versioned + candidate to candidate list too. + +2025-06-10 Pip Cet + + Fix crash when evaluating "(signal nil 5)" (bug#78738) + + The docstring already warns against calling signal with a nil + error symbol, which is for internal use only, but we can avoid crashing + in this case. + + * src/eval.c (Fsignal): Produce a "peculiar error" for more arguments + involving non-lists. + +2025-06-08 Michael Albinus + + Adapt emba integration (don't merge) + + * test/infra/Dockerfile.emba (emacs-inotify): Don't install clangd. + + * test/infra/gitlab-ci.yml (.job-template): Make actions in + after_script more robust. + +2025-06-03 Xiyue Deng + + Make xoauth2 auth fail when a smtp server replies 334 (Bug#78366) + + * lisp/mail/smtpmail.el (smtpmail-try-auth-method): Throw error 535 + when receiving a "334 server challenge" reply. + + (cherry picked from commit 53371c959462a677a29ee869b3b6627facf3ed79) + +2025-05-31 Eli Zaretskii + + Revert "; * lisp/subr.el (setq-local): Doc fix (bug#78644)." + + This reverts commit cb9556d669c037c4e2f1a9c80adacad55948c706. + Some of its parts were not supposed to be installed. + +2025-05-28 Stephen Berman + + Fix bug in 'todo-jump-to-category' (bug#78608) + + * lisp/calendar/todo-mode.el (todo-jump-to-category): Eliminate + comparison of the number of Todo categories before and after + specifying the category to jump to and replace it by a check of + whether there are any items in the category, since an existing + category should always have at least one item (perhaps done or + archived). + +2025-05-27 Michael Albinus + + Fix gitlab-ci.yml (don't merge to master) + + * test/infra/gitlab-ci.yml (.job-template): Fix config.log name. + (test-filenotify-gio, test-eglot): Fix formatting. + +2025-05-25 Konstantin Kharlamov + + typescript-ts-mode: Improve function body indentation (bug#78121) + + Older code was calculating body indentation depending on function + parameters alignment. This is incorrect, because if parameters are + misaligned, so will the function body. Instead, use offset of the + previous standalone parent. + + * lisp/progmodes/typescript-ts-mode.el: + (typescript-ts-mode--indent-rules): Stop depending on function + parameters indentation for calculating body content and the closing + `}'. + * test/lisp/progmodes/typescript-ts-mode-resources/indent.erts: + (Function body with params misindented (bug#78121)): Add new test. + +2025-05-24 Eli Zaretskii + + Fix documentation of use-package's ':hook' keyword + + * doc/misc/use-package.texi (Hooks): Document how to add several + functions to the same hook (bug#77609). + +2025-05-22 Michael Albinus + + * test/infra/gitlab-ci.yml (.job-template): Make it more robust. + +2025-05-20 Stephen Berman + + Fix todo-mode item insertion bug (bug#78506) + + * lisp/calendar/todo-mode.el (todo-insert-item--next-param): Unset + transient keymap on completing default or copy item insertion + command, to ensure that the next Todo mode key is recognized. + +2025-05-19 Jostein Kjønigsen + + Add support for Pyrefly LSP for Python + + * lisp/progmodes/eglot.el (eglot-server-programs): Add config + for Pyrefly. (Bug#78492) + +2025-05-18 Michael Albinus + + Adapt Tramp version in customize-package-emacs-version-alist + + * lisp/net/trampver.el (customize-package-emacs-version-alist): + Add Tramp version integrated in Emacs 30.1. + 2025-05-17 Eli Zaretskii Fix saving abbrevs by 'abbrev-edit-save-buffer' @@ -1157,7 +1460,7 @@ This file records repository revisions from commit 1cda0967b4d3c815fc610794ad6a8fc2b913a3c5 (exclusive) to -commit 299d3a440121ff6692a85615ff97e6ad4dde91db (inclusive). +commit 49d64bfb1a4ca5fc8b3a4d215fb6cabbb9780f9b (inclusive). See ChangeLog.4 for earlier changes. ;; Local Variables: diff --git a/etc/AUTHORS b/etc/AUTHORS index 9d289f0edf8..ff7c2cc4ee6 100644 --- a/etc/AUTHORS +++ b/etc/AUTHORS @@ -304,7 +304,7 @@ Anders Waldenborg: changed emacsclient.c Andrea Corallo: wrote comp-common.el comp-cstr-tests.el comp-cstr.el comp-run.el comp-tests.el comp.c comp.el syncdoc-type-hierarchy.el and changed pdumper.c lread.c bytecomp.el configure.ac startup.el - loadup.el comp.h lisp.h cl-macs.el cl-preloaded.el comp-test-funcs.el + loadup.el comp.h lisp.h cl-macs.el comp-test-funcs.el cl-preloaded.el subr.el Makefile.in data.c elisp-mode.el nadvice.el alloc.c byte-run.el emacs.c lisp/Makefile.in advice.el and 101 other files @@ -1740,7 +1740,7 @@ and co-wrote help-tests.el and changed xdisp.c display.texi w32.c msdos.c simple.el w32fns.c files.el fileio.c keyboard.c configure.ac emacs.c text.texi w32term.c dispnew.c frames.texi files.texi w32proc.c xfaces.c window.c - dispextern.h lisp.h and 1407 other files + dispextern.h lisp.h and 1409 other files Eliza Velasquez: changed server.el simple.el @@ -2625,7 +2625,7 @@ James TD Smith: changed org.el org-colview.el org-clock.el org.texi James Thomas: changed eww.el nnmail.el quail/indian.el gnus-cache.el - gnus-msg.el ind-util.el info-look.el progmodes/python.el + gnus-msg.el gnus.texi ind-util.el info-look.el progmodes/python.el James Troup: changed gnus-sum.el @@ -3198,8 +3198,8 @@ Joshua Datko: changed fortune.el Joshua Varner: changed intro.texi -Jostein Kjønigsen: changed csharp-mode.el typescript-ts-mode.el js.el - eglot.el progmodes/compile.el README dotnet-appconfig.rnc +Jostein Kjønigsen: changed csharp-mode.el typescript-ts-mode.el eglot.el + js.el progmodes/compile.el README dotnet-appconfig.rnc dotnet-packages-config.rnc dotnet-packages-props.rnc dotnet-resx.rnc json-ts-mode.el msbuild.rnc nuget.rnc nuspec.rnc nxml-mode.el schemas.xml treesit.el @@ -3443,6 +3443,8 @@ and changed pgg-gpg.el pgg.el progmodes/python.el locked-encrypted.png locked-encrypted.xpm pgg-pgp.el pgg-pgp5.el unlocked-encrypted.png unlocked-encrypted.xpm README edebug.el pgg.texi tips.texi +Ken Mankoff: changed leuven-dark-theme.el leuven-theme.el + Kenneth Stailey: changed alpha.h configure.ac ns32000.h openbsd.h pmax.h sparc.h unexalpha.c unexelf.c @@ -3564,11 +3566,11 @@ Koichi Arakawa: changed tramp-sh.el w32proc.c Konrad Hinsen: wrote ol-eshell.el and changed ob-python.el -Konstantin Kharlamov: changed smerge-mode.el diff-mode.el files.el - indent.erts typescript-ts-mode.el ada-mode.el alloc.c autorevert.el - calc-aent.el calc-ext.el calc-lang.el cc-mode.el cperl-mode.el - css-mode.el cua-rect.el dnd.el ebnf-abn.el ebnf-dtd.el ebnf-ebx.el - emacs-module-tests.el epg.el and 33 other files +Konstantin Kharlamov: changed indent.erts smerge-mode.el + typescript-ts-mode.el diff-mode.el files.el ada-mode.el alloc.c + autorevert.el calc-aent.el calc-ext.el calc-lang.el cc-mode.el + cperl-mode.el css-mode.el cua-rect.el dnd.el ebnf-abn.el ebnf-dtd.el + ebnf-ebx.el emacs-module-tests.el epg.el and 33 other files Konstantin Kliakhandler: changed org-agenda.el @@ -3727,6 +3729,8 @@ Lewis Perin: changed emacs-x86.manifest Liam Healy: changed outline.el +Liam Hupfer: changed js.el + Liam Stitt: changed url-file.el url-vars.el Liang Wang: changed etags.el @@ -5058,9 +5062,9 @@ Piotr Zieliński: wrote org-mouse.el Pip Cet: wrote image-circular-tests.el and changed xdisp.c comp.c byte-opt.el fns.c pdumper.c alloc.c - display.texi ftcrfont.c image.c sfnt.c xterm.c DEBUG bytecomp-tests.el - bytecomp.el ccl-tests.el ccl.c ccl.el cl-macs.el cmds.c comint.el - comp-test-funcs.el and 34 other files + display.texi eval.c ftcrfont.c image.c sfnt.c xterm.c DEBUG + bytecomp-tests.el bytecomp.el ccl-tests.el ccl.c ccl.el cl-macs.el + cmds.c comint.el and 34 other files Platon Pronko: changed tramp.el @@ -5538,10 +5542,10 @@ Sean O'Rourke: changed complete.el comint.el dabbrev.el find-func.el Sean Sieger: changed emacs-lisp-intro.texi Sean Whitton: wrote em-elecslash.el em-extpipe-tests.el em-extpipe.el -and changed vc-git.el project.el bindings.el server.el simple.el subr.el - vc-dispatcher.el vc.el window.el eshell-tests.el eshell.texi subr-x.el - .dir-locals.el cl-macs.el eshell-tests-helpers.el files.texi ftfont.c - remember.el startup.el term.el INSTALL and 38 other files +and changed vc-git.el project.el vc.el bindings.el server.el simple.el + subr.el vc-dispatcher.el window.el eshell-tests.el eshell.texi + subr-x.el .dir-locals.el cl-macs.el eshell-tests-helpers.el files.texi + ftfont.c remember.el startup.el term.el INSTALL and 40 other files Sebastian Fieber: changed gnus-art.el mm-decode.el mm-view.el @@ -6430,6 +6434,8 @@ and changed ps-prin1.ps ps-bdf.el ps-prin0.ps blank-mode.el ps-prin3.ps easymenu.el loading.texi menu-bar.el misc.texi progmodes/compile.el ps-print-def.el ps-vars.el +Vinícius Moraes: changed cmuscheme.el + Vitalie Spinu: changed comint.el eieio-base.el message.el ob-R.el ob-core.el ob-tangle.el subr.el @@ -6593,7 +6599,7 @@ Xi Lu: changed etags.c htmlfontify.el ruby-mode.el CTAGS.good_crlf man-tests.el man.el shortdoc.el tramp-sh.el Xiyue Deng: changed emacs-lisp-intro.texi strings.texi functions.texi - symbols.texi + smtpmail.el symbols.texi Xuan Wang: changed warnings.el diff --git a/etc/HISTORY b/etc/HISTORY index bb8155de112..5758d5853d5 100644 --- a/etc/HISTORY +++ b/etc/HISTORY @@ -241,6 +241,8 @@ GNU Emacs 29.4 (2024-06-22) emacs-29.4 GNU Emacs 30.1 (2025-02-23) emacs-30.1 +GNU Emacs 30.2 (2025-08-14) emacs-30.2 + ---------------------------------------------------------------------- This file is part of GNU Emacs. -- cgit v1.2.1 From 1514695b7d10f67279aeaa14e1cc398d8a07cf08 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 14 Aug 2025 04:24:11 -0400 Subject: ; Update lisp/ldefs-boot.el. Do not merge to master. --- lisp/ldefs-boot.el | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 57790632047..6a56cb08a43 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -6,7 +6,8 @@ ;;; Commentary: ;; This file will be copied to ldefs-boot.el and checked in -;; periodically. +;; periodically. Note: When checking in ldefs-boot.el, don't include +;; changes to any other files in the commit. ;;; Code: @@ -7556,8 +7557,9 @@ Also see the `diff-entire-buffers' variable. (autoload 'diff-mode "diff-mode" "\ Major mode for viewing/editing context diffs. -Supports unified and context diffs as well as (to a lesser extent) -normal diffs. +Supports unified and context diffs as well as, to a lesser extent, diffs +in the old \"normal\" format. (Unified diffs have become the standard, +most commonly encountered format.) When the buffer is read-only, the ESC prefix is not necessary. If you edit the buffer manually, `diff-mode' will try to update the hunk @@ -8439,8 +8441,8 @@ switch on the minor mode in all major modes), nil (meaning don't switch on in any major mode), a list of modes (meaning switch on only in those modes and their descendants), or a list (not MODES...), meaning switch on in any major mode except MODES. The value can also -mix all of these forms, see the info node `Defining Minor Modes' for -details. The :predicate key causes the macro to create a user option +mix all of these forms, see the Info node `(elisp)Defining Minor Modes' +for details. The :predicate key causes the macro to create a user option named the same as MODE, but ending with \"-modes\" instead of \"-mode\". That user option can then be used to customize in which modes this globalized minor mode will be switched on. @@ -12903,7 +12905,7 @@ is non-nil, signal an error instead. (fn FUNCTION &optional LISP-ONLY)") (autoload 'find-function "find-func" "\ -Find the definition of the FUNCTION near point. +Find the definition of the Emacs Lisp FUNCTION near point. Finds the source file containing the definition of the function near point (selected by `function-called-at-point') in a buffer and @@ -12912,6 +12914,9 @@ Set mark before moving, if the buffer already existed. See also `find-function-recenter-line' and `find-function-after-hook'. +Use \\[xref-find-definitions] to find definitions of functions and variables +that are not part of Emacs. + (fn FUNCTION)" t) (autoload 'find-function-other-window "find-func" "\ Find, in another window, the definition of FUNCTION near point. @@ -18022,8 +18027,9 @@ Toggle thumbnails in front of marked file names in the Dired buffer. If no file is marked, toggle display of thumbnail on the current file's line. ARG, if non-nil (interactively, the prefix argument), specifies the files whose thumbnail display to toggle instead of the marked files: if ARG is an -integer, use the next ARG (or previous -ARG, if ARG<0) files; any other -value of ARG means toggle thumbnail display of the current line's file. +integer, use the next ARG (or previous -ARG, if ARG<0) files; if ARG is +the symbol `marked', use only the marked files, if any; any other value of +ARG means toggle thumbnail display of the current line's file. (fn &optional ARG)" '(dired-mode)) (autoload 'image-dired-jump-thumbnail-buffer "image-dired-dired" "\ @@ -33816,7 +33822,7 @@ Add archive file name handler to `file-name-handler-alist'." (when (and tramp-ar ;;; Generated autoloads from net/trampver.el -(push (purecopy '(tramp 2 7 3 -1)) package--builtin-versions) +(push (purecopy '(tramp 2 7 3 30 2)) package--builtin-versions) (register-definition-prefixes "trampver" '("tramp-")) -- cgit v1.2.1 From 636f166cfc86aa90d63f592fd99f3fdd9ef95ebd Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 14 Aug 2025 05:04:03 -0400 Subject: ; * make-dist: Include ELisp hierarchy diagram in tarballs (bug#76441). --- make-dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make-dist b/make-dist index ba82b261743..2b287284a3a 100755 --- a/make-dist +++ b/make-dist @@ -369,7 +369,7 @@ possibly_non_vc_files=" ) || exit if [ $with_info = yes ]; then - info_files="info/dir $(echo info/*.info)" || exit + info_files="info/dir $(echo info/*.info info/*.txt info/*.jpg)" || exit else info_files= fi -- cgit v1.2.1 From 34f35407eb2d6d5f977ae671058eb17aa80dd58b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 14 Aug 2025 06:46:32 -0400 Subject: Bump Emacs version to 30.2.50 * README: * configure.ac: * exec/configure.ac: * java/AndroidManifest.xml.in (Version-code): * nt/README.W32: * msdos/sed2v2.inp: Bump Emacs version to 30.2.50. * etc/NEWS: Add headers for Emacs 30.2. --- README | 2 +- configure.ac | 2 +- etc/NEWS | 27 +++++++++++++++++++++++++++ exec/configure.ac | 2 +- java/AndroidManifest.xml.in | 2 +- msdos/sed2v2.inp | 2 +- nt/README.W32 | 2 +- 7 files changed, 33 insertions(+), 6 deletions(-) diff --git a/README b/README index 9f7008748ac..7032fadf713 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ Copyright (C) 2001-2025 Free Software Foundation, Inc. See the end of the file for license conditions. -This directory tree holds version 30.2 of GNU Emacs, the extensible, +This directory tree holds version 30.2.50 of GNU Emacs, the extensible, customizable, self-documenting real-time display editor. The file INSTALL in this directory says how to build and install GNU diff --git a/configure.ac b/configure.ac index aedf5de759f..d91395e9163 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ dnl along with GNU Emacs. If not, see . AC_PREREQ([2.65]) dnl Note this is parsed by (at least) make-dist and lisp/cedet/ede/emacs.el. -AC_INIT([GNU Emacs], [30.2], [bug-gnu-emacs@gnu.org], [], +AC_INIT([GNU Emacs], [30.2.50], [bug-gnu-emacs@gnu.org], [], [https://www.gnu.org/software/emacs/]) if test "$XCONFIGURE" = "android"; then diff --git a/etc/NEWS b/etc/NEWS index dfe6c5cafe6..56f0953cd3e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -16,6 +16,33 @@ You can narrow news to a specific version by calling 'view-emacs-news' with a prefix argument or by typing 'C-u C-h C-n'. +* Installation Changes in Emacs 30.3 + + +* Startup Changes in Emacs 30.3 + + +* Changes in Emacs 30.3 + + +* Editing Changes in Emacs 30.3 + + +* Changes in Specialized Modes and Packages in Emacs 30.3 + + +* New Modes and Packages in Emacs 30.3 + + +* Incompatible Lisp Changes in Emacs 30.3 + + +* Lisp Changes in Emacs 30.3 + + +* Changes in Emacs 30.3 on Non-Free Operating Systems + + * Changes in Emacs 30.2 Emacs 30.2 is a bug-fix release with no new features. diff --git a/exec/configure.ac b/exec/configure.ac index 40df33d5cfc..54875f1868f 100644 --- a/exec/configure.ac +++ b/exec/configure.ac @@ -22,7 +22,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with GNU Emacs. If not, see . AC_PREREQ([2.65]) -AC_INIT([libexec], [30.2], [bug-gnu-emacs@gnu.org], [], +AC_INIT([libexec], [30.2.50], [bug-gnu-emacs@gnu.org], [], [https://www.gnu.org/software/emacs/]) AH_TOP([/* Copyright (C) 2024-2025 Free Software Foundation, Inc. diff --git a/java/AndroidManifest.xml.in b/java/AndroidManifest.xml.in index afc38bbb6b0..dceddcdcff9 100644 --- a/java/AndroidManifest.xml.in +++ b/java/AndroidManifest.xml.in @@ -350,6 +350,6 @@ repositories require an incrementing numeric version code to detect upgrades, which is provided here and is altered by admin/admin.el. Refer to e.g. https://forum.f-droid.org/t/emacs-packaging/30424/25. -Version-code: 300200000 +Version-code: 300250000 --> diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index e487e169f54..0757727c2c0 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -67,7 +67,7 @@ /^#undef PACKAGE_NAME/s/^.*$/#define PACKAGE_NAME ""/ /^#undef PACKAGE_STRING/s/^.*$/#define PACKAGE_STRING ""/ /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/ -/^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION "30.2"/ +/^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION "30.2.50"/ /^#undef SYSTEM_TYPE/s/^.*$/#define SYSTEM_TYPE "ms-dos"/ /^#undef HAVE_DECL_GETENV/s/^.*$/#define HAVE_DECL_GETENV 1/ /^#undef SYS_SIGLIST_DECLARED/s/^.*$/#define SYS_SIGLIST_DECLARED 1/ diff --git a/nt/README.W32 b/nt/README.W32 index 4a588d7b4a8..ede1632dfdd 100644 --- a/nt/README.W32 +++ b/nt/README.W32 @@ -1,7 +1,7 @@ Copyright (C) 2001-2025 Free Software Foundation, Inc. See the end of the file for license conditions. - Emacs version 30.2 for MS-Windows + Emacs version 30.2.50 for MS-Windows This README file describes how to set up and run a precompiled distribution of the latest version of GNU Emacs for MS-Windows. You -- cgit v1.2.1 From c17168ebed9b0ace53235aa34fff4e53ca8543d3 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 14 Aug 2025 15:13:07 +0300 Subject: ; * admin/make-tarball.txt: Fix typo and add details. --- admin/make-tarball.txt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 22e76a0ac2e..61d19e54b8e 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -388,9 +388,9 @@ add the new NEWS file as news/NEWS.xx.y Copy new etc/MACHINES to MACHINES and CONTRIBUTE to CONTRIBUTE For every new release, a banner is displayed on top of the emacs.html -page. Uncomment and the release banner in emacs.html. Keep it on the -page for about a month, then comment it again. The new release banner -looks like this: +page. Uncomment the release banner in emacs.html. Keep it on the page +for about a month, then comment it again. The new release banner looks +like this:
@@ -398,6 +398,16 @@ looks like this:
+Add the information about the new release in the "Releases" section of +emacs.html, which begins like this: + +
+
+ + + +

+ Also, make sure the copyright years at the bottom of emacs.html are up-to-date. -- cgit v1.2.1 From f8a206937c9f548bd810153bf29f4f4a32d84c95 Mon Sep 17 00:00:00 2001 From: Zhengyi Fu Date: Thu, 14 Aug 2025 17:08:36 +0200 Subject: executable-interpret: Handle remote file names * lisp/progmodes/executable.el (executable-interpret): Use `file-local-name' to get the local file name component from `buffer-file-name'. (Bug#79233) Copyright-paperwork-exempt: yes --- lisp/progmodes/executable.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index b003b75b0e4..aa3a74d30fa 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el @@ -180,7 +180,7 @@ command to find the next error. The buffer is also in `comint-mode' and `compilation-shell-minor-mode', so that you can answer any prompts." (interactive (list (read-string "Run script: " (or executable-command - buffer-file-name)))) + (file-local-name buffer-file-name))))) (require 'compile) (save-some-buffers (not compilation-ask-about-save)) (setq-local executable-command command) -- cgit v1.2.1 From 4a3b6daf76c385fc58759d57aeb4d34e8acc31e5 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 16 Aug 2025 12:26:19 +0200 Subject: Sync with Tramp 2.7.4-pre * doc/misc/trampver.texi: * lisp/net/trampver.el (tramp-version): Adapt Tramp versions. * lisp/net/tramp-cmds.el (tramp-cleanup-connection): Use read syntax #' for `tramp-timeout-session', * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection): Set "connected" property in time. * lisp/net/tramp-sh.el (tramp-timeout-session): Add ;;;###tramp-autoload cookie. * lisp/net/tramp.el (tramp-barf-if-file-missing): Do not raise an error when not connected. (Bug#78572) (tramp-file-name-handler): Do not force the backtrace. (tramp-connectable-p): Check also, whether initial handshake is finished. (tramp-skeleton-directory-files) (tramp-skeleton-directory-files-and-attributes) (tramp-skeleton-set-file-modes-times-uid-gid): Rearrange sending `file-missing' error. (tramp-handle-access-file, tramp-handle-unlock-file): Use `tramp-connectable-p'. (tramp-skeleton-file-name-all-completions): Filter out "" hits. (Bug#79173) * test/lisp/net/tramp-tests.el (project-mode-line-format) (project-mode-line): Declare. (tramp-test48-session-timeout): New test. (tramp-test49-auto-load, tramp-test49-delay-load) (tramp-test49-recursive-load, tramp-test49-remote-load-path) (tramp-test50-without-remote-files, tramp-test51-unload): Rename. --- doc/misc/trampver.texi | 2 +- lisp/net/tramp-cmds.el | 2 +- lisp/net/tramp-gvfs.el | 8 +- lisp/net/tramp-rclone.el | 8 +- lisp/net/tramp-sh.el | 2 + lisp/net/tramp.el | 187 +++++++++++++++++++++---------------------- lisp/net/trampver.el | 6 +- test/lisp/net/tramp-tests.el | 59 ++++++++++++-- 8 files changed, 159 insertions(+), 115 deletions(-) diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index aa76672ea59..8fe3b9bb0a8 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi @@ -7,7 +7,7 @@ @c In the Tramp GIT, the version number and the bug report address @c are auto-frobbed from configure.ac. -@set trampver 2.7.3.30.2 +@set trampver 2.7.4-pre @set trampurl https://www.gnu.org/software/tramp/ @set tramp-bug-report-address tramp-devel@@gnu.org @set emacsver 27.1 diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index f03fa5cf404..18f5d12277e 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el @@ -122,7 +122,7 @@ When called interactively, a Tramp connection has to be selected." ;; Cancel timer. (dolist (timer timer-list) - (when (and (eq (timer--function timer) 'tramp-timeout-session) + (when (and (eq (timer--function timer) #'tramp-timeout-session) (tramp-file-name-equal-p vec (car (timer--args timer)))) (cancel-timer timer))) diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 9530aa3733a..efbf9935573 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -2345,11 +2345,11 @@ connection if a previous connection has died for some reason." ;; Save the password. (ignore-errors (and (functionp tramp-password-save-function) - (funcall tramp-password-save-function))) + (funcall tramp-password-save-function)))))) - ;; Mark it as connected. - (tramp-set-connection-property - (tramp-get-connection-process vec) "connected" t)))))) + ;; Mark it as connected. + (tramp-set-connection-property + (tramp-get-connection-process vec) "connected" t))) (defun tramp-gvfs-gio-tool-p (vec) "Check, whether the gio tool is available." diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el index 07dd80deb9a..17ae36f94e8 100644 --- a/lisp/net/tramp-rclone.el +++ b/lisp/net/tramp-rclone.el @@ -411,11 +411,11 @@ connection if a previous connection has died for some reason." (tramp-get-method-parameter vec 'tramp-mount-args)) (while (not (file-exists-p (tramp-make-tramp-file-name vec 'noloc))) (tramp-cleanup-connection vec 'keep-debug 'keep-password)) + (add-to-list 'tramp-fuse-mount-points (tramp-file-name-unify vec))) - ;; Mark it as connected. - (add-to-list 'tramp-fuse-mount-points (tramp-file-name-unify vec)) - (tramp-set-connection-property - (tramp-get-connection-process vec) "connected" t)))) + ;; Mark it as connected. + (tramp-set-connection-property + (tramp-get-connection-process vec) "connected" t))) ;; In `tramp-check-cached-permissions', the connection properties ;; "{uid,gid}-{integer,string}" are used. We set them to proper values. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index cae6d52f14c..287b46fc72e 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -5128,6 +5128,7 @@ Goes through the list `tramp-inline-compress-commands'." (t "-3"))) +;;;###tramp-autoload (defun tramp-timeout-session (vec) "Close the connection VEC after a session timeout. If there is just some editing, retry it after 5 seconds." @@ -5147,6 +5148,7 @@ If there is just some editing, retry it after 5 seconds." Does not do anything if a connection is already open, but re-opens the connection if a previous connection has died for some reason." ;; During completion, don't reopen a new connection. + ;; Same for slide-in timer or process-{filter,sentinel}. (unless (tramp-connectable-p vec) (throw 'non-essential 'non-essential)) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index e0e080021c7..c72ccc1738f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2098,10 +2098,11 @@ does not exist, otherwise propagate the error." (declare (indent 2) (debug (symbolp form body))) (let ((err (make-symbol "err"))) `(condition-case ,err - (progn ,@body) + (let (signal-hook-function) ,@body) (error (if (not (or (file-exists-p ,filename) (file-symlink-p ,filename))) - (tramp-error ,vec 'file-missing ,filename) + (when (tramp-connectable-p ,vec) + (tramp-error ,vec 'file-missing ,filename)) (signal (car ,err) (cdr ,err))))))) ;; This function provides traces in case of errors not triggered by @@ -2542,7 +2543,7 @@ Fall back to normal file name handler if no Tramp file name handler exists." (tramp-message v 5 "Non-essential received in operation %s" (cons operation args)) - (let ((tramp-verbose 10)) (tramp-backtrace v)) + (tramp-backtrace v) (tramp-run-real-handler operation args)) ((eq result 'suppress) (let ((inhibit-message t)) @@ -2759,13 +2760,15 @@ They are completed by `M-x TAB' only if the current buffer is remote." "Check if it is possible to connect the remote host without side-effects. This is true, if either the remote host is already connected, or if we are not in completion mode." - (let ((tramp-verbose 0) - (vec (tramp-ensure-dissected-file-name vec-or-filename))) - (or ;; We check this for the process related to - ;; `tramp-buffer-name'; otherwise `make-process' wouldn't run - ;; ever when `non-essential' is non-nil. - (process-live-p (tramp-get-process vec)) - (not non-essential)))) + (or (not non-essential) + ;; We check this for the process related to `tramp-buffer-name'; + ;; otherwise `make-process' wouldn't run ever when + ;; `non-essential' is non-nil. + (and-let* ((tramp-verbose 0) + (vec (tramp-ensure-dissected-file-name vec-or-filename)) + (p (tramp-get-process vec)) + ((process-live-p p)) + ((tramp-get-connection-property p "connected")))))) (defun tramp-completion-handle-expand-file-name (filename &optional directory) "Like `expand-file-name' for partial Tramp files." @@ -2863,7 +2866,7 @@ not in completion mode." BODY is the backend specific code." (declare (indent 2) (debug t)) `(ignore-error file-missing - (delete-dups (delq nil + (delete-dups (delq nil (delete "" (let* ((case-fold-search read-file-name-completion-ignore-case) (result (progn ,@body))) ;; Some storage systems do not return "." and "..". @@ -2880,7 +2883,7 @@ BODY is the backend specific code." (dolist (elt completion-regexp-list x) (unless (string-match-p elt x) (throw 'match nil)))))) result) - result)))))) + result))))))) (defvar tramp--last-hop-directory nil "Tracks the directory from which to run login programs.") @@ -3434,79 +3437,69 @@ BODY is the backend specific code." "Skeleton for `tramp-*-handle-directory-files'. BODY is the backend specific code." (declare (indent 5) (debug t)) - `(or - (with-parsed-tramp-file-name (expand-file-name ,directory) nil - (tramp-barf-if-file-missing v ,directory - (when (file-directory-p ,directory) - (setf ,directory - (file-name-as-directory (expand-file-name ,directory))) - (let ((temp - (with-tramp-file-property v localname "directory-files" ,@body)) - result item) - (while temp - (setq item (directory-file-name (pop temp))) - (when (or (null ,match) (string-match-p ,match item)) - (push (if ,full (concat ,directory item) item) - result))) - (unless ,nosort - (setq result (sort result #'string<))) - (when (and (natnump ,count) (> ,count 0)) - (setq result (tramp-compat-ntake ,count result))) - result)))) - - ;; Error handling. - (if (not (file-exists-p ,directory)) - (tramp-error - (tramp-dissect-file-name ,directory) 'file-missing ,directory) - nil))) + `(with-parsed-tramp-file-name (expand-file-name ,directory) nil + (tramp-barf-if-file-missing v ,directory + (if (not (file-directory-p ,directory)) + ;; Trigger the `file-missing' error. + (signal 'error nil) + (setf ,directory + (file-name-as-directory (expand-file-name ,directory))) + (let ((temp + (with-tramp-file-property v localname "directory-files" ,@body)) + result item) + (while temp + (setq item (directory-file-name (pop temp))) + (when (or (null ,match) (string-match-p ,match item)) + (push (if ,full (concat ,directory item) item) + result))) + (unless ,nosort + (setq result (sort result #'string<))) + (when (and (natnump ,count) (> ,count 0)) + (setq result (tramp-compat-ntake ,count result))) + result))))) (defmacro tramp-skeleton-directory-files-and-attributes (directory &optional full match nosort id-format count &rest body) "Skeleton for `tramp-*-handle-directory-files-and-attributes'. BODY is the backend specific code." (declare (indent 6) (debug t)) - `(or - (with-parsed-tramp-file-name (expand-file-name ,directory) nil - (tramp-barf-if-file-missing v ,directory - (when (file-directory-p ,directory) - (let ((temp - (copy-tree - (mapcar - (lambda (x) - (cons - (car x) - (tramp-convert-file-attributes - v (expand-file-name (car x) localname) - ,id-format (cdr x)))) - (with-tramp-file-property - v localname "directory-files-and-attributes" - ,@body)))) - result item) - - (while temp - (setq item (pop temp)) - (when (or (null ,match) (string-match-p ,match (car item))) - (when ,full - (setcar item (expand-file-name (car item) ,directory))) - (push item result))) - - (unless ,nosort - (setq result - (sort result (lambda (x y) (string< (car x) (car y)))))) - - (when (and (natnump ,count) (> ,count 0)) - (setq result (tramp-compat-ntake ,count result))) - - (or result - ;; The scripts could fail, for example with huge file size. - (tramp-handle-directory-files-and-attributes - ,directory ,full ,match ,nosort ,id-format ,count)))))) - - ;; Error handling. - (if (not (file-exists-p ,directory)) - (tramp-error - (tramp-dissect-file-name ,directory) 'file-missing ,directory) - nil))) + `(with-parsed-tramp-file-name (expand-file-name ,directory) nil + (tramp-barf-if-file-missing v ,directory + (if (not (file-directory-p ,directory)) + ;; Trigger the `file-missing' error. + (signal 'error nil) + (let ((temp + (copy-tree + (mapcar + (lambda (x) + (cons + (car x) + (tramp-convert-file-attributes + v (expand-file-name (car x) localname) + ,id-format (cdr x)))) + (with-tramp-file-property + v localname "directory-files-and-attributes" + ,@body)))) + result item) + + (while temp + (setq item (pop temp)) + (when (or (null ,match) (string-match-p ,match (car item))) + (when ,full + (setcar item (expand-file-name (car item) ,directory))) + (push item result))) + + (unless ,nosort + (setq result + (sort result (lambda (x y) (string< (car x) (car y)))))) + + (when (and (natnump ,count) (> ,count 0)) + (setq result (tramp-compat-ntake ,count result))) + + (or result + ;; The scripts could fail, for example with huge file size. + (tramp-handle-directory-files-and-attributes + ,directory ,full ,match ,nosort ,id-format ,count))))))) (defcustom tramp-use-file-attributes t "Whether to use \"file-attributes\" connection property for check. @@ -3810,20 +3803,23 @@ BODY is the backend specific code." BODY is the backend specific code." (declare (indent 1) (debug t)) `(with-parsed-tramp-file-name (expand-file-name ,filename) nil - (when (not (file-exists-p ,filename)) - (tramp-error v 'file-missing ,filename)) - (with-tramp-saved-file-properties - v localname - ;; We cannot add "file-attributes", "file-executable-p", - ;; "file-ownership-preserved-p", "file-readable-p", - ;; "file-writable-p". - '("file-directory-p" "file-exists-p" "file-symlink-p" "file-truename") - (tramp-flush-file-properties v localname)) - (condition-case err - (progn ,@body) - (error (if tramp-inhibit-errors-if-setting-file-attributes-fail - (display-warning 'tramp (error-message-string err)) - (signal (car err) (cdr err))))))) + (tramp-barf-if-file-missing v ,filename + (if (not (file-exists-p ,filename)) + ;; Trigger the `file-missing' error. + (signal 'error nil) + (with-tramp-saved-file-properties + v localname + ;; We cannot add "file-attributes", "file-executable-p", + ;; "file-ownership-preserved-p", "file-readable-p", + ;; "file-writable-p". + '("file-directory-p" "file-exists-p" + "file-symlink-p" "file-truename") + (tramp-flush-file-properties v localname)) + (condition-case err + (progn ,@body) + (error (if tramp-inhibit-errors-if-setting-file-attributes-fail + (display-warning 'tramp (error-message-string err)) + (signal (car err) (cdr err))))))))) (defmacro tramp-skeleton-write-region (start end filename append visit lockname mustbenew &rest body) @@ -4013,9 +4009,7 @@ Let-bind it when necessary.") (tramp-dont-suspend-timers t)) (with-tramp-timeout (timeout - (unless (and-let* ((p (tramp-get-connection-process v)) - ((process-live-p p)) - ((tramp-get-connection-property p "connected")))) + (unless (and (not non-essential) (tramp-connectable-p v)) (tramp-cleanup-connection v 'keep-debug 'keep-password)) (tramp-error v 'file-error @@ -4901,6 +4895,7 @@ Do not set it manually, it is used buffer-local in `tramp-get-lock-pid'.") ;; functions like `kill-buffer' would try to reestablish the ;; connection. See Bug#61663. (if-let* ((v (tramp-dissect-file-name file)) + ((tramp-connectable-p v)) ((process-live-p (tramp-get-process v))) (lockname (tramp-compat-make-lock-file-name file))) (delete-file lockname) diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 2b2fdf94a49..af6d52c4ae6 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -7,7 +7,7 @@ ;; Maintainer: Michael Albinus ;; Keywords: comm, processes ;; Package: tramp -;; Version: 2.7.3.30.2 +;; Version: 2.7.4-pre ;; Package-Requires: ((emacs "27.1")) ;; Package-Type: multi ;; URL: https://www.gnu.org/software/tramp/ @@ -40,7 +40,7 @@ ;; ./configure" to change them. ;;;###tramp-autoload -(defconst tramp-version "2.7.3.30.2" +(defconst tramp-version "2.7.4-pre" "This version of Tramp.") ;;;###tramp-autoload @@ -76,7 +76,7 @@ ;; Check for Emacs version. (let ((x (if (not (string-version-lessp emacs-version "27.1")) "ok" - (format "Tramp 2.7.3.30.2 is not fit for %s" + (format "Tramp 2.7.4-pre is not fit for %s" (replace-regexp-in-string "\n" "" (emacs-version)))))) (unless (string-equal "ok" x) (error "%s" x))) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 4fe3fca0df8..3013a63e041 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -54,6 +54,7 @@ (require 'vc-git) (require 'vc-hg) +(declare-function project-mode-line-format "project") (declare-function tramp-check-remote-uname "tramp-sh") (declare-function tramp-find-executable "tramp-sh") (declare-function tramp-get-remote-chmod-h "tramp-sh") @@ -82,6 +83,7 @@ (defvar dired-copy-dereference) ;; Declared in Emacs 30. +(defvar project-mode-line) (defvar remote-file-name-access-timeout) (defvar remote-file-name-inhibit-delete-by-moving-to-trash) @@ -8349,8 +8351,53 @@ process sentinels. They shall not disturb each other." tramp-use-fingerprint) (should (file-exists-p ert-remote-temporary-file-directory))))) +;; This test is inspired by Bug#78572. +(ert-deftest tramp-test48-session-timeout () + "Check that Tramp handles a session timeout properly." + (skip-unless (tramp--test-enabled)) + (skip-unless + (tramp-get-method-parameter tramp-test-vec 'tramp-session-timeout)) + + ;; We want to see the timeout message. + (tramp--test-instrument-test-case 3 + (let ((remote-file-name-inhibit-cache t) + (tmp-name (tramp--test-make-temp-name))) + (unwind-protect + (progn + (should-not (file-exists-p tmp-name)) + (write-region "foo" nil tmp-name) + (should (file-exists-p tmp-name)) + + (tramp-timeout-session tramp-test-vec) + (should (file-exists-p tmp-name)) + (should (directory-files (file-name-directory tmp-name))) + + ;; `project-mode-line' was introduced in Emacs 30.1. + (when (boundp 'project-mode-line) + (require 'project) + (ert-with-message-capture captured-messages + (let ((project-mode-line t)) + (with-temp-buffer + (set-visited-file-name tmp-name) + (insert "foo") + (should (buffer-modified-p)) + (tramp-timeout-session tramp-test-vec) + ;; This calls `file-directory-p' and + ;; `directory-files'. Shouldn't raise an error when + ;; not connected. + (project-mode-line-format) + ;; Steal the file lock. + (cl-letf (((symbol-function #'ask-user-about-lock) + #'tramp-compat-always)) + (save-buffer))) + (should-not + (string-match-p "File is missing:" captured-messages)))))) + + ;; Cleanup. + (ignore-errors (delete-file tmp-name)))))) + ;; This test is inspired by Bug#29163. -(ert-deftest tramp-test48-auto-load () +(ert-deftest tramp-test49-auto-load () "Check that Tramp autoloads properly." ;; If we use another syntax but `default', Tramp is already loaded ;; due to the `tramp-change-syntax' call. @@ -8375,7 +8422,7 @@ process sentinels. They shall not disturb each other." (mapconcat #'shell-quote-argument load-path " -L ") (shell-quote-argument code))))))) -(ert-deftest tramp-test48-delay-load () +(ert-deftest tramp-test49-delay-load () "Check that Tramp is loaded lazily, only when needed." ;; Tramp is neither loaded at Emacs startup, nor when completing a ;; non-Tramp file name like "/foo". Completing a Tramp-alike file @@ -8405,7 +8452,7 @@ process sentinels. They shall not disturb each other." (mapconcat #'shell-quote-argument load-path " -L ") (shell-quote-argument (format code tm))))))))) -(ert-deftest tramp-test48-recursive-load () +(ert-deftest tramp-test49-recursive-load () "Check that Tramp does not fail due to recursive load." (skip-unless (tramp--test-enabled)) @@ -8429,7 +8476,7 @@ process sentinels. They shall not disturb each other." (mapconcat #'shell-quote-argument load-path " -L ") (shell-quote-argument code)))))))) -(ert-deftest tramp-test48-remote-load-path () +(ert-deftest tramp-test49-remote-load-path () "Check that Tramp autoloads its packages with remote `load-path'." ;; `tramp-cleanup-all-connections' is autoloaded from tramp-cmds.el. ;; It shall still work, when a remote file name is in the @@ -8454,7 +8501,7 @@ process sentinels. They shall not disturb each other." (mapconcat #'shell-quote-argument load-path " -L ") (shell-quote-argument code))))))) -(ert-deftest tramp-test49-without-remote-files () +(ert-deftest tramp-test50-without-remote-files () "Check that Tramp can be suppressed." (skip-unless (tramp--test-enabled)) @@ -8469,7 +8516,7 @@ process sentinels. They shall not disturb each other." (setq tramp-mode t) (should (file-remote-p ert-remote-temporary-file-directory))) -(ert-deftest tramp-test50-unload () +(ert-deftest tramp-test51-unload () "Check that Tramp and its subpackages unload completely. Since it unloads Tramp, it shall be the last test to run." :tags '(:expensive-test) -- cgit v1.2.1 From 6a018a2d7e4fd53e5c2340e8ba159667e4244cec Mon Sep 17 00:00:00 2001 From: Toru TSUNEYOSHI Date: Sat, 16 Aug 2025 12:56:09 +0200 Subject: Improve use of "touch" in Tramp * lisp/net/tramp-sh.el (tramp-get-remote-touch): Set connection property "touch-h". (tramp-sh-handle-set-file-times): Use it. --- lisp/net/tramp-sh.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 287b46fc72e..80ae71dfc64 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1601,7 +1601,10 @@ of." "-t %s" (format-time-string "%Y%m%d%H%M.%S" (tramp-defined-time time) t)) "") - (if (eq flag 'nofollow) "-h" "") + (if (and (eq flag 'nofollow) + (tramp-get-connection-property v "touch-h")) + "-h" + "") (tramp-shell-quote-argument localname)))))) (defun tramp-sh-handle-get-home-directory (vec &optional user) @@ -5892,6 +5895,14 @@ Nonexistent directories are removed from spec." result (format-time-string "%Y%m%d%H%M.%S") (tramp-file-local-name tmpfile)))) + (tramp-set-connection-property + vec "touch-h" + (tramp-send-command-and-check + vec + (format + "%s -h %s" + result + (tramp-file-local-name tmpfile)))) (delete-file tmpfile)) result))) -- cgit v1.2.1 From 964741d40e00334ec7b8dbe85c15c3f5af2296e7 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 16 Aug 2025 12:59:06 +0200 Subject: * lisp/net/tramp-sh.el (tramp-get-remote-touch): Simplify. --- lisp/net/tramp-sh.el | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 80ae71dfc64..f7dfedbd88d 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -5880,12 +5880,12 @@ Nonexistent directories are removed from spec." "Determine remote `touch' command." (with-tramp-connection-property vec "touch" (tramp-message vec 5 "Finding a suitable `touch' command") - (let ((result (tramp-find-executable - vec "touch" (tramp-get-remote-path vec))) - (tmpfile (tramp-make-tramp-temp-name vec))) - ;; Busyboxes do support the "-t" option only when they have been - ;; built with the DESKTOP config option. Let's check it. - (when result + (when-let* ((result (tramp-find-executable + vec "touch" (tramp-get-remote-path vec))) + (tmpfile (tramp-make-tramp-temp-name vec))) + (prog1 result + ;; Busyboxes do support the "-t" option only when they have + ;; been built with the DESKTOP config option. Let's check it. (tramp-set-connection-property vec "touch-t" (tramp-send-command-and-check @@ -5895,16 +5895,13 @@ Nonexistent directories are removed from spec." result (format-time-string "%Y%m%d%H%M.%S") (tramp-file-local-name tmpfile)))) + ;; The touch command included in busybox (version 1.30.1-6) on + ;; OpenWrt does not have the option "-h". (tramp-set-connection-property vec "touch-h" (tramp-send-command-and-check - vec - (format - "%s -h %s" - result - (tramp-file-local-name tmpfile)))) - (delete-file tmpfile)) - result))) + vec (format "%s -h %s" result (tramp-file-local-name tmpfile)))) + (delete-file tmpfile))))) (defun tramp-get-remote-df (vec) "Determine remote `df' command." -- cgit v1.2.1