commit 3c04806b44843e2e07ff3344e2b3f68ffc62575a (HEAD, refs/remotes/origin/master) Author: Juri Linkov Date: Mon Jun 9 09:40:12 2025 +0300 * lisp/progmodes/c-ts-mode.el (c-ts-mode-menu): Add 'bound-and-true-p'. Use 'bound-and-true-p' for the case when 'subword-mode' is not loaded. diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 070984f4aac..f63b71f89a3 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -1618,7 +1618,7 @@ recommended to enable `electric-pair-mode' with this mode." "--" ("Toggle..." ["Subword Mode" subword-mode - :style toggle :selected subword-mode + :style toggle :selected (bound-and-true-p subword-mode) :help "Toggle subword movement and editing mode"]))) ;; We could alternatively use parsers, but if this works well, I don't commit 86eb733aef49fc91b6f2cf4ecb384c05e899ffa5 Author: Eshel Yaron Date: Sun Jun 8 21:58:18 2025 +0200 ; Fix last change. Thanks to Daniel Mendler for pointing out my mistake in commit 4be63c85d2a. diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 6222809d0dc..b34f73feb5b 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -2125,11 +2125,8 @@ when a slow operation is involved, such as calling an external process. @defun completion-table-with-metadata table metadata This function creates a completion table that behaves like the existing -completion table @var{table}, except with additional metadata, specified -by the completion metadata alist @var{metadata}. If @var{table} already -provides completion metadata, that metadata is merged with -@var{metadata}, giving precedence to @var{metadata} in case an entry -appears both. +completion table @var{table}, except that the new table uses the alist +@var{metadata} as its completion metadata. @end defun @node Completion in Buffers commit 4be63c85d2a5ec325f6724cb3a78cdcee18094db Author: Eshel Yaron Date: Sun Jun 8 21:07:20 2025 +0200 ; Document 'completion-table-with-metadata' in the ELisp manual * doc/lispref/minibuf.texi (Programmed Completion): Document 'completion-table-with-metadata'. diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 3cc206d2e1d..6222809d0dc 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -2123,6 +2123,15 @@ same argument only need to call @var{function} once. This can be useful when a slow operation is involved, such as calling an external process. @end defun +@defun completion-table-with-metadata table metadata +This function creates a completion table that behaves like the existing +completion table @var{table}, except with additional metadata, specified +by the completion metadata alist @var{metadata}. If @var{table} already +provides completion metadata, that metadata is merged with +@var{metadata}, giving precedence to @var{metadata} in case an entry +appears both. +@end defun + @node Completion in Buffers @subsection Completion in Ordinary Buffers @cindex inline completion commit 13a4cd5ed1ed0e44dc64ae8d08d36f7e02e2efd1 Author: Michael Albinus Date: Sun Jun 8 16:45:06 2025 +0200 More language server on emba * test/infra/Dockerfile.emba (emacs-eglot): Install also typescript-language-server and vscode-json-languageserver. diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba index 3944f7cca7e..6be67a95e75 100644 --- a/test/infra/Dockerfile.emba +++ b/test/infra/Dockerfile.emba @@ -71,9 +71,12 @@ RUN apt-get update && \ # Install clangd, tsserver, rust-analyzer. RUN apt-get update && \ apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \ - clangd node-typescript rust-analyzer cargo \ + clangd npm node-typescript rust-analyzer cargo \ && rm -rf /var/lib/apt/lists/* +RUN npm install -g typescript-language-server typescript +RUN npm install -g vscode-json-languageserver + # eclipse-jdt-ls is planned as Java language server. # See . commit f1766fd2b35b70093bb4caab79a8dcdfec666ee0 Author: Michael Albinus Date: Sun Jun 8 15:47:44 2025 +0200 Improve emba integration * admin/notes/emba: Mention generated compatibility-report.html. * test/infra/Dockerfile.emba (emacs-base): Install man-db. (emacs-inotify): Don't install clangd. (emacs-eglot): Derive from debian:trixie. Install rust-analyzer. * test/infra/gitlab-ci.yml (.job-template): Make actions in after_script more robust. diff --git a/admin/notes/emba b/admin/notes/emba index cf4184ccc92..515edd3435f 100644 --- a/admin/notes/emba +++ b/admin/notes/emba @@ -66,7 +66,11 @@ jobs run scheduled in a pipeline every 8 hours. The log files for every test job are kept on the server for a week. They can be downloaded from the server, visiting the URL , and selecting the job -in question. +in question. Browse the job artifacts. + +Additionally, the artifacts of the 'test-tree-sitter' job contain the +file 'compatibility-report.html', which reports tree-sitter grammars +compatibility status. Every pipeline generates a JUnit test report for the respective test jobs, which can be inspected on the pipeline web page. This test diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba index 8078dd77312..3944f7cca7e 100644 --- a/test/infra/Dockerfile.emba +++ b/test/infra/Dockerfile.emba @@ -29,15 +29,14 @@ FROM debian:bookworm as emacs-base RUN apt-get update && \ apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \ libc-dev gcc g++ make autoconf automake libncurses-dev gnutls-dev \ - libxml2-dev libdbus-1-dev libacl1-dev acl git texinfo gdb \ + libxml2-dev libdbus-1-dev libacl1-dev acl git man-db texinfo gdb \ && rm -rf /var/lib/apt/lists/* FROM emacs-base as emacs-inotify -# We install clangd for Eglot tests. RUN apt-get update && \ apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \ - inotify-tools clangd \ + inotify-tools \ && rm -rf /var/lib/apt/lists/* COPY . /checkout @@ -60,12 +59,19 @@ RUN ./autogen.sh autoconf RUN ./configure --with-file-notification=gfile RUN make -j `nproc` bootstrap -FROM emacs-base as emacs-eglot +FROM debian:trixie as emacs-eglot -# Install clangd, tsserver. +# This mimics emacs-base. RUN apt-get update && \ apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \ - clangd node-typescript \ + libc-dev gcc g++ make autoconf automake libncurses-dev gnutls-dev \ + libxml2-dev libdbus-1-dev libacl1-dev acl git man-db texinfo gdb \ + && rm -rf /var/lib/apt/lists/* + +# Install clangd, tsserver, rust-analyzer. +RUN apt-get update && \ + apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \ + clangd node-typescript rust-analyzer cargo \ && rm -rf /var/lib/apt/lists/* # eclipse-jdt-ls is planned as Java language server. @@ -81,9 +87,6 @@ RUN apt-get update && \ # && rm -rf /var/lib/apt/lists/* # RUN snap install core -# # Install rust-analyzer. -# RUN snap install rust-analyzer --beta - # # Install typescript-language-server. # RUN snap install typescript-language-server diff --git a/test/infra/gitlab-ci.yml b/test/infra/gitlab-ci.yml index 79255258aca..93658347761 100644 --- a/test/infra/gitlab-ci.yml +++ b/test/infra/gitlab-ci.yml @@ -118,11 +118,13 @@ default: docker cp ${test_name}:checkout/compatibility-report.html ${test_name} || true' - 'test -n "$(docker ps -aq -f name=${test_name})" && docker rm ${test_name}' - - 'find ${test_name} - ! \( -name "*.log" -o -name ${EMACS_TEST_JUNIT_REPORT} -o - -name compatibility-report.html \) -type f -delete' + - 'test -d ${test_name} && + find ${test_name} + ! \( -name "*.log" -o -name ${EMACS_TEST_JUNIT_REPORT} -o + -name compatibility-report.html \) -type f -delete' # BusyBox find does not know -empty. - - 'find ${test_name} -type d -depth -exec rmdir {} + 2>/dev/null' + - 'test -d ${test_name} && + find ${test_name} -type d -depth -exec rmdir {} + 2>/dev/null' .build-template: needs: [] commit 988110fb6d13ce263574c8f4610a89a38ebb6835 Author: Sean Whitton Date: Sun Jun 8 11:25:17 2025 +0100 vc-next-action: On mixed state sets, treat missing files as removed * lisp/vc/vc.el (vc-only-files-state-and-model, vc-next-action): Add the 'missing' state to the set of compatible states for mixed state actions. This means you can commit removals of files without first moving them to the 'removed' state. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 5b58b68dc9b..b60055cdaeb 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1374,12 +1374,12 @@ BACKEND is the VC backend responsible for FILES." (setq states (mapcar #'car states-alist)) (cond ((length= states 1) (setq state (car states))) - ((cl-subsetp states '(added removed edited)) + ((cl-subsetp states '(added missing removed edited)) (setq state 'edited)) ;; Special, but common case: ;; checking in both changes and new files at once. - ((and (cl-subsetp states '(added removed edited unregistered)) + ((and (cl-subsetp states '(added missing removed edited unregistered)) (y-or-n-p "Some files are unregistered; register them first?")) (vc-register (list backend (cdr (assq 'unregistered states-alist)))) @@ -1387,7 +1387,7 @@ BACKEND is the VC backend responsible for FILES." (t (let* ((pred (lambda (elt) - (memq (car elt) '(added removed edited)))) + (memq (car elt) '(added missing removed edited)))) (compat-alist (cl-remove-if-not pred states-alist)) (other-alist (cl-remove-if pred states-alist)) (first (car (or compat-alist other-alist))) @@ -1526,7 +1526,7 @@ from which to check out the file(s)." ;; do nothing (message "Fileset is up-to-date")))) ;; Files have local changes - ((memq state '(added removed edited)) + ((memq state '(added missing removed edited)) (let ((ready-for-commit files)) ;; CVS, SVN and bzr don't care about read-only (bug#9781). ;; RCS does, SCCS might (someone should check...). commit 9b4fec7a97c9969452f048c0f851aca2b5914b74 Author: Sean Whitton Date: Sun Jun 8 11:22:28 2025 +0100 vc-next-action: Offer to delete missing files * lisp/vc/vc.el (vc-next-action): Call vc-delete-file on a set of missing files, to move them to the 'removed' state, instead of just erroring out. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 14378a85346..5b58b68dc9b 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1426,9 +1426,8 @@ To apply VC operations to multiple files, the files must be in similar VC states (defun vc-next-action (verbose) "Do the next logical version control operation on the current fileset. This requires that all files in the current VC fileset be in the -same state. If they are not, signal an error. Also signal an error if -files in the fileset are missing (removed, but tracked by version control), -or are ignored by the version control system. +sufficiently similar states. If they are not, signal an error. +Also signal an error if files in the fileset are ignored by the VCS. For modern merging-based version control systems: If every file in the fileset is not registered for version @@ -1489,8 +1488,6 @@ from which to check out the file(s)." ;; Do the right thing. (cond - ((eq state 'missing) - (error "Fileset files are missing, so cannot be operated on")) ((eq state 'ignored) (error "Fileset files are ignored by the version-control system")) ;; Fileset comes from a diff-mode buffer, see @@ -1503,6 +1500,8 @@ from which to check out the file(s)." (vc-register (cons backend (cdr vc-fileset))))) (t (vc-register vc-fileset)))) + ((eq state 'missing) + (mapc #'vc-delete-file files)) ;; Files are up-to-date, or need a merge and user specified a revision ((or (eq state 'up-to-date) (and verbose (eq state 'needs-update))) (cond commit ff8c0648fb4dd67bfad44167e70f25a12b1149bd Author: Eli Zaretskii Date: Sun Jun 8 11:21:05 2025 +0300 Fix 'ffap-string-at-point' under 'ffap-file-name-with-spaces' * lisp/ffap.el (ffap-file-name-with-spaces): Doc fix. (ffap-string-at-point): Don't reject '~foo/' and 'd:/bar' file names when 'ffap-file-name-with-spaces' is non-nil. * test/lisp/ffap-tests.el (ffap-test-with-spaces): Add tests, and fix expected results to not strip Windows drive letters. diff --git a/lisp/ffap.el b/lisp/ffap.el index f892bb81e40..1c9f0294601 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -1140,7 +1140,7 @@ The arguments CHARS, BEG and END are handled as described in "Last string returned by the function `ffap-string-at-point'.") (defcustom ffap-file-name-with-spaces nil - "If non-nil, enable looking for paths with spaces in `ffap-string-at-point'. + "If non-nil, allow file names with spaces in `ffap-string-at-point'. Enabling this variable may lead to `find-file-at-point' guessing wrong more often when trying to find a file name intermingled with normal text, but can be useful when working on systems that @@ -1286,10 +1286,16 @@ return an empty string, and set `ffap-string-at-point-region' to `(1 1)'." (if (and ffap-file-name-with-spaces (memq mode '(nil file))) (when (setq dir-separator (ffap-dir-separator-near-point)) - (while (re-search-backward - (regexp-quote dir-separator) - (line-beginning-position) t) - (goto-char (match-beginning 0)))) + (let ((dirsep-re (regexp-quote dir-separator)) + (line-beg (line-beginning-position))) + (while (re-search-backward dirsep-re line-beg t) + (goto-char (match-beginning 0))) + (if (and (looking-at dirsep-re) + (looking-back + ;; Either "~[USER]" or drive letter. + "\\(~[[:graph:]]*\\|[a-zA-Z]:\\)" + line-beg)) + (goto-char (match-beginning 0))))) (skip-chars-backward (car args)) (skip-chars-forward (nth 1 args) pt)) (point)))) diff --git a/test/lisp/ffap-tests.el b/test/lisp/ffap-tests.el index 3c6e1e8e18e..ea5e745bfaf 100644 --- a/test/lisp/ffap-tests.el +++ b/test/lisp/ffap-tests.el @@ -105,7 +105,7 @@ left alone when opening a URL in an external browser." (with-temp-buffer (insert string) (goto-char (point-min)) - (forward-char 10) + (forward-char 3) (ffap-string-at-point)))) (ert-deftest ffap-test-with-spaces () @@ -113,7 +113,7 @@ left alone when opening a URL in an external browser." (equal (ffap-test-string t "c:/Program Files/Open Text Evaluation Media/Open Text Exceed 14 x86/Program here.txt") - "/Program Files/Open Text Evaluation Media/Open Text Exceed 14 x86/Program here.txt")) + "c:/Program Files/Open Text Evaluation Media/Open Text Exceed 14 x86/Program here.txt")) (should (equal (ffap-test-string @@ -122,23 +122,39 @@ left alone when opening a URL in an external browser." (should (equal (ffap-test-string - t "c:/Program Files/Open Text Evaluation Media/Open Text Exceed 14 x86/Program Files/Hummingbird/") - "/Program Files/Open Text Evaluation Media/Open Text Exceed 14 x86/Program Files/Hummingbird/")) + t "z:/Program Files/Open Text Evaluation Media/Open Text Exceed 14 x86/Program Files/Hummingbird/") + "z:/Program Files/Open Text Evaluation Media/Open Text Exceed 14 x86/Program Files/Hummingbird/")) (should (equal (ffap-test-string t "c:\\Program Files\\Open Text Evaluation Media\\Open Text Exceed 14 x86\\Program Files\\Hummingbird\\") - "\\Program Files\\Open Text Evaluation Media\\Open Text Exceed 14 x86\\Program Files\\Hummingbird\\")) + "c:\\Program Files\\Open Text Evaluation Media\\Open Text Exceed 14 x86\\Program Files\\Hummingbird\\")) (should (equal (ffap-test-string - t "c:\\Program Files\\Freescale\\CW for MPC55xx and MPC56xx 2.10\\PowerPC_EABI_Tools\\Command_Line_Tools\\CLT_Usage_Notes.txt") - "\\Program Files\\Freescale\\CW for MPC55xx and MPC56xx 2.10\\PowerPC_EABI_Tools\\Command_Line_Tools\\CLT_Usage_Notes.txt")) + t "d:\\Program Files\\Freescale\\CW for MPC55xx and MPC56xx 2.10\\PowerPC_EABI_Tools\\Command_Line_Tools\\CLT_Usage_Notes.txt") + "d:\\Program Files\\Freescale\\CW for MPC55xx and MPC56xx 2.10\\PowerPC_EABI_Tools\\Command_Line_Tools\\CLT_Usage_Notes.txt")) (should (equal (ffap-test-string t "C:\\temp\\program.log on Windows or /var/log/program.log on Unix.") - "\\temp\\program.log"))) + "C:\\temp\\program.log")) + (should + (equal + (ffap-test-string t "~/tmp/") + "~/tmp/")) + (should + (equal + (ffap-test-string nil "~/tmp/") + "~/tmp/")) + (should + (equal + (ffap-test-string t "~abc123_áè/foo") + "~abc123_áè/foo")) + (should + (equal + (ffap-test-string t "c:/Program Files/my program.exe and here's more text") + "c:/Program Files/my program.exe"))) (ert-deftest ffap-test-no-newlines () (should-not