From adff72dd1d2064101f49d7c87582fc434bbc15c3 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 6 Aug 2023 09:33:44 +0300 Subject: [PATCH 01/13] Fix reverting Rmail buffers This bug happened because rmail.el relied on 'revert-buffer' to return non-nil when it succeeds to revert, but a recent change in 'revert-buffer' broke that promise in Emacs 29.1. * lisp/files.el (revert-buffer--default, revert-buffer): Doc fix. (revert-buffer): Return whatever 'revert-buffer-function' returns. (Bug#65071) --- lisp/files.el | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index d325729bf4d..29d109ab385 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6668,7 +6668,10 @@ This function binds `revert-buffer-in-progress-p' non-nil while it operates. This function calls the function that `revert-buffer-function' specifies to do the work, with arguments IGNORE-AUTO and NOCONFIRM. The default function runs the hooks `before-revert-hook' and -`after-revert-hook' +`after-revert-hook'. +Return value is whatever `revert-buffer-function' returns. For historical +reasons, that return value is non-nil when `revert-buffer-function' +succeeds in its job and returns non-nil. Reverting a buffer will try to preserve markers in the buffer, but it cannot always preserve all of them. For better results, @@ -6685,17 +6688,20 @@ preserve markers and overlays, at the price of being slower." (revert-buffer-preserve-modes preserve-modes) (state (and (boundp 'read-only-mode--state) (list read-only-mode--state)))) - (funcall (or revert-buffer-function #'revert-buffer--default) - ignore-auto noconfirm) - (when state - (setq buffer-read-only (car state)) - (setq-local read-only-mode--state (car state))))) + ;; Return whatever 'revert-buffer-function' returns. + (prog1 (funcall (or revert-buffer-function #'revert-buffer--default) + ignore-auto noconfirm) + (when state + (setq buffer-read-only (car state)) + (setq-local read-only-mode--state (car state)))))) (defun revert-buffer--default (ignore-auto noconfirm) "Default function for `revert-buffer'. The arguments IGNORE-AUTO and NOCONFIRM are as described for `revert-buffer'. Runs the hooks `before-revert-hook' and `after-revert-hook' at the start and end. +The function returns non-nil if it reverts the buffer; signals +an error if the buffer is not associated with a file. Calls `revert-buffer-insert-file-contents-function' to reread the contents of the visited file, with two arguments: the first is the file From a95e7006989b4bcce2196e73b342d6d30a7cd515 Mon Sep 17 00:00:00 2001 From: Arash Esbati Date: Sat, 5 Aug 2023 17:39:32 +0200 Subject: [PATCH 02/13] ; Filter packages available for upgrade via menu bar * lisp/emacs-lisp/package.el (package-menu-mode-menu): Add entry to filter packages available for upgrade via menu bar. (bug#65094) --- lisp/emacs-lisp/package.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 58ca19f7fe2..83c7380553d 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -3090,6 +3090,8 @@ either a full name or nil, and EMAIL is a valid email address." ["Filter by Name or Description" package-menu-filter-by-name-or-description :help "Filter packages by name or description"] ["Filter by Status" package-menu-filter-by-status :help "Filter packages by status"] + ["Filter by Upgrades available" package-menu-filter-upgradable + :help "Filter packages by available upgrades"] ["Filter by Version" package-menu-filter-by-version :help "Filter packages by version"] ["Filter Marked" package-menu-filter-marked :help "Filter packages marked for upgrade"] ["Clear Filter" package-menu-clear-filter :help "Clear package list filter"]) From 16205e8db65446845967f7ad95f3bbe417b67cbd Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 6 Aug 2023 10:02:11 +0300 Subject: [PATCH 03/13] ; Improve help-echo in package.el * lisp/emacs-lisp/package.el (package-menu-mode-menu): Improve help-echo descriptions. (Bug#65094) --- lisp/emacs-lisp/package.el | 40 ++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 83c7380553d..5fe018700a4 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -3083,20 +3083,36 @@ either a full name or nil, and EMAIL is a valid email address." "--" ("Filter Packages" - ["Filter by Archive" package-menu-filter-by-archive :help "Filter packages by archive"] - ["Filter by Description" package-menu-filter-by-description :help "Filter packages by description"] - ["Filter by Keyword" package-menu-filter-by-keyword :help "Filter packages by keyword"] - ["Filter by Name" package-menu-filter-by-name :help "Filter packages by name"] + ["Filter by Archive" package-menu-filter-by-archive + :help + "Prompt for archive(s), display only packages from those archives"] + ["Filter by Description" package-menu-filter-by-description + :help + "Prompt for regexp, display only packages with matching description"] + ["Filter by Keyword" package-menu-filter-by-keyword + :help + "Prompt for keyword(s), display only packages with matching keywords"] + ["Filter by Name" package-menu-filter-by-name + :help + "Prompt for regexp, display only packages whose names match the regexp"] ["Filter by Name or Description" package-menu-filter-by-name-or-description - :help "Filter packages by name or description"] - ["Filter by Status" package-menu-filter-by-status :help "Filter packages by status"] + :help + "Prompt for regexp, display only packages whose name or description matches"] + ["Filter by Status" package-menu-filter-by-status + :help + "Prompt for status(es), display only packages with those statuses"] ["Filter by Upgrades available" package-menu-filter-upgradable - :help "Filter packages by available upgrades"] - ["Filter by Version" package-menu-filter-by-version :help "Filter packages by version"] - ["Filter Marked" package-menu-filter-marked :help "Filter packages marked for upgrade"] - ["Clear Filter" package-menu-clear-filter :help "Clear package list filter"]) + :help "Display only installed packages for which upgrades are available"] + ["Filter by Version" package-menu-filter-by-version + :help + "Prompt for version and comparison operator, display only packages of matching versions"] + ["Filter Marked" package-menu-filter-marked + :help "Display only packages marked for installation or deletion"] + ["Clear Filter" package-menu-clear-filter + :help "Clear package list filtering, display the entire list again"]) - ["Hide by Regexp" package-menu-hide-package :help "Hide all packages matching a regexp"] + ["Hide by Regexp" package-menu-hide-package + :help "Toggle visibility of obsolete and unwanted packages"] ["Display Older Versions" package-menu-toggle-hiding :style toggle :selected (not package-menu--hide-packages) :help "Display package even if a newer version is already installed"] @@ -4294,7 +4310,7 @@ STATUS can be a single status, a string, or a list of strings. If STATUS is nil or the empty string, show all packages. When called interactively, prompt for STATUS. To specify -several possible status values, type them seperated by commas." +several possible status values, type them separated by commas." (interactive (list (completing-read "Filter by status: " '("avail-obso" "available" From 7c7966862bc0126e0f5b8c6d760cc3293d9a87f6 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 6 Aug 2023 14:30:57 +0200 Subject: [PATCH 04/13] * test/lisp/net/tramp-tests.el (tramp-test10-write-region): Extend test. --- test/lisp/net/tramp-tests.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 00e368abe4d..f4938cf9a01 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -2676,7 +2676,18 @@ This checks also `file-name-as-directory', `file-name-directory', :type 'file-already-exists) (should-error (write-region "foo" nil tmp-name nil nil nil 'excl) - :type 'file-already-exists)) + :type 'file-already-exists) + (delete-file tmp-name) + + ;; Check `buffer-file-coding-system'. Bug#65022. + (with-temp-buffer + (setq buffer-file-name tmp-name) + (insert "foo") + (set-buffer-file-coding-system 'cp1251) + (let ((bfcs buffer-file-coding-system)) + (should (buffer-modified-p)) + (should (null (save-buffer))) + (should (eq buffer-file-coding-system bfcs))))) ;; Cleanup. (ignore-errors (delete-file tmp-name)))))) From de1effd73b4dfa8891e35905d20803b9e76c4a13 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 6 Aug 2023 15:46:58 +0200 Subject: [PATCH 05/13] ; Fix last change --- test/lisp/net/tramp-tests.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index f4938cf9a01..31d36f81740 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -2687,7 +2687,9 @@ This checks also `file-name-as-directory', `file-name-directory', (let ((bfcs buffer-file-coding-system)) (should (buffer-modified-p)) (should (null (save-buffer))) - (should (eq buffer-file-coding-system bfcs))))) + (should + (eq (coding-system-get buffer-file-coding-system :mime-charset) + (coding-system-get bfcs :mime-charset)))))) ;; Cleanup. (ignore-errors (delete-file tmp-name)))))) From 495bee253fc354042c1decc37805832a73f935d8 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 6 Aug 2023 16:24:19 +0200 Subject: [PATCH 06/13] * test/lisp/net/tramp-tests.el (tramp-test42-utf8): Skip for macOS. --- test/lisp/net/tramp-tests.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 31d36f81740..c090fec8b2a 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -2689,7 +2689,7 @@ This checks also `file-name-as-directory', `file-name-directory', (should (null (save-buffer))) (should (eq (coding-system-get buffer-file-coding-system :mime-charset) - (coding-system-get bfcs :mime-charset)))))) + (coding-system-get bfcs :mime-charset)))))) ;; Cleanup. (ignore-errors (delete-file tmp-name)))))) @@ -7478,14 +7478,12 @@ This requires restrictions of file name syntax." (skip-unless (not (tramp--test-gdrive-p))) (skip-unless (not (tramp--test-crypt-p))) (skip-unless (not (tramp--test-rclone-p))) + (skip-unless (not (or (eq system-type 'darwin) (tramp--test-macos-p)))) - (let* ((utf8 (if (and (eq system-type 'darwin) - (memq 'utf-8-hfs (coding-system-list))) - 'utf-8-hfs 'utf-8)) - (coding-system-for-read utf8) - (coding-system-for-write utf8) - (file-name-coding-system - (coding-system-change-eol-conversion utf8 'unix))) + (let ((coding-system-for-read 'utf-8) + (coding-system-for-write 'utf-8) + (file-name-coding-system + (coding-system-change-eol-conversion 'utf-8 'unix))) (apply #'tramp--test-check-files (append From ef8838c3a5f041769f72758b831eb3fa7a130fb9 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 6 Aug 2023 21:25:40 +0200 Subject: [PATCH 07/13] * etc/NEWS: Mention tramp-show-ad-hoc-proxies. --- etc/NEWS | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 922938f13a1..e74cbee4a53 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -15,6 +15,12 @@ in older Emacs versions. 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'. +Temporary note: ++++ indicates that all relevant manuals in doc/ have been updated. +--- means no change in the manuals is needed. +When you add a new item, use the appropriate mark if you are sure it +applies, and please also update docstrings as needed. + * Installation Changes in Emacs 29.2 @@ -30,6 +36,13 @@ with a prefix argument or by typing 'C-u C-h C-n'. * Changes in Specialized Modes and Packages in Emacs 29.2 +** Tramp + ++++ +*** New user option 'tramp-show-ad-hoc-proxies'. +When non-nil, ad-hoc definitions are kept in remote file names instead +of showing the shortcuts. + * New Modes and Packages in Emacs 29.2 From e1874c4e8bff165abc5c2e842b4381b65da67ebb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 7 Aug 2023 16:20:17 +0300 Subject: [PATCH 08/13] * configure.ac (HAVE_TREE_SITTER): Set NEED_DYNLIB=yes (bug#65123). --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 5dd182ae6e5..ab401be1c1d 100644 --- a/configure.ac +++ b/configure.ac @@ -3254,6 +3254,7 @@ if test "${with_tree_sitter}" != "no"; then [HAVE_TREE_SITTER=yes], [HAVE_TREE_SITTER=no]) if test "${HAVE_TREE_SITTER}" = yes; then AC_DEFINE(HAVE_TREE_SITTER, 1, [Define if using tree-sitter.]) + NEED_DYNLIB=yes else EMACS_CHECK_MODULES([TREE_SITTER], [tree-sitter >= 0.6.3], [HAVE_TREE_SITTER=yes], [HAVE_TREE_SITTER=no]) From f4acae842c02525c41b0e077482206658b14624d Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 8 Aug 2023 09:01:59 +0800 Subject: [PATCH 09/13] Fix bug#65042 * src/pgtkterm.c (fill_background_by_face): Respect the frame's background alpha property. --- src/pgtkterm.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/pgtkterm.c b/src/pgtkterm.c index f4b05ef9903..e767e15cc07 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -1328,14 +1328,17 @@ fill_background_by_face (struct frame *f, struct face *face, int x, int y, int width, int height) { cairo_t *cr = pgtk_begin_cr_clip (f); + double r, g, b, a; + cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); cairo_rectangle (cr, x, y, width, height); cairo_clip (cr); - double r = ((face->background >> 16) & 0xff) / 255.0; - double g = ((face->background >> 8) & 0xff) / 255.0; - double b = ((face->background >> 0) & 0xff) / 255.0; - cairo_set_source_rgb (cr, r, g, b); + r = ((face->background >> 16) & 0xff) / 255.0; + g = ((face->background >> 8) & 0xff) / 255.0; + b = ((face->background >> 0) & 0xff) / 255.0; + a = f->alpha_background; + cairo_set_source_rgba (cr, r, g, b, a); cairo_paint (cr); if (face->stipple != 0) @@ -1343,10 +1346,10 @@ fill_background_by_face (struct frame *f, struct face *face, int x, int y, cairo_pattern_t *mask = FRAME_DISPLAY_INFO (f)->bitmaps[face->stipple - 1].pattern; - double r = ((face->foreground >> 16) & 0xff) / 255.0; - double g = ((face->foreground >> 8) & 0xff) / 255.0; - double b = ((face->foreground >> 0) & 0xff) / 255.0; - cairo_set_source_rgb (cr, r, g, b); + r = ((face->foreground >> 16) & 0xff) / 255.0; + g = ((face->foreground >> 8) & 0xff) / 255.0; + b = ((face->foreground >> 0) & 0xff) / 255.0; + cairo_set_source_rgba (cr, r, g, b, a); cairo_mask (cr, mask); } From f0dda682ffbc84bd36a9543d23cc3151066e7e49 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 8 Aug 2023 04:46:03 +0200 Subject: [PATCH 10/13] ; * etc/NEWS.28: Add deletion of levents.el. --- etc/NEWS.28 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/NEWS.28 b/etc/NEWS.28 index 6ffe39b9493..89ef25bb32d 100644 --- a/etc/NEWS.28 +++ b/etc/NEWS.28 @@ -3150,7 +3150,7 @@ declared obsolete. This was a compatibility kludge which is no longer needed. ** Some libraries obsolete since Emacs 23 have been removed: -ledit.el, lmenu.el, lucid.el and old-whitespace.el. +ledit.el, levents.el, lmenu.el, lucid.el and old-whitespace.el. ** Some functions and variables obsolete since Emacs 23 have been removed: 'GOLD-map', 'advertised-xscheme-send-previous-expression', From 50649a6d1a208b7814a5fc9f0c882442502311e6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 8 Aug 2023 15:22:14 +0300 Subject: [PATCH 11/13] ; * etc/PROBLEMS: Fix wording. --- etc/PROBLEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 30769e68f11..4c75cfc62b6 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -516,7 +516,7 @@ directory copy is ineffective. This is due to an arbitrary limit in certain versions of awk. The solution is to use gawk (GNU awk). -*** Saving, via EasyPG, a file encrypted with GnuPG hangs +*** Saving a file encrypted with GnuPG via EasyPG hangs This is known to happen with GnuPG v2.4.1. The only known workaround is to downgrade to a version of GnuPG older than 2.4.1 (or, in the From dd1d8414b33fe620cf21361a4f089d5f14ff454c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 8 Aug 2023 22:18:46 +0300 Subject: [PATCH 12/13] Fix insert-file-contents with pipes and /dev/stdin * src/fileio.c (Finsert_file_contents): Restore logic of non-regular but seekable files. (Bug#65156) --- src/fileio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 995e4142f58..55132f1ec38 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4581,7 +4581,7 @@ by calling `format-decode', which see. */) goto handled; } - if (seekable || !NILP (end)) + if ((seekable && regular) || !NILP (end)) total = end_offset - beg_offset; else /* For a special file, all we can do is guess. */ @@ -4678,7 +4678,7 @@ by calling `format-decode', which see. */) For a special file, where TOTAL is just a buffer size, so don't bother counting in HOW_MUCH. (INSERTED is where we count the number of characters inserted.) */ - if (seekable || !NILP (end)) + if ((seekable && regular) || !NILP (end)) how_much += this; inserted += this; } From 4767f5eaeedef57dfcc119399e5855f41c2e1be5 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 9 Aug 2023 10:49:44 +0800 Subject: [PATCH 13/13] Better fix for bug#65156 * src/fileio.c (Finsert_file_contents): Correct seek-ability test, since lseek returns -1 upon failure. (Bug#65156) --- src/fileio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 55132f1ec38..4d5365bff9a 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4023,7 +4023,7 @@ by calling `format-decode', which see. */) if (!S_ISREG (st.st_mode)) { regular = false; - seekable = lseek (fd, 0, SEEK_CUR) < 0; + seekable = lseek (fd, 0, SEEK_CUR) != (off_t) -1; if (! NILP (visit)) { @@ -4581,7 +4581,7 @@ by calling `format-decode', which see. */) goto handled; } - if ((seekable && regular) || !NILP (end)) + if (seekable || !NILP (end)) total = end_offset - beg_offset; else /* For a special file, all we can do is guess. */ @@ -4678,7 +4678,7 @@ by calling `format-decode', which see. */) For a special file, where TOTAL is just a buffer size, so don't bother counting in HOW_MUCH. (INSERTED is where we count the number of characters inserted.) */ - if ((seekable && regular) || !NILP (end)) + if (seekable || !NILP (end)) how_much += this; inserted += this; }