commit fb4b0b30a24e8192e71c1425dc8a295cf39f64ff (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Sat Dec 2 10:06:45 2023 -0500 Revert "Ensure that directory is expanded in package-vc-checkout" This reverts commit bf0b0c9c73d4793beb11e6125496d0e72d4dd67a. It is only needed in Emacs 29. diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 77f156f20ef..9780e4d53de 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -941,7 +941,6 @@ package-vc-checkout (lambda (dir) (or (not (file-exists-p dir)) (directory-empty-p dir)))) (and current-prefix-arg :last-release)))) - (setf directory (expand-file-name directory)) (package-vc--archives-initialize) (let ((pkg-spec (or (package-vc--desc->spec pkg-desc) (and-let* ((extras (package-desc-extras pkg-desc)) commit 59af2c6b150b1639756a724ce06103bdc51b0309 Merge: 907aab88c7a 5f882f4ee97 Author: Eli Zaretskii Date: Sat Dec 2 10:05:51 2023 -0500 Merge from origin/emacs-29 5f882f4ee97 ; Fix doc string punctuation in ruby-ts-mode.el. 546a68925c9 Fix 'Info-goto-node-web' when NODE is given in various forms 7ff943044e9 Fix setting cursor when the window's op line has 'line-pr... 7f0bef47ddd Drop extra parenthesis in example code in Emacs Lisp Intr... fbaf113bf38 rust-ts-mode: appropriately fontify doc strings bd62bdbc680 Fix example code in Emacs Lisp Introduction manual c7e459132a9 Fix example in Emacs Lisp Intro manual a6e9c26c8f4 ; * doc/emacs/files.texi (Save Commands): Fix last change. f6a06ed6c5d Elisp manual: Mention 'write-region' for saving the buffer 4774a3abb4b Document, that PROCESS of signal-process can be a string ab126284081 Fix typescript-ts-mode indentation for switch statements commit 907aab88c7a2bb56014d497633c038d9762cfd01 Merge: 14b62b1ae0e ab9c62c2b33 Author: Eli Zaretskii Date: Sat Dec 2 10:05:51 2023 -0500 ; Merge from origin/emacs-29 The following commit was skipped: ab9c62c2b33 Repair `tab-first-completion` (bug#67158) commit 14b62b1ae0ee8f1564496212b2c32c4a8ceb548e Merge: b26852ef974 cd477bf07d8 Author: Eli Zaretskii Date: Sat Dec 2 10:05:50 2023 -0500 Merge from origin/emacs-29 cd477bf07d8 Fix behavior of 'split-root-window-*' with 'C-u' 2e5d47f578a ; * doc/lispintro/emacs-lisp-intro.texi (copy-to-buffer):... c46700deb0a Add more text to clarify the behavior of 'with-current-bu... 687c416ce9b Fix example in Emacs user manual 835902179cd ; Fix recent change in 'c-ts-mode' 169a5ff7524 ; Fix typo in Gnus manual (bug#67469). 30841c71a5d Mention Titankey in Tramp, which has passed the tests dab7cc241f4 Fix c-ts-mode indentation after if/else (bug#67417) f8d9dc26c78 Fix indentation for else clause in c-ts-mode (bug#67417) bf0b0c9c73d Ensure that directory is expanded in package-vc-checkout e551dd72f79 * etc/PROBLEMS: Add entry about pinentry with gpgsm. (Bu... commit 5f882f4ee97f6e7e730e85482ff799b4fe0e30f1 Author: Eli Zaretskii Date: Sat Dec 2 16:49:55 2023 +0200 ; Fix doc string punctuation in ruby-ts-mode.el. diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el index 4b951f7606f..5b432c8098c 100644 --- a/lisp/progmodes/ruby-ts-mode.el +++ b/lisp/progmodes/ruby-ts-mode.el @@ -197,8 +197,8 @@ ruby-ts--keywords (defun ruby-ts--comment-font-lock (node override start end &rest _) "Apply font lock to comment NODE within START and END. Applies `font-lock-comment-delimiter-face' and -`font-lock-comment-face' See `treesit-fontify-with-override' for -values of OVERRIDE" +`font-lock-comment-face'. See `treesit-fontify-with-override' for +values of OVERRIDE." ;; Empirically it appears as if (treesit-node-start node) will be ;; where the # character is at and (treesit-node-end node) will be ;; the end of the line commit b26852ef974d3e43d0174a15bc2774283042b8c2 Author: Eli Zaretskii Date: Sat Dec 2 15:50:45 2023 +0200 ; Fix last change. diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index 7dd05b2757f..7307a5b13f1 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -44,6 +44,7 @@ (declare-function treesit-node-first-child-for-pos "treesit.c") (declare-function treesit-node-parent "treesit.c") (declare-function treesit-node-start "treesit.c") +(declare-function treesit-node-end "treesit.c") (declare-function treesit-node-type "treesit.c") (declare-function treesit-parser-create "treesit.c") (declare-function treesit-search-subtree "treesit.c") @@ -140,7 +141,7 @@ lua-ts--keywords (defun lua-ts--comment-font-lock (node override start end &rest _) "Apply font lock to comment NODE within START and END. Applies `font-lock-comment-delimiter-face' and -`font-lock-comment-face' See `treesit-fontify-with-override' for +`font-lock-comment-face'. See `treesit-fontify-with-override' for values of OVERRIDE." (let* ((node-start (treesit-node-start node)) (node-end (treesit-node-end node)) commit 4835c9913b2183af6003007f8eee2cd0ab4e697d Author: john muhl Date: Tue Nov 14 16:25:43 2023 -0600 Improve font-locking in lua-ts-mode (bug#67554) * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Move property highlighting to level 4. (lua-ts--keywords): Remove `true', `false' and `nil' from keywords. (lua-ts--font-lock-settings): Highlight assignments, functions and labels in more places. Distinguish comment delimiters. (lua-ts--comment-font-lock): New function. diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index a910d759c83..7dd05b2757f 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -133,135 +133,141 @@ lua-ts--builtins "Lua built-in functions for tree-sitter font-locking.") (defvar lua-ts--keywords - '("and" "do" "else" "elseif" "end" "for" "function" - "goto" "if" "in" "local" "not" "or" "repeat" - "return" "then" "until" "while") + '("and" "do" "else" "elseif" "end" "for" "function" "goto" "if" + "in" "local" "not" "or" "repeat" "return" "then" "until" "while") "Lua keywords for tree-sitter font-locking and navigation.") +(defun lua-ts--comment-font-lock (node override start end &rest _) + "Apply font lock to comment NODE within START and END. +Applies `font-lock-comment-delimiter-face' and +`font-lock-comment-face' See `treesit-fontify-with-override' for +values of OVERRIDE." + (let* ((node-start (treesit-node-start node)) + (node-end (treesit-node-end node)) + (node-text (treesit-node-text node t)) + (delimiter-end (+ 2 node-start))) + (when (and (>= node-start start) + (<= delimiter-end end) + (string-match "\\`--" node-text)) + (treesit-fontify-with-override node-start + delimiter-end + font-lock-comment-delimiter-face + override)) + (treesit-fontify-with-override (max delimiter-end start) + (min node-end end) + font-lock-comment-face + override))) + (defvar lua-ts--font-lock-settings (treesit-font-lock-rules - :language 'lua + :default-language 'lua :feature 'bracket '(["(" ")" "[" "]" "{" "}"] @font-lock-bracket-face) - :language 'lua :feature 'delimiter '(["," ";"] @font-lock-delimiter-face) - :language 'lua :feature 'constant - '((variable_list - attribute: (attribute (["<" ">"] (identifier)))) - @font-lock-constant-face - (goto_statement (identifier) @font-lock-constant-face) - (label_statement) @font-lock-constant-face) + '([(variable_list + attribute: (attribute (["<" ">"] (identifier)))) + (label_statement) + (true) (false) (nil)] + @font-lock-constant-face) - :language 'lua :feature 'operator - '(["and" "not" "or" "+" "-" "*" "/" "%" "^" - "#" "==" "~=" "<=" ">=" "<" ">" "=" "&" - "~" "|" "<<" ">>" "//" ".."] - @font-lock-operator-face - (vararg_expression) @font-lock-operator-face) + '(["+" "-" "*" "/" "%" "^" "#" "==" "~=" "<=" ">=" + "<" ">" "=" "&" "~" "|" "<<" ">>" "//" ".." + (vararg_expression)] + @font-lock-operator-face) - :language 'lua :feature 'builtin `(((identifier) @font-lock-builtin-face (:match ,(regexp-opt lua-ts--builtins 'symbols) @font-lock-builtin-face))) - :language 'lua :feature 'function '((function_call name: (identifier) @font-lock-function-call-face) (function_call - name: (method_index_expression - method: (identifier) @font-lock-function-call-face)) + (method_index_expression + method: (identifier) @font-lock-function-call-face)) (function_call - name: (dot_index_expression (identifier) @font-lock-function-call-face))) + (dot_index_expression + field: (identifier) @font-lock-function-call-face))) - :language 'lua :feature 'punctuation '(["." ":"] @font-lock-punctuation-face) - :language 'lua :feature 'variable '((function_call - arguments: (arguments (identifier)) - @font-lock-variable-use-face) + (arguments (identifier) @font-lock-variable-use-face)) (function_call - name: (method_index_expression - table: (identifier) @font-lock-variable-use-face))) + (arguments + (binary_expression (identifier) @font-lock-variable-use-face))) + (function_call + (arguments + (bracket_index_expression (identifier) @font-lock-variable-use-face))) + (function_declaration + (parameters name: (identifier) @font-lock-variable-name-face))) - :language 'lua :feature 'number '((number) @font-lock-number-face) - :language 'lua :feature 'keyword - `((break_statement) @font-lock-keyword-face - (true) @font-lock-constant-face - (false) @font-lock-constant-face - (nil) @font-lock-constant-face - ,(vconcat lua-ts--keywords) - @font-lock-keyword-face) - - :language 'lua + `([(break_statement) + ,(vconcat lua-ts--keywords)] + @font-lock-keyword-face + (goto_statement ((identifier) @font-lock-constant-face))) + :feature 'string '((string) @font-lock-string-face) - :language 'lua :feature 'escape :override t '((escape_sequence) @font-lock-escape-face) - :language 'lua :feature 'comment - '((comment) @font-lock-comment-face + '((comment) @lua-ts--comment-font-lock (hash_bang_line) @font-lock-comment-face) - :language 'lua :feature 'definition '((function_declaration - name: (identifier) @font-lock-function-name-face) - (assignment_statement - (variable_list name: [(identifier)]) @font-lock-function-name-face - (expression_list value: (function_definition))) - (table_constructor - (field - name: (identifier) @font-lock-function-name-face - value: (function_definition))) - (function_declaration - name: (dot_index_expression (identifier) @font-lock-function-name-face)) + (identifier) @font-lock-function-name-face) (function_declaration - name: (method_index_expression (identifier) @font-lock-function-name-face)) + (dot_index_expression + field: (identifier) @font-lock-function-name-face)) (function_declaration (method_index_expression + method: (identifier) @font-lock-function-name-face)) + (assignment_statement + (variable_list + (identifier) @font-lock-function-name-face) + (expression_list value: (function_definition))) + (field + name: (identifier) @font-lock-function-name-face + value: (function_definition)) + (assignment_statement + (variable_list (dot_index_expression - table: (identifier) @font-lock-function-name-face - field: (identifier) @font-lock-property-name-face - ))) - (parameters - name: (identifier) @font-lock-variable-name-face) + field: (identifier) @font-lock-function-name-face)) + (expression_list + value: + (function_definition)))) + + :feature 'assignment + '((variable_list (identifier) @font-lock-variable-name-face) + (variable_list + (bracket_index_expression + field: (identifier) @font-lock-variable-name-face)) + (variable_list + (dot_index_expression + field: (identifier) @font-lock-variable-name-face)) (for_numeric_clause name: (identifier) @font-lock-variable-name-face)) - :language 'lua :feature 'property '((field name: (identifier) @font-lock-property-name-face) (dot_index_expression field: (identifier) @font-lock-property-use-face)) - :language 'lua - :feature 'assignment - '((variable_list - [(identifier) - (bracket_index_expression)] - @font-lock-variable-name-face) - (variable_list - (dot_index_expression - table: (identifier)) - @font-lock-variable-name-face)) - - :language 'lua :feature 'error :override t '((ERROR) @font-lock-warning-face)) @@ -665,13 +671,14 @@ lua-ts-mode (setq-local treesit-font-lock-settings lua-ts--font-lock-settings) (setq-local treesit-font-lock-feature-list '((comment definition) - (keyword property string) + (keyword string) (assignment builtin constant number) (bracket delimiter escape function operator + property punctuation variable))) commit 546a68925c90829d6977b7e4649e7fc0ed20d9f7 Author: Eli Zaretskii Date: Sat Dec 2 15:25:08 2023 +0200 Fix 'Info-goto-node-web' when NODE is given in various forms * lisp/info.el (Info-goto-node-web): Support all forms of node input, per 'Info-read-node-name's documentation, and extract FILENAME from NODE if given there. Default NODE to "Top" if not provided by the user. (Bug#67531) (Info-url-for-node): Support browsing the "Top" node. diff --git a/lisp/info.el b/lisp/info.el index 035dff66e75..d5ce3bc2ab3 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1787,11 +1787,24 @@ Info-goto-node-web (interactive (list (Info-read-node-name "Go to node (default current page): " Info-current-node)) Info-mode) - (browse-url-button-open-url - (Info-url-for-node (format "(%s)%s" (file-name-sans-extension - (file-name-nondirectory - Info-current-file)) - node)))) + (let (filename) + (string-match "\\s *\\((\\s *\\([^\t)]*\\)\\s *)\\s *\\|\\)\\(.*\\)" + node) + (setq filename (if (= (match-beginning 1) (match-end 1)) + "" + (match-string 2 node)) + node (match-string 3 node)) + (let ((trim (string-match "\\s +\\'" filename))) + (if trim (setq filename (substring filename 0 trim)))) + (let ((trim (string-match "\\s +\\'" node))) + (if trim (setq node (substring node 0 trim)))) + (if (equal filename "") + (setq filename (file-name-sans-extension (file-name-nondirectory + Info-current-file)))) + (if (equal node "") + (setq node "Top")) + (browse-url-button-open-url + (Info-url-for-node (format "(%s)%s" filename node))))) (defun Info-url-for-node (node) "Return a URL for NODE, a node in the GNU Emacs or Elisp manual. @@ -1817,8 +1830,10 @@ Info-url-for-node "")) (concat "https://www.gnu.org/software/emacs/manual/html_node/" manual "/" - (url-hexify-string (string-replace " " "-" node)) - ".html"))) + (and (not (equal node "Top")) + (concat + (url-hexify-string (string-replace " " "-" node)) + ".html"))))) (defvar Info-read-node-completion-table) commit 790a96ac994d7d07580fef7b5d054154a4ec7cc7 Author: Eshel Yaron Date: Sun Nov 26 17:00:32 2023 +0100 Facilitate using Completion Preview with the mouse (bug#67479) Allow users to accept the completion suggestion by clicking on it, and to cycle between completion suggestions by scrolling (with a mouse wheel or a trackpad) over the preview. Also display a message by default when cycling to inform the user about the index of the current suggestion out of the available total. * lisp/completion-preview.el (completion-preview-highlight): New face. (completion-preview-message-format): New user option. (completion-preview--mouse-map): New keymap. (completion-preview--try-table, completion-preview--show) (completion-preview-next-candidate): Apply 'keymap' and 'mouse-face' properties to completion preview string. (completion-preview--internal-commands): Add 'mwheel-scroll'. This prevents incidental scrolls outside of the preview from dismissing the preview when you actually want to cycle it. (completion-preview--active-p): New function. Use it as a 'completion-predicate' symbol property for commands that should only be used when the preview is shown to otherwise exclude these commands from M-x completion candidates. diff --git a/lisp/completion-preview.el b/lisp/completion-preview.el index 039a330bc84..1d5f1253702 100644 --- a/lisp/completion-preview.el +++ b/lisp/completion-preview.el @@ -83,6 +83,22 @@ completion-preview-minimum-symbol-length :type 'natnum :version "30.1") +(defcustom completion-preview-message-format + "Completion suggestion %i out of %n" + "Message to show after cycling the completion preview suggestion. + +If the value is a string, `completion-preview-next-candidate' and +`completion-preview-prev-candidate' display this string in the +echo area, after substituting \"%i\" with the 1-based index of +the completion suggestion that the preview is showing, and \"%n\" +with the total number of available completion suggestions for the +text around point. + +If this option is nil, these commands do not display any message." + :type '(choice (string :tag "Message format") + (const :tag "No message" nil)) + :version "30.1") + (defvar completion-preview-sort-function #'minibuffer--sort-by-length-alpha "Sort function to use for choosing a completion candidate to preview.") @@ -100,6 +116,11 @@ completion-preview-exact "Face for exact completion preview overlay." :version "30.1") +(defface completion-preview-highlight + '((t :inherit highlight)) + "Face for highlighting the completion preview when the mouse is over it." + :version "30.1") + (defvar-keymap completion-preview-active-mode-map :doc "Keymap for Completion Preview Active mode." "C-i" #'completion-preview-insert @@ -107,11 +128,26 @@ completion-preview-active-mode-map ;; "M-p" #'completion-preview-prev-candidate ) +(defvar-keymap completion-preview--mouse-map + :doc "Keymap for mouse clicks on the completion preview." + "" #'completion-preview-insert + "C-" #'completion-at-point + "" #'completion-at-point + (format "<%s>" mouse-wheel-up-event) #'completion-preview-prev-candidate + (format "<%s>" mouse-wheel-up-alternate-event) #'completion-preview-prev-candidate + (format "<%s>" mouse-wheel-down-event) #'completion-preview-next-candidate + (format "<%s>" mouse-wheel-down-alternate-event) #'completion-preview-next-candidate) + (defvar-local completion-preview--overlay nil) (defvar completion-preview--internal-commands - '(completion-preview-next-candidate completion-preview-prev-candidate) - "List of commands that manipulate the completion preview.") + '(completion-preview-next-candidate + completion-preview-prev-candidate + ;; Don't dismiss or update the preview when the user scrolls. + mwheel-scroll) + "List of commands that manipulate the completion preview. + +Completion Preview mode avoids updating the preview after these commands.") (defsubst completion-preview--internal-command-p () "Return non-nil if `this-command' manipulates the completion preview." @@ -194,7 +230,9 @@ completion-preview--try-table (list (propertize (substring (car sorted) (length prefix)) 'face (if (cdr sorted) 'completion-preview - 'completion-preview-exact)) + 'completion-preview-exact) + 'mouse-face 'completion-preview-highlight + 'keymap completion-preview--mouse-map) (+ beg base) end sorted (substring string 0 base) exit-fn)))))) @@ -255,7 +293,9 @@ completion-preview--show ;; The previous preview is still applicable, update it. (overlay-put (completion-preview--make-overlay cur (propertize (substring cand (- cur beg)) - 'face face)) + 'face face + 'mouse-face 'completion-preview-highlight + 'keymap completion-preview--mouse-map)) 'completion-preview-end cur) ;; The previous preview is no longer applicable, hide it. (completion-preview-active-mode -1)))) @@ -318,10 +358,24 @@ completion-preview-next-candidate (let ((aft (propertize (substring str (- pos beg)) 'face (if (< 1 len) 'completion-preview - 'completion-preview-exact)))) + 'completion-preview-exact) + 'mouse-face 'completion-preview-highlight + 'keymap completion-preview--mouse-map))) (add-text-properties 0 1 '(cursor 1) aft) (overlay-put completion-preview--overlay 'completion-preview-index new) - (overlay-put completion-preview--overlay 'after-string aft))))) + (overlay-put completion-preview--overlay 'after-string aft)) + (when completion-preview-message-format + (message (format-spec completion-preview-message-format + `((?i . ,(1+ new)) (?n . ,len)))))))) + +(defun completion-preview--active-p (_symbol buffer) + "Check if the completion preview is currently shown in BUFFER." + (buffer-local-value 'completion-preview-active-mode buffer)) + +(dolist (cmd '(completion-preview-insert + completion-preview-prev-candidate + completion-preview-next-candidate)) + (put cmd 'completion-predicate #'completion-preview--active-p)) ;;;###autoload (define-minor-mode completion-preview-mode commit 7ff943044e9b261768253404b48d5c6419d2f143 Author: Eli Zaretskii Date: Sat Dec 2 14:13:24 2023 +0200 Fix setting cursor when the window's op line has 'line-prefix' * src/xdisp.c (set_cursor_from_row): Skip glyphs that come from a string if their 'avoid_cursor_p' flag is set. (Bug#67486) diff --git a/src/xdisp.c b/src/xdisp.c index eb38ebba17b..5a56b116708 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -17859,7 +17859,8 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, else if (dpos == 0) match_with_avoid_cursor = true; } - else if (STRINGP (glyph->object)) + else if (STRINGP (glyph->object) + && !glyph->avoid_cursor_p) { Lisp_Object chprop; ptrdiff_t glyph_pos = glyph->charpos; @@ -18085,7 +18086,8 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, /* Any glyphs that come from the buffer are here because of bidi reordering. Skip them, and only pay attention to glyphs that came from some string. */ - if (STRINGP (glyph->object)) + if (STRINGP (glyph->object) + && !glyph->avoid_cursor_p) { Lisp_Object str; ptrdiff_t tem; commit 7f0bef47dddbcbdaa12b9fc4aa25e0c41ac340a2 Author: Xiyue Deng Date: Fri Dec 1 16:19:18 2023 -0800 Drop extra parenthesis in example code in Emacs Lisp Introduction * doc/lispintro/emacs-lisp-intro.texi (Small buffer case): Drop trailing unmatched parenthesis. (Bug#67576) Copyright-paperwork-exempt: yes diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index ef2d63372a5..d6627a2a1ca 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -6187,7 +6187,7 @@ Small buffer case @c Keep this on one line. @smallexample -(/ (+ 10 (* size (prefix-numeric-value arg))) 10)) +(/ (+ 10 (* size (prefix-numeric-value arg))) 10) @end smallexample @need 1200 @@ -6204,7 +6204,7 @@ Small buffer case (* size (prefix-numeric-value arg))) - 10)) + 10) @end group @end smallexample commit fbaf113bf38ee7db8416f0c0581d479c40b2d69c Author: Christophe Troestler Date: Thu Nov 30 00:13:10 2023 +0100 rust-ts-mode: appropriately fontify doc strings * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--comment-docstring): New function. (rust-ts-mode--font-lock-settings): Use it (https://lists.gnu.org/archive/html/emacs-devel/2023-12/msg00019.html). diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el index 999c1d7ae96..a07634199ff 100644 --- a/lisp/progmodes/rust-ts-mode.el +++ b/lisp/progmodes/rust-ts-mode.el @@ -147,7 +147,7 @@ rust-ts-mode--font-lock-settings :language 'rust :feature 'comment - '(([(block_comment) (line_comment)]) @font-lock-comment-face) + '(([(block_comment) (line_comment)]) @rust-ts-mode--comment-docstring) :language 'rust :feature 'delimiter @@ -287,6 +287,17 @@ rust-ts-mode--font-lock-settings '((ERROR) @font-lock-warning-face)) "Tree-sitter font-lock settings for `rust-ts-mode'.") +(defun rust-ts-mode--comment-docstring (node override start end &rest _args) + "Use the comment or documentation face appropriately for comments." + (let* ((beg (treesit-node-start node)) + (end (treesit-node-end node)) + (face (save-excursion + (goto-char beg) + (if (looking-at "///") + 'font-lock-doc-face + 'font-lock-comment-face)))) + (treesit-fontify-with-override beg end face override start end))) + (defun rust-ts-mode--fontify-scope (node override start end &optional tail-p) (let* ((case-fold-search nil) (face commit bd62bdbc680833bb730b114e005e41df8dc97900 Author: Xiyue Deng Date: Fri Dec 1 02:31:49 2023 -0800 Fix example code in Emacs Lisp Introduction manual * doc/lispintro/emacs-lisp-intro.texi (Optional Arguments): Fix indentation in an example. (Bug#67559) Copyright-paperwork-exempt: yes diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index fa5f797bf8d..ef2d63372a5 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -5986,12 +5986,12 @@ Optional Arguments (and @var{are-both-transient-mark-mode-and-mark-active-true}) (push-mark)) (let (@var{determine-size-and-set-it}) - (goto-char - (@var{if-there-is-an-argument} - @var{figure-out-where-to-go} - @var{else-go-to} - (point-min)))) - @var{do-nicety} + (goto-char + (@var{if-there-is-an-argument} + @var{figure-out-where-to-go} + @var{else-go-to} + (point-min)))) + @var{do-nicety} @end group @end smallexample commit c7e459132a9a39dd2081ca7edda5709e28bda262 Author: Eli Zaretskii Date: Fri Dec 1 10:47:27 2023 +0200 Fix example in Emacs Lisp Intro manual * doc/lispintro/emacs-lisp-intro.texi (beginning-of-buffer opt arg): Fix indentation in example. Reported by Xiyue Deng . (Bug#67560) diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 7563d66bad1..fa5f797bf8d 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -6044,12 +6044,13 @@ beginning-of-buffer opt arg @group (if (> (buffer-size) 10000) ;; @r{Avoid overflow for large buffer sizes!} - (* (prefix-numeric-value arg) - (/ size 10)) + (* (prefix-numeric-value arg) + (/ size 10)) (/ (+ 10 - (* - size (prefix-numeric-value arg))) 10))) + (* size + (prefix-numeric-value arg))) + 10)) @end group @end smallexample commit a6e9c26c8f4b0624708f24589e3b0c8097f2c207 Author: Eli Zaretskii Date: Fri Dec 1 10:36:55 2023 +0200 ; * doc/emacs/files.texi (Save Commands): Fix last change. diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index f0160c692da..3a120a5275a 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -548,8 +548,8 @@ Save Commands @code{set-visited-file-name} also does this. @xref{Choosing Modes}. If you wish to save the current buffer to a different file without -visiting it, use @code{mark-whole-buffer} (@kbd C-x h), then @kbd{M-x -write-region} (@pxref{Misc File Ops} +visiting that file, use @code{mark-whole-buffer} (@kbd{C-x h}), then +@w{@kbd{M-x write-region}} (@pxref{Misc File Ops}). If Emacs is about to save a file and sees that the date of the latest version on disk does not match what Emacs last read or wrote, Emacs commit f6a06ed6c5d9da12a7114dfea437bef77cc2d399 Author: Jeremy Bryant Date: Thu Nov 30 23:14:46 2023 +0000 Elisp manual: Mention 'write-region' for saving the buffer * doc/emacs/files.texi (Save Commands): Mention 'write-region'. (Bug#67313) diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 29cc22e7557..f0160c692da 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -547,6 +547,10 @@ Save Commands to that major mode, in most cases. The command @code{set-visited-file-name} also does this. @xref{Choosing Modes}. + If you wish to save the current buffer to a different file without +visiting it, use @code{mark-whole-buffer} (@kbd C-x h), then @kbd{M-x +write-region} (@pxref{Misc File Ops} + If Emacs is about to save a file and sees that the date of the latest version on disk does not match what Emacs last read or wrote, Emacs notifies you of this fact, because it probably indicates a problem caused commit 4774a3abb4be3068e0308820c73b71c2a924fb21 Author: Michael Albinus Date: Thu Nov 30 14:37:40 2023 +0100 Document, that PROCESS of signal-process can be a string * doc/lispref/processes.texi (Signals to Processes) [signal-process]: * src/process.c (Fsignal_process): Document, that PROCESS can be a string. diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index e1398749005..b3ba58ec643 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -1497,6 +1497,9 @@ Signals to Processes @code{remote-pid}, or @var{process} is a number and @var{remote} is a remote file name, @var{process} is interpreted as process on the respective remote host, which will be the process to signal. + +If @var{process} is a string, it is interpreted as process object with +the respective process name, or as a number. @end deffn Sometimes, it is necessary to send a signal to a non-local diff --git a/src/process.c b/src/process.c index 46e57c1a7c2..4ee742c6cef 100644 --- a/src/process.c +++ b/src/process.c @@ -7185,6 +7185,8 @@ DEFUN ("signal-process", Fsignal_process, Ssignal_process, `remote-pid', or PROCESS is a number and REMOTE is a remote file name, PROCESS is interpreted as process on the respective remote host, which will be the process to signal. +If PROCESS is a string, it is interpreted as process object with the +respective process name, or as a number. SIGCODE may be an integer, or a symbol whose name is a signal name. */) (Lisp_Object process, Lisp_Object sigcode, Lisp_Object remote) { commit ab126284081cd1f6a3317dc1e94636bf17af2375 Author: nverno Date: Mon Nov 27 08:55:23 2023 -0800 Fix typescript-ts-mode indentation for switch statements * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode): Add indentation rule for switch case and default keywords. (Bug#67488) diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index a2b16d1beea..0fbac709c63 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -107,6 +107,9 @@ typescript-ts-mode--indent-rules ((parent-is "member_expression") parent-bol typescript-ts-mode-indent-offset) ((parent-is "named_imports") parent-bol typescript-ts-mode-indent-offset) ((parent-is "statement_block") parent-bol typescript-ts-mode-indent-offset) + ((or (node-is "case") + (node-is "default")) + parent-bol typescript-ts-mode-indent-offset) ((parent-is "switch_case") parent-bol typescript-ts-mode-indent-offset) ((parent-is "switch_default") parent-bol typescript-ts-mode-indent-offset) ((parent-is "type_arguments") parent-bol typescript-ts-mode-indent-offset) diff --git a/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts b/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts index 20f423259b4..7b6185e0386 100644 --- a/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts @@ -45,6 +45,23 @@ const foo = () => { }; =-=-= +Name: Switch statement + +=-= +const foo = (x: string) => { + switch (x) { + case "a": + console.log(x); + return 1; + case "b": + return 2; + case "c": + default: + return 0; + } +}; +=-=-= + Code: (lambda () (setq indent-tabs-mode nil) commit ab9c62c2b33a2555df968d682abb8d093c476409 Author: Aymeric Agon-Rambosson Date: Sat Nov 25 10:07:49 2023 -0500 Repair `tab-first-completion` (bug#67158) Copyright-paperwork-exempt: yes * lisp/indent.el (indent-for-tab-command): Use `syntax-class` to fix longstanding thinko introduced back in 2020 in commit 64c851166442. Rework the check for `syn` because TAB always completed when `tab-first-completion` had value `word-or-paren` or `word-or-paren-or-punct`. (cherry picked from commit c20226a1ef5fbdfd3e71e2ef8654ee19994c0f2f) diff --git a/lisp/indent.el b/lisp/indent.el index 89de0a1d7d1..f64049d64b2 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -170,8 +170,7 @@ indent-for-tab-command (t (let ((old-tick (buffer-chars-modified-tick)) (old-point (point)) - (old-indent (current-indentation)) - (syn (syntax-after (point)))) + (old-indent (current-indentation))) ;; Indent the line. (or (not (eq (indent--funcall-widened indent-line-function) 'noindent)) @@ -185,19 +184,14 @@ indent-for-tab-command ((and (eq tab-always-indent 'complete) (eql old-point (point)) (eql old-tick (buffer-chars-modified-tick)) - (or (null tab-first-completion) - (eq last-command this-command) - (and (eq tab-first-completion 'eol) - (eolp)) - (and (memq tab-first-completion - '(word word-or-paren word-or-paren-or-punct)) - (not (eql 2 syn))) - (and (memq tab-first-completion - '(word-or-paren word-or-paren-or-punct)) - (not (or (eql 4 syn) - (eql 5 syn)))) - (and (eq tab-first-completion 'word-or-paren-or-punct) - (not (eql 1 syn))))) + (or (eq last-command this-command) + (let ((syn (syntax-class (syntax-after (point))))) + (pcase tab-first-completion + ('nil t) + ('eol (eolp)) + ('word (not (eql 2 syn))) + ('word-or-paren (not (memql syn '(2 4 5)))) + ('word-or-paren-or-punct (not (memq syn '(2 4 5 1)))))))) (completion-at-point)) ;; If a prefix argument was given, rigidly indent the following commit cd477bf07d8d996b90e02b5222248264cd6d5c39 Author: Eli Zaretskii Date: Wed Nov 29 16:14:03 2023 +0200 Fix behavior of 'split-root-window-*' with 'C-u' * lisp/window.el (split-root-window-below) (split-root-window-right): Fix the 'interactive' form to work with raw 'C-u' as well. (Bug#67459) (split-window-below, split-window-right, split-root-window-below) (split-root-window-right): Doc fix. diff --git a/lisp/window.el b/lisp/window.el index 16f16a75418..35de790d85e 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5668,7 +5668,8 @@ split-window-below If optional argument SIZE is omitted or nil, both windows get the same height, or close to it. If SIZE is positive, the upper \(selected) window gets SIZE lines. If SIZE is negative, the -lower (new) window gets -SIZE lines. +lower (new) window gets -SIZE lines. Interactively, SIZE is +the prefix numeric argument. If the variable `split-window-keep-point' is non-nil, both windows get the same value of point as the WINDOW-TO-SPLIT. @@ -5720,8 +5721,9 @@ split-root-window-below "Split root window of current frame in two. The current window configuration is retained in the top window, the lower window takes up the whole width of the frame. SIZE is -handled as in `split-window-below'." - (interactive "P") +handled as in `split-window-below', and interactively is the +prefix numeric argument." + (interactive "p") (split-window-below size (frame-root-window))) (defun split-window-right (&optional size window-to-split) @@ -5738,7 +5740,7 @@ split-window-right right-hand (new) window gets -SIZE columns. Here, SIZE includes the width of the window's scroll bar; if there are no scroll bars, it includes the width of the divider column to the window's -right, if any." +right, if any. Interactively, SIZE is the prefix numeric argument." (interactive `(,(when current-prefix-arg (prefix-numeric-value current-prefix-arg)) ,(selected-window))) @@ -5760,8 +5762,8 @@ split-root-window-right The current window configuration is retained within the left window, and a new window is created on the right, taking up the whole height of the frame. SIZE is treated as by -`split-window-right'." - (interactive "P") +`split-window-right' and interactively, is the prefix numeric argument." + (interactive "p") (split-window-right size (frame-root-window))) ;;; Balancing windows. commit 2e5d47f578aa0b60355cc23eda60e2b1d200dce9 Author: Eli Zaretskii Date: Wed Nov 29 15:04:49 2023 +0200 ; * doc/lispintro/emacs-lisp-intro.texi (copy-to-buffer): Fix last change. diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index ba93dfd3b91..7563d66bad1 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -5447,9 +5447,9 @@ copy-to-buffer exist, to create it. Then, the @code{with-current-buffer} function evaluates its body with that buffer temporarily current, after which it will switch back to the buffer we are at now@footnote{It is like -calling @code{(save-excursion (set-buffer ...) ...)} in one go, though -it is defined slightly differently which interested reader can find -out using @code{describe-function}}. +calling @w{@code{(save-excursion (set-buffer @dots{}) @dots{})}} in +one go, though it is defined slightly differently which interested +reader can find out using @code{describe-function}.}. (This demonstrates another way to shift the computer's attention but not the user's. The @code{append-to-buffer} function showed how to do commit c46700deb0aa8750f19e91d050e76c91fff8ce11 Author: Xiyue Deng Date: Tue Nov 28 17:44:31 2023 -0800 Add more text to clarify the behavior of 'with-current-buffer' * doc/lispintro/emacs-lisp-intro.texi (copy-to-buffer): Expand description of 'with-current-buffer'. (Bug#67521) Copyright-paperwork-exempt: yes diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index e4a0f585f69..ba93dfd3b91 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -5445,7 +5445,11 @@ copy-to-buffer function tells the computer to use the buffer with the name specified as the one to which you are copying, or if such a buffer does not exist, to create it. Then, the @code{with-current-buffer} function -evaluates its body with that buffer temporarily current. +evaluates its body with that buffer temporarily current, after which +it will switch back to the buffer we are at now@footnote{It is like +calling @code{(save-excursion (set-buffer ...) ...)} in one go, though +it is defined slightly differently which interested reader can find +out using @code{describe-function}}. (This demonstrates another way to shift the computer's attention but not the user's. The @code{append-to-buffer} function showed how to do commit 687c416ce9bfba00c771fca859762cee8e1a616b Author: Eli Zaretskii Date: Mon Nov 27 15:03:22 2023 +0200 Fix example in Emacs user manual * doc/emacs/custom.texi (Init Rebinding): Fix syntax of example. Reported by silarakta . (Bug#67474) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 2bc39095f3c..ba15e205b0f 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -1977,8 +1977,8 @@ Init Rebinding (keymap-set texinfo-mode-map "C-c p" 'backward-paragraph) (keymap-set texinfo-mode-map "C-c n" - 'forward-paragraph))) - (keymap-set texinfo-mode-map "C-c C-x x" nil) + 'forward-paragraph) + (keymap-set texinfo-mode-map "C-c C-x x" nil))) @end example @node Modifier Keys commit 835902179cdc080fe37224cc102245303044ddcd Author: Eli Zaretskii Date: Mon Nov 27 14:21:19 2023 +0200 ; Fix recent change in 'c-ts-mode' * lisp/progmodes/c-ts-mode.el (c-ts-mode--prev-line-match) (c-ts-mode--indent-styles): Fix wording of strings and comments. diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 1a7424db5d9..31a9d0fc886 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -356,7 +356,7 @@ c-ts-mode--standalone-grandparent parent (treesit-node-parent parent) bol args)) (defun c-ts-mode--prev-line-match (regexp) - "An indentation matcher that matches if prev line matches REGEXP." + "An indentation matcher that matches if previous line matches REGEXP." (lambda (_n _p bol &rest _) (save-excursion (goto-char bol) @@ -369,8 +369,8 @@ c-ts-mode--indent-styles MODE is either `c' or `cpp'." (let ((common `((c-ts-mode--for-each-tail-body-matcher prev-line c-ts-mode-indent-offset) - ;; If the user types "if (...)" and hit return, they expect - ;; the point on the empty line to be indented, this rule + ;; If the user types "if (...)" and hits RET, they expect + ;; point on the empty line to be indented; this rule ;; does that. ((and no-node (c-ts-mode--prev-line-match commit 169a5ff7524e518358e56a547bd0471ebc0069b3 Author: Daniel Martín Date: Mon Nov 27 00:22:20 2023 +0100 ; Fix typo in Gnus manual (bug#67469). diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 9c7ce4be216..268629e31fa 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -21593,7 +21593,7 @@ Searching Search queries can be specified one of two ways: either using the syntax of the engine responsible for the group you're searching, or using Gnus' generalized search syntax. Set the option -@code{gnus-search-use-parsed-queries} to a non-@code{nil} value to used the +@code{gnus-search-use-parsed-queries} to a non-@code{nil} value to use the generalized syntax. The advantage of this syntax is that, if you have multiple backends indexed by different engines, you don't need to remember which one you're searching---it's also possible to issue the commit 30841c71a5ddd70b63908fcbcdcc01ef82d8a770 Author: Michael Albinus Date: Mon Nov 27 08:34:56 2023 +0100 Mention Titankey in Tramp, which has passed the tests * doc/misc/tramp.texi (Frequently Asked Questions): * lisp/net/tramp.el (tramp-security-key-confirm-regexp): Mention also Titankey. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 0571c91115c..a4583a6074e 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -5069,7 +5069,7 @@ Frequently Asked Questions devices via special key types @option{*-sk}. @value{tramp} supports the additional handshaking messages for them. This requires at least @command{OpenSSH} 8.2, and a @acronym{FIDO} @acronym{U2F} compatible -security key, like yubikey, solokey, or nitrokey. +security key, like yubikey, solokey, nitrokey, or titankey. @item diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 8b1a49edbae..5e8d6bbcd08 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -759,8 +759,9 @@ tramp-antispoof-regexp ;; A security key requires the user physically to touch the device ;; with their finger. We must tell it to the user. -;; Added in OpenSSH 8.2. I've tested it with yubikey. Nitrokey, -;; which has also passed the tests, does not show such a message. +;; Added in OpenSSH 8.2. I've tested it with yubikey. Nitrokey and +;; Titankey, which have also passed the tests, do not show such a +;; message. (defcustom tramp-security-key-confirm-regexp (rx bol (* "\r") "Confirm user presence for key " (* nonl) (* (any "\r\n"))) "Regular expression matching security key confirmation message. commit dab7cc241f426af3c9fe901954fe48e415dcf75a Author: Yuan Fu Date: Sun Nov 26 17:42:51 2023 -0800 Fix c-ts-mode indentation after if/else (bug#67417) * lisp/progmodes/c-ts-mode.el: (c-ts-mode--prev-line-match): New function. (c-ts-mode--indent-styles): Add a rule for the empty line after if/else/for/etc. diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 5975057518e..1a7424db5d9 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -355,11 +355,27 @@ c-ts-mode--standalone-grandparent (apply (alist-get 'standalone-parent treesit-simple-indent-presets) parent (treesit-node-parent parent) bol args)) +(defun c-ts-mode--prev-line-match (regexp) + "An indentation matcher that matches if prev line matches REGEXP." + (lambda (_n _p bol &rest _) + (save-excursion + (goto-char bol) + (forward-line -1) + (back-to-indentation) + (looking-at-p regexp)))) + (defun c-ts-mode--indent-styles (mode) "Indent rules supported by `c-ts-mode'. MODE is either `c' or `cpp'." (let ((common `((c-ts-mode--for-each-tail-body-matcher prev-line c-ts-mode-indent-offset) + ;; If the user types "if (...)" and hit return, they expect + ;; the point on the empty line to be indented, this rule + ;; does that. + ((and no-node + (c-ts-mode--prev-line-match + ,(rx (or "if" "else" "while" "do" "for")))) + prev-line c-ts-mode-indent-offset) ((parent-is "translation_unit") column-0 0) ((query "(ERROR (ERROR)) @indent") column-0 0) commit f8d9dc26c78366e1f2de9dd847fe4744f607748d Author: Yuan Fu Date: Sun Nov 26 16:38:41 2023 -0800 Fix indentation for else clause in c-ts-mode (bug#67417) * lisp/progmodes/c-ts-mode.el: (c-ts-mode--indent-styles): Add indentation for children of else_clause. * test/lisp/progmodes/c-ts-mode-resources/indent.erts: (Name): Add test for else-break. Also make the test such that it needs to indent correctly from scratch (rather than maintaining the already correct indentation.) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 8660b65f309..5975057518e 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -452,6 +452,7 @@ c-ts-mode--indent-styles ;; These rules are for cases where the body is bracketless. ;; Tested by the "Bracketless Simple Statement" test. ((parent-is "if_statement") standalone-parent c-ts-mode-indent-offset) + ((parent-is "else_clause") standalone-parent c-ts-mode-indent-offset) ((parent-is "for_statement") standalone-parent c-ts-mode-indent-offset) ((parent-is "while_statement") standalone-parent c-ts-mode-indent-offset) ((parent-is "do_statement") standalone-parent c-ts-mode-indent-offset) diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent.erts b/test/lisp/progmodes/c-ts-mode-resources/indent.erts index 221b3d809af..bac76fb7378 100644 --- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts @@ -149,6 +149,21 @@ for (int i = 0; Name: Bracketless Simple Statement +=-= +for (int i = 0; i < 5; i++) +continue; + +while (true) +return 1; + +do +i++; +while (true) + +if (true) +break; +else +break; =-= for (int i = 0; i < 5; i++) continue; @@ -159,6 +174,11 @@ while (true) do i++; while (true) + +if (true) + break; +else + break; =-=-= Name: Nested If-Else commit bf0b0c9c73d4793beb11e6125496d0e72d4dd67a Author: Joseph Turner Date: Sat Nov 25 14:57:45 2023 -0800 Ensure that directory is expanded in package-vc-checkout * lisp/emacs-lisp/package-vc.el (package-vc-checkout): Expand DIRECTORY. (Bug#66115) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index c7a30736e32..2a5f14b3ee3 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -829,6 +829,7 @@ package-vc-checkout (lambda (dir) (or (not (file-exists-p dir)) (directory-empty-p dir)))) (and current-prefix-arg :last-release)))) + (setf directory (expand-file-name directory)) (package-vc--archives-initialize) (let ((pkg-spec (or (package-vc--desc->spec pkg-desc) (and-let* ((extras (package-desc-extras pkg-desc)) commit e551dd72f790c0583686f2750fc9c3aa3c44f5a4 Author: Ulrich Müller Date: Sat Nov 25 15:26:52 2023 +0100 * etc/PROBLEMS: Add entry about pinentry with gpgsm. (Bug#67012) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 126e876109a..71cade6343c 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -534,6 +534,16 @@ 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). +*** EasyPG loopback pinentry does not work with gpgsm. + +This happens with the 'gpgsm' command from all versions of GnuPG. +EasyPG relies on the machine-parseable interface that is provided by +'gpg2' with option '--status-fd', but gpgsm does not support this. + +As a workaround, input the passphrase with a GUI-capable pinentry +program like 'pinentry-gnome' or 'pinentry-qt5'. Alternatively, you +can use the 'pinentry' package from Emacs 25. + *** Emacs running on WSL receives stray characters as input. For example, you could see Emacs inserting 'z' characters even though