From 1458daf316475e8c07102e4886664c4fd6790432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= Date: Thu, 13 Jul 2023 10:47:35 +0200 Subject: [PATCH 01/16] Avoid crashes on macOS with context menus * src/nsmenu.m ([EmacsMenu menuNeedsUpdate:]): Avoid crashes with context menus. (Bug#63495) --- src/nsmenu.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/nsmenu.m b/src/nsmenu.m index 2c1f575bdf2..4a86864176d 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -477,6 +477,14 @@ - (instancetype)initWithTitle: (NSString *)title call to ns_update_menubar. */ - (void)menuNeedsUpdate: (NSMenu *)menu { + + /* The context menu is built and then displayed, as opposed to the + top-menu, which is partially built and then updated and filled in + when it's time to display it. Therefore, we don't call + ns_update_menubar if a context menu is active. */ + if (context_menu_value != 0) + return; + #ifdef NS_IMPL_GNUSTEP static int inside = 0; #endif From d3382f947144fbe14941a0883a90242ca6e1c83c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 7 Sep 2023 09:52:23 +0300 Subject: [PATCH 02/16] ; * lisp/completion.el (dynamic-completion-mode): Doc fix. --- lisp/completion.el | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lisp/completion.el b/lisp/completion.el index eed6e77da4c..731b1587950 100644 --- a/lisp/completion.el +++ b/lisp/completion.el @@ -2133,7 +2133,25 @@ TYPE is the type of the wrapper to be added. Can be :before or :under." ;;;###autoload (define-minor-mode dynamic-completion-mode - "Toggle dynamic word-completion on or off." + "Toggle dynamic word-completion on or off. + +When this minor mode is turned on, typing `M-RET' or `C-RET' +invokes the command `complete', which completes the word or +symbol at point using the record of words/symbols you used +previously and the previously-inserted completions. Typing +a word or moving point across it constitutes \"using\" the +word. + +By default, the database of all the dynamic completions that +were inserted by \\[complete] is saved on the file specified +by `save-completions-file-name' when you exit Emacs, and will +be loaded from that file when this mode is enabled in a future +Emacs session. + +The following important options control the various aspects of +this mode: `enable-completion', `save-completions-flag', and +`save-completions-retention-time'. Few other less important +options can be found in the `completion' group." :global t ;; This is always good, not specific to dynamic-completion-mode. (define-key function-key-map [C-return] [?\C-\r]) From 77b6e9bb17b22178ab386f6c0e6980b4a54d9170 Mon Sep 17 00:00:00 2001 From: Jens Schmidt Date: Tue, 29 Aug 2023 22:14:48 +0200 Subject: [PATCH 03/16] Improve documentation of EPG * lisp/epg.el (epg-context-set-passphrase-callback): Update GnuPG-version-dependent information in docstring and refer to Info node `(epa)' for details. (epg-start-edit-key): Replace description of arguments by a reference to `epg-edit-key'. (epg-edit-key): More precisely describe callback operation and arguments and provide an example of how to edit a key. (Bug#65603) --- lisp/epg.el | 56 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/lisp/epg.el b/lisp/epg.el index 9da5a36ba3d..ed29f08a08f 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -266,11 +266,11 @@ car is a function and cdr is a callback data. The function gets three arguments: the context, the key-id in question, and the callback data (if any). -The callback may not be called if you use GnuPG 2.x, which relies -on the external program called `gpg-agent' for passphrase query. -If you really want to intercept passphrase query, consider -installing GnuPG 1.x _along with_ GnuPG 2.x, which does passphrase -query by itself and Emacs can intercept them." +The callback may not be called if you use GnuPG 2.0, which relies +only on external programs for passphrase query and does not +provide loopback pinentry. For details see Info node `(epa) +GnuPG version compatibility' and Info node `(epa) GnuPG +Pinentry'." ;; (declare (obsolete setf "25.1")) (setf (epg-context-passphrase-callback context) (if (functionp passphrase-callback) @@ -2019,9 +2019,7 @@ PARAMETERS is a string which tells how to create the key." (defun epg-start-edit-key (context key edit-callback handback) "Initiate an edit operation on KEY. -EDIT-CALLBACK is called from process filter and takes four -arguments: the context, a status, an argument string, and the -handback argument. +See `epg-edit-key' for a description of the arguments. If you use this function, you will need to wait for the completion of `epg-gpg-program' by using `epg-wait-for-completion' and call @@ -2036,7 +2034,47 @@ If you are unsure, use synchronous version of this function (car (epg-key-sub-key-list key)))))) (defun epg-edit-key (context key edit-callback handback) - "Edit KEY in the keyring." + "Edit KEY in the keyring. + +This function and function `epg-start-edit-key' use the +line-based protocol enabled by \"gpg\" parameter \"--status-fd\" +to edit KEY. For each GnuPG status line, these functions or, +more precisely, the EPG process filter calls EDIT-CALLBACK with +four arguments: argument CONTEXT, the GnuPG status keyword, the +GnuPG status argument string, and argument HANDBACK. + +The following example uses a simple state machine to trust the +first subkey of key KEY ultimately: + + (let ((state 0)) + (epg-edit-key + context key + (lambda (context status string _handback) + (pcase (vector state status string) + (\\=`[0 \"KEY_CONSIDERED\" ,_]) + (\\='[1 \"GET_LINE\" \"keyedit.prompt\"] + (process-send-string (epg-context-process context) \"1\\n\")) + (\\='[2 \"GOT_IT\" \"\"]) + (\\='[3 \"GET_LINE\" \"keyedit.prompt\"] + (process-send-string (epg-context-process context) \"trust\\n\")) + (\\='[4 \"GOT_IT\" \"\"]) + (\\='[5 \"GET_LINE\" \"edit_ownertrust.value\"] + (process-send-string (epg-context-process context) \"5\\n\")) + (\\='[6 \"GOT_IT\" \"\"]) + (\\='[7 \"GET_BOOL\" \"edit_ownertrust.set_ultimate.okay\"] + (process-send-string (epg-context-process context) \"yes\\n\")) + (\\='[8 \"GOT_IT\" \"\"]) + (\\='[9 \"GET_LINE\" \"keyedit.prompt\"] + (process-send-string (epg-context-process context) \"quit\\n\")) + (\\='[10 \"GOT_IT\" \"\"]) + (_ + (error \"Key edit protocol error in state %d\" state))) + (setq state (1+ state))) + nil)) + +This is a slightly simplified example: Ideally, it should have +double-checked the fingerprint argument to the \"KEY_CONSIDERED\" +status keyword instead of ignoring it." (unwind-protect (progn (epg-start-edit-key context key edit-callback handback) From 1a668cda8bc86755edd3ed7260012f312cadbaf3 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Thu, 7 Sep 2023 11:30:52 +0200 Subject: [PATCH 04/16] Unbreak builds with CHECK_STRUCTS. * src/pdumper.c (dump_buffer): Fix hash for 'struct buffer'. The recent changes to that structure where commits 8f3091defb3ec4396ccea563f67c005044b822ca and 0bd46619413e83fe3c85c8a1dfbf5e20dfce8605, both of which just affected comments. --- src/pdumper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pdumper.c b/src/pdumper.c index 6e102bcd808..9347d51813e 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -2748,7 +2748,7 @@ dump_hash_table (struct dump_context *ctx, static dump_off dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer) { -#if CHECK_STRUCTS && !defined HASH_buffer_85D317CE74 +#if CHECK_STRUCTS && !defined HASH_buffer_9E96D7C4B4 # error "buffer changed. See CHECK_STRUCTS comment in config.h." #endif struct buffer munged_buffer = *in_buffer; From d32f00a35bcd98c25f92e8b99196d32bb1c07c22 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 6 Sep 2023 22:46:23 +0200 Subject: [PATCH 05/16] Improve docstring of message-sendmail-envelope-from * lisp/gnus/message.el (message-sendmail-envelope-from): Doc fix. --- lisp/gnus/message.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 7a71ac9f58e..b0407cc12eb 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -911,8 +911,10 @@ installations, which are rare these days." (defcustom message-sendmail-envelope-from 'obey-mail-envelope-from "Envelope-from when sending mail with sendmail. -If this is nil, use `user-mail-address'. If it is the symbol -`header', use the From: header of the message." +If this is `obey-mail-envelope-from', then use +`mail-envelope-from' to decide what to do. If it is nil, use +`user-mail-address'. If it is the symbol `header', use the +\"From:\" header of the message." :version "27.1" :type '(choice (string :tag "From name") (const :tag "Use From: header from message" header) From 2e2a5f8118c73c36c06f527dc7b58d07a25644b6 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 7 Sep 2023 15:03:42 +0200 Subject: [PATCH 06/16] Adapt Tramp manual * doc/misc/tramp.texi (Frequently Asked Questions): Do not use `defadvice'. Add indices. (Bug#65481) --- doc/misc/tramp.texi | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 7387dfcd1e4..7aea2795ba2 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -5122,30 +5122,11 @@ How to get notified after @value{tramp} completes file transfers? Make Emacs beep after reading from or writing to the remote host with the following code in @file{~/.emacs}. +@vindex tramp-handle-write-region-hook +@vindex tramp-handle-file-local-copy-hook @lisp -@group -(defadvice tramp-handle-write-region - (after tramp-write-beep-advice activate) - "Make @value{tramp} beep after writing a file." - (interactive) - (beep)) -@end group - -@group -(defadvice tramp-handle-do-copy-or-rename-file - (after tramp-copy-beep-advice activate) - "Make @value{tramp} beep after copying a file." - (interactive) - (beep)) -@end group - -@group -(defadvice tramp-handle-insert-file-contents - (after tramp-insert-beep-advice activate) - "Make @value{tramp} beep after inserting a file." - (interactive) - (beep)) -@end group +(add-hook 'tramp-handle-write-region-hook 'beep) +(add-hook 'tramp-handle-file-local-copy-hook 'beep) @end lisp @@ -5416,9 +5397,8 @@ minibuffer: @end group @group -(defadvice minibuffer-complete - (before my-minibuffer-complete activate) - (expand-abbrev)) +(advice-add 'minibuffer-complete + :before 'expand-abbrev) @end group @end lisp @@ -5615,6 +5595,8 @@ If you find the cleanup disturbing, because the file names in two forms in your @file{~/.emacs} after loading the @code{tramp} and @code{recentf} packages: +@vindex tramp-cleanup-connection-hook +@vindex tramp-cleanup-all-connections-hook @lisp @group (remove-hook From b068fcd4a31711e0abfb75083096b4078ac21145 Mon Sep 17 00:00:00 2001 From: Sebastian Miele Date: Thu, 7 Sep 2023 13:51:12 +0200 Subject: [PATCH 07/16] * doc/lispref/strings.texi (Text Comparison): Fix typo (bug#65799). --- doc/lispref/strings.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 3d86a87516b..7d11db49def 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -754,7 +754,7 @@ ignores case differences. @defun string-search needle haystack &optional start-pos Return the position of the first instance of @var{needle} in @var{haystack}, both of which are strings. If @var{start-pos} is -non-@code{nil}, start searching from that position in @var{needle}. +non-@code{nil}, start searching from that position in @var{haystack}. Return @code{nil} if no match was found. This function only considers the characters in the strings when doing the comparison; text properties are ignored. Matching is always From 2f0f33fbf9d0d5fb1bbafd0931b04380b5d1af81 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 7 Sep 2023 17:48:14 +0200 Subject: [PATCH 08/16] Update docs for (co-)maintainer changes * admin/MAINTAINERS: Add information on current maintainers as a canonical place to find this information. * doc/emacs/ack.texi (Acknowledgments): Update for recent Emacs (co-)maintainer changes. * admin/make-tarball.txt: Add note as a reminder to update the above before making a new release. --- admin/MAINTAINERS | 5 +++++ admin/make-tarball.txt | 20 ++++++++++++-------- doc/emacs/ack.texi | 11 +++++++---- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS index 6e080d1f5bb..98bbfa5bd7c 100644 --- a/admin/MAINTAINERS +++ b/admin/MAINTAINERS @@ -5,6 +5,11 @@ what parts of the Emacs distribution. The areas can be defined "arbitrarily", but should provide fairly well-defined boundaries so that there are not too many ambiguities. +The (co-)maintainers of Emacs are: + + Eli Zaretskii + Stefan Kangas + ============================================================================== 1. Areas that someone wants to be maintaining (i.e. has a particularly keen interest in). There's no need to list files where you are diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index fddf8444067..505d3469d3c 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -205,7 +205,11 @@ General steps (for each step, check for possible errors): you need to repeat from step 4 onwards. (You can commit the files from step 2 and 3 earlier to reduce the chance of this.) -6. ./make-dist --snapshot --no-compress +6. If there has been a change in who is the Emacs maintainer since + the last release, update doc/misc/ack.texi and admin/MAINTAINERS + to reflect this. You can commit this separately. + +7. ./make-dist --snapshot --no-compress Check the contents of the new tar with admin/diff-tar-files against the previous release (if this is the first pretest) or the @@ -234,7 +238,7 @@ General steps (for each step, check for possible errors): The output of this command might be easier to compare to the tarball than the one you get from find. -7. tar xf emacs-NEW.tar; cd emacs-NEW +8. tar xf emacs-NEW.tar; cd emacs-NEW ./configure --prefix=/tmp/emacs && make check && make install Use 'script' or M-x compile to save the compilation log in @@ -244,7 +248,7 @@ General steps (for each step, check for possible errors): M-x ediff. Especially check that Info files aren't built, and that no autotools (autoconf etc) run. -8. You can now tag the release/pretest and push it together with the +9. You can now tag the release/pretest and push it together with the last commit: cd EMACS_ROOT_DIR && git tag -a TAG -m "Emacs TAG" @@ -270,7 +274,7 @@ General steps (for each step, check for possible errors): git tag -a emacs-28.1-rc1 -m "Emacs 28.1 RC1" git tag -a emacs-28.1 -m "Emacs 28.1 release" -9. Decide what compression schemes to offer. +10. Decide what compression schemes to offer. For a release, at least gz and xz: gzip --best --no-name -c emacs-NEW.tar > emacs-NEW.tar.gz xz -c emacs-NEW.tar > emacs-NEW.tar.xz @@ -314,14 +318,14 @@ General steps (for each step, check for possible errors): For a pretest, place the files in /incoming/alpha instead, so that they appear on https://alpha.gnu.org/. -10. After five minutes, verify that the files are visible at +11. After five minutes, verify that the files are visible at https://alpha.gnu.org/gnu/emacs/pretest/ for a pretest, or https://ftp.gnu.org/gnu/emacs/ for a release. Download them and check the signatures and SHA1/SHA256 checksums. Check they build (./configure --with-native-compilation). -11. Send an announcement to: emacs-devel, and bcc: info-gnu-emacs@gnu.org. +12. Send an announcement to: emacs-devel, and bcc: info-gnu-emacs@gnu.org. For a pretest, also bcc: platform-testers@gnu.org. For a release, also bcc: info-gnu@gnu.org. (The reason for using bcc: is to make it less likely that people @@ -345,9 +349,9 @@ General steps (for each step, check for possible errors): (Use e.g. `M-x mml-secure-message-sign' in `message-mode' to sign an email.) -12. After a release, update the Emacs pages as described below. +13. After a release, update the Emacs pages as described below. -13. After a release, bump the Emacs version on the release branch. +14. After a release, bump the Emacs version on the release branch. There is no need to bump the version after a pretest; the version is bumped before the next pretest or release instead. diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index d61809fa58f..7d7f76b6645 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi @@ -525,7 +525,7 @@ browser to display a URL. @item Lars Magne Ingebrigtsen was the Emacs (co-)maintainer from Emacs 27.2 -onwards. He did a major redesign of the Gnus news-reader and wrote +to 29.1. He did a major redesign of the Gnus news-reader and wrote many of its parts. Several of these are now general components of Emacs, including: @file{dns.el} for Domain Name Service lookups; @file{format-spec.el} for formatting arbitrary format strings; @@ -590,6 +590,9 @@ control system. Tomoji Kagatani implemented @file{smtpmail.el}, used for sending out mail with SMTP. +@item +Stefan Kangas was the Emacs (co-)maintainer from 29.2 onwards. + @item Ivan Kanis wrote @file{vc-hg.el}, support for the Mercurial version control system. @@ -1379,9 +1382,9 @@ Rodney Whitby and Reto Zimmermann wrote @file{vhdl-mode.el}, a major mode for editing VHDL source code. @item -John Wiegley was the Emacs maintainer from Emacs 25 onwards. He wrote -@file{align.el}, a set of commands for aligning text according to -regular-expression based rules; @file{isearchb.el} for fast buffer +John Wiegley was the Emacs (co-)maintainer from Emacs 25 to 29.1. He +wrote @file{align.el}, a set of commands for aligning text according +to regular-expression based rules; @file{isearchb.el} for fast buffer switching; @file{timeclock.el}, a package for keeping track of time spent on projects; the Bahá'í calendar support; @file{pcomplete.el}, a programmable completion facility; @file{remember.el}, a mode for From 4613575d97f6c2efea9fd28d33b0cec54c3298b2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 7 Sep 2023 18:52:35 +0300 Subject: [PATCH 09/16] ; * lisp/completion.el (dynamic-completion-mode): Fix last change. --- lisp/completion.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/completion.el b/lisp/completion.el index 731b1587950..b0167412b20 100644 --- a/lisp/completion.el +++ b/lisp/completion.el @@ -2135,7 +2135,7 @@ TYPE is the type of the wrapper to be added. Can be :before or :under." (define-minor-mode dynamic-completion-mode "Toggle dynamic word-completion on or off. -When this minor mode is turned on, typing `M-RET' or `C-RET' +When this minor mode is turned on, typing \\`M-RET' or \\`C-RET' invokes the command `complete', which completes the word or symbol at point using the record of words/symbols you used previously and the previously-inserted completions. Typing From 2af092741e54af6bf3bde62cff370853aab46745 Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Sun, 27 Aug 2023 12:53:40 -0700 Subject: [PATCH 10/16] Fix remote path setting in Eshell This ensures that we supply Tramp with the local PATH so that it can do its job of starting the local "ssh", or whatever the method uses (bug#65551). * lisp/eshell/esh-proc.el (eshell-gather-process-output): Add special handling for remote processes. * test/lisp/eshell/esh-proc-tests.el (esh-var-test/remote/remote-path): New test. --- lisp/eshell/esh-proc.el | 16 +++++++++++++++- test/lisp/eshell/esh-proc-tests.el | 15 +++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index fcd59ab9f37..a6defe03761 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -265,6 +265,8 @@ nil, write to `eshell-output-handle'." "A marker that tracks the beginning of output of the last subprocess. Used only on systems which do not support async subprocesses.") +(defvar tramp-remote-path) + (defun eshell-gather-process-output (command args) "Gather the output from COMMAND + ARGS." (require 'esh-var) @@ -272,7 +274,9 @@ Used only on systems which do not support async subprocesses.") (unless (and (file-executable-p command) (file-regular-p (file-truename command))) (error "%s: not an executable file" command)) - (let* ((delete-exited-processes + (let* ((real-path (getenv "PATH")) + (tramp-remote-path (bound-and-true-p tramp-remote-path)) + (delete-exited-processes (if eshell-current-subjob-p eshell-delete-exited-processes delete-exited-processes)) @@ -280,6 +284,16 @@ Used only on systems which do not support async subprocesses.") (coding-system-for-read coding-system-for-read) (coding-system-for-write coding-system-for-write) proc stderr-proc decoding encoding changed) + ;; HACK: We want to supply our subprocess with the all the + ;; environment variables we've set in Eshell. However, supplying + ;; a remote PATH this way can break Tramp, which needs the *local* + ;; PATH for calling "ssh", etc. Instead, set the local path in + ;; our `process-environment' and pass the remote PATH via + ;; `tramp-remote-path'. (If we handle this some better way in the + ;; future, remember to remove `tramp-remote-path' above, too.) + (when (file-remote-p default-directory) + (push (concat "PATH=" real-path) process-environment) + (setq tramp-remote-path (eshell-get-path))) ;; MS-Windows needs special setting of encoding/decoding, because ;; (a) non-ASCII text in command-line arguments needs to be ;; encoded in the system's codepage; and (b) because many Windows diff --git a/test/lisp/eshell/esh-proc-tests.el b/test/lisp/eshell/esh-proc-tests.el index 8e02fbb5497..7d0432dbe68 100644 --- a/test/lisp/eshell/esh-proc-tests.el +++ b/test/lisp/eshell/esh-proc-tests.el @@ -259,4 +259,19 @@ write the exit status to the pipe. See bug#54136." output-start (eshell-end-of-output)) ""))))) + +;; Remote processes + +(ert-deftest esh-var-test/remote/remote-path () + "Ensure that setting the remote PATH in Eshell doesn't interfere with Tramp. +See bug#65551." + (skip-unless (and (eshell-tests-remote-accessible-p) + (executable-find "echo"))) + (let ((default-directory ert-remote-temporary-file-directory)) + (with-temp-eshell + (eshell-insert-command "set PATH ''") + (eshell-match-command-output + (format "%s hello" (executable-find "echo" t)) + "\\`hello\n")))) + ;;; esh-proc-tests.el ends here From 34bbb6c8d2198b73327df3680cfd596631601505 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 8 Sep 2023 11:43:14 +0200 Subject: [PATCH 11/16] Document NonGNU ELPA in FAQ * doc/misc/efaq.texi (Packages that do not come with Emacs): Document NonGNU ELPA. (Bug#65818) --- doc/misc/efaq.texi | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 0a0c375d273..db754a6dd0d 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -3839,13 +3839,28 @@ description of what they do and how they should be used. The easiest way to add more features to your Emacs is to use the command @kbd{M-x list-packages}. This contacts the -@uref{https://elpa.gnu.org, GNU ELPA} (``Emacs Lisp Package Archive'') -server and fetches the list of additional packages that it offers. -These are GNU packages that are available for use with Emacs, but are -distributed separately from Emacs itself, for reasons of space, etc. -You can browse the resulting @file{*Packages*} buffer to see what is -available, and then Emacs can automatically download and install the -packages that you select. @xref{Packages,,, emacs, The GNU Emacs Manual}. +@uref{https://elpa.gnu.org, GNU ELPA} and +@uref{https://elpa.nongnu.org, NonGNU ELPA} (``Emacs Lisp Package +Archive'') servers and fetches the list of additional packages that +they offer. You can browse the resulting @file{*Packages*} buffer to +see what is available, and then Emacs can automatically download and +install the packages that you select. @xref{Packages,,, emacs, The +GNU Emacs Manual}. + +GNU ELPA contains GNU packages that are available for use with Emacs, +but are distributed separately from Emacs itself, for reasons of +space, etc. NonGNU ELPA contains a selection of third-party packages +that can not be included in GNU ELPA because their copyright has not +yet been assigned to the Free Software Foundation.@footnote{For more +information, see @uref{https://www.gnu.org/licenses/why-assign.html, +Why the FSF Gets Copyright Assignments from Contributors}.} + +The @uref{https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources, +GNU Emacs sources mailing list} is automatically sent an email when a +new version of a GNU ELPA or NonGNU ELPA package is +released.@footnote{It used to be an official place where people could +post or announce their extensions to Emacs. That is still allowed, +but exceedingly rare these days.} There are other Emacs Lisp package archives. To use additional archives, you can customize the @code{package-archives} variable. @@ -3855,23 +3870,19 @@ correctness and safety of the code, or they may give only cursory attention. Also, packages hosted on these other archives may encourage or require -you to install and use other nonfree programs. Unless you can verify +you to install and use nonfree programs. Unless you can verify that a package is free software, and that it functions without installing any nonfree software, we recommend for your freedom's sake that you stay away from it. -The @uref{https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources, -GNU Emacs sources mailing list} is an official place where people can -post or announce their extensions to Emacs. - The @uref{https://emacswiki.org, Emacs Wiki} contains pointers to some additional extensions. @uref{https://wikemacs.org, WikEmacs} is an alternative wiki for Emacs. It is impossible for us to list here all the sites that offer Emacs Lisp packages. If you are interested in a specific feature, then -after checking Emacs itself and GNU ELPA, a web search is often the -best way to find results. +after checking Emacs itself, GNU ELPA, and NonGNU ELPA, a web search +is often the best way to find results. @node Spell-checkers @section Spell-checkers From 4e7112ab211c0520e9d81388f7d5f84aace0a9f9 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Sep 2023 14:39:49 +0300 Subject: [PATCH 12/16] ; Fix inaccuracy in ELisp reference manual * doc/lispref/text.texi (Motion by Indent): Remove incorrect information about return values that can be anything. (Bug#65819) --- doc/lispref/text.texi | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 0b0328d0252..4f11caaf64e 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -2808,22 +2808,21 @@ indentation in the text. @deffn Command back-to-indentation @comment !!SourceFile simple.el This command moves point to the first non-whitespace character in the -current line (which is the line in which point is located). It returns -@code{nil}. +current line (which is the line in which point is located). @end deffn @deffn Command backward-to-indentation &optional arg @comment !!SourceFile simple.el This command moves point backward @var{arg} lines and then to the -first nonblank character on that line. It returns @code{nil}. -If @var{arg} is omitted or @code{nil}, it defaults to 1. +first nonblank character on that line. If @var{arg} is omitted or +@code{nil}, it defaults to 1. @end deffn @deffn Command forward-to-indentation &optional arg @comment !!SourceFile simple.el This command moves point forward @var{arg} lines and then to the first -nonblank character on that line. It returns @code{nil}. -If @var{arg} is omitted or @code{nil}, it defaults to 1. +nonblank character on that line. If @var{arg} is omitted or +@code{nil}, it defaults to 1. @end deffn @node Case Changes From 0ab2823f5188e41e932450c07b29f723102c3e8d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Sep 2023 15:35:05 +0300 Subject: [PATCH 13/16] ; Describe in PROBLEMS 2 problems with keyboard input * etc/PROBLEMS: Describe problems with WSL and PGTK keyboard input. (Bug#65802) (Bug#65811) --- etc/PROBLEMS | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index aa196d7dae5..f0efbd6e411 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -441,6 +441,17 @@ environment. ** Keyboard problems +*** PGTK build of Emacs running on Wayland doesn't recognize Hyper modifier + +If you arrange for the Wayland compositor to send the Hyper key +modifier (e.g., via XKB customizations), the Hyper modifier will still +not be reported to Emacs. + +The reason is that GDK 3.x doesn't recognize the Hyper key modifier. +Since GDK 3.x is no longer developed, this bug in GDK will probably +never be solved. And the Emacs PGTK build cannot yet support GTK4, +where this problem is reportedly solved. + *** Unable to enter the M-| key on some German keyboards. Some users have reported that M-| suffers from "keyboard ghosting". This can't be fixed by Emacs, as the keypress never gets passed to it @@ -523,6 +534,15 @@ is to downgrade to a version of GnuPG older than 2.4.1 (or, in the future, upgrade to a newer version which solves the problem, when such a fixed version becomes available). +*** Emacs running on WSL receives stray characters as input. + +For example, you could see Emacs inserting 'z' characters even though +nothing is typed on the keyboard, and even if you unplug the keyboard. + +The reason is a bug in the WSL X server's handling of key-press and +key-repeat events. A workaround is to use the Cygwin or native +MS-Windows build of Emacs instead. + ** Problems with hostname resolution *** Emacs does not know your host's fully-qualified domain name. From 82af484ec15208b405454d8d66806322105754f9 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Sep 2023 16:31:14 +0300 Subject: [PATCH 14/16] ; Two updates of etc/TODO * etc/TODO: Remove the redesign-overlays item (already done in Emacs 29.1). Add an item about supporting external indentation rules. --- etc/TODO | 49 ++++++++++++++----------------------------------- 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/etc/TODO b/etc/TODO index f097e76b917..ef91c17298b 100644 --- a/etc/TODO +++ b/etc/TODO @@ -419,41 +419,6 @@ modify them. Also, when properties are looked up during redisplay, we generally can't run Elisp code, whereas we generally can do that when properties are added. -*** Move overlays to intervals.c -Currently overlays are implemented as (two) sorted singly linked lists (one -for overlays_before some position and one for overlay_after that -position, for some quirky definition of "before" and "after"). -The function 'overlay-recenter' changes the position used for the split -(and is called internally in various situations). - -Each overlay is itself implemented with two markers (which keep track of -the overlay-start and overlay-end). Markers are implemented as -a non-sorted singly linked list of markers. So every text -insertion/deletion requires O(N) time, where N is the number of markers -since we have to go down that list to update those markers that are -affected by the modification. - -You can start in src/buffer.[ch], maybe grepping for overlays_before for -a starting point. - -Text-properties, OTOH, are implemented with a (mostly) balanced binary -tree. This is implemented in src/intervals.[ch]. - -So we'd like to change overlays so that they don't use markers (and we -don't keep them in two sorted singly-linked lists) any more. Instead, -we'll store them inside the balanced binary tree used for -text-properties. I think we can use the "augmented tree" approach -described in https://en.wikipedia.org/wiki/Interval_tree. - -To ease up debugging during development, I'd guess the implementation -would first add the new stuff, keeping the old stuff (i.e. add to -Lisp_Overlay whichever fields are needed for the new code, while keeping -the old ones, add needed overlay fields to the intervals tree, but keep -the old fields, the overlays_before etc...). This way, you can add -consistency checks that make sure the new code computes the same results -as the old code. And once that works well, we can remove the old code -and old fields. - ** Implement Unicode-compliant display of "default-ignorable" characters See the "Characters Ignored for Display" section of paragraph 5.21 in the Unicode Standard for the details. @@ -473,6 +438,20 @@ wrapping of long lines under 'visual-line-mode'. The algorithm for selecting the wrap point may also need be changed to break at the soft hyphen. +** Support external rules for indentation +This should teach Emacs to read indentation rules from a file and use +them in preference to the user customizations and the built-in +defaults. An example of such rule files is '.clang-format', see + + https://clang.llvm.org/docs/ClangFormatStyleOptions.html + +As a minimum, there should be a command, a variant of indent-region, +which could be told to use the rules from such a file, and should then +reformat the region of source code according to the rules. + +The next step is to use these rules during editing of files residing +in a directory that has such an indentation-rules spec in it. + ** FFI (foreign function interface) See eg https://lists.gnu.org/r/emacs-devel/2013-10/msg00246.html From 5b906b62157333b1a2ea63b99b79da4aee09239a Mon Sep 17 00:00:00 2001 From: Mauro Aranda Date: Fri, 8 Sep 2023 12:44:42 -0300 Subject: [PATCH 15/16] Fix defcustom :type of ielm-indirect-setup-hook * lisp/ielm.el (ielm-indirect-setup-hook): Fix :type and remove :safe property, since it was probably a copy-pasta. (Bug#65821) --- lisp/ielm.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/ielm.el b/lisp/ielm.el index 578422001a5..31fb9b90986 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -491,8 +491,7 @@ addition to `comint-indirect-setup-hook', run this hook with the indirect buffer as the current buffer after its setup is done. This can be used to further customize fontification and other behavior of the indirect buffer." - :type 'boolean - :safe 'booleanp + :type 'hook :version "29.1") (defun ielm-indirect-setup-hook () From b8a8106fa1a60f4899ed99fab163922b207fe790 Mon Sep 17 00:00:00 2001 From: Vincent Lefevre Date: Wed, 6 Sep 2023 13:57:07 +0200 Subject: [PATCH 16/16] ; Add missing space in the manual * doc/lispref/compile.texi (Native-Compilation Variables): Add missing space. (Bug#65782) Copyright-paperwork-exempt: yes --- doc/lispref/compile.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index a51691bddcf..25b897125dd 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -1116,7 +1116,7 @@ functions provided by the @file{.elc} file. @end defvar @cindex trampolines, in native compilation - Setting the value of @code{native-comp-jit-compilation} to@code{nil} + Setting the value of @code{native-comp-jit-compilation} to @code{nil} disables JIT native compilation. However, even when JIT native compilation is disabled, Emacs might still need to start asynchronous native compilation subprocesses to produce @dfn{trampolines}. To