<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs, branch feature/xref-find-extra</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Fix eglot-specific commands</title>
<updated>2023-11-27T15:17:13+00:00</updated>
<author>
<name>Dmitry Gutov</name>
</author>
<published>2023-11-27T15:17:13+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=a5487e92e9978da5426dcaf3ddc97383b905d844'/>
<id>a5487e92e9978da5426dcaf3ddc97383b905d844</id>
<content type='text'>
* lisp/progmodes/eglot.el (eglot-find-declaration)
(eglot-find-implementation, eglot-find-typeDefinition):
Fix the last argument in xref-find-all-definitions calls.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/progmodes/eglot.el (eglot-find-declaration)
(eglot-find-implementation, eglot-find-typeDefinition):
Fix the last argument in xref-find-all-definitions calls.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use the renamed 'xref-find-all-definitions' in Eglot</title>
<updated>2023-11-25T02:12:01+00:00</updated>
<author>
<name>Dmitry Gutov</name>
</author>
<published>2023-11-25T02:12:01+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=93ee5cd076e716936e002889b3f4bf676c478ba7'/>
<id>93ee5cd076e716936e002889b3f4bf676c478ba7</id>
<content type='text'>
* lisp/progmodes/eglot.el (eglot-find-declaration)
(eglot-find-implementation, eglot-find-typeDefinition):
Use the renamed 'xref-find-all-definitions'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/progmodes/eglot.el (eglot-find-declaration)
(eglot-find-implementation, eglot-find-typeDefinition):
Use the renamed 'xref-find-all-definitions'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add per-kind commands with bindings</title>
<updated>2023-11-25T02:08:06+00:00</updated>
<author>
<name>Dmitry Gutov</name>
</author>
<published>2023-11-24T01:19:53+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=55f2657ca4b64c9513b47796004c7731e120ad43'/>
<id>55f2657ca4b64c9513b47796004c7731e120ad43</id>
<content type='text'>
* lisp/bindings.el (esc-map): Remove the ' binding.

* lisp/progmodes/xref.el (xref-find-declarations)
(xref-find-implementations, xref-find-type-definitions): New
commands.  Add bindindgs as well.

* lisp/progmodes/xref.el (xref-find-all-definitions): Change to
the slightly longer binding M-' M-'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/bindings.el (esc-map): Remove the ' binding.

* lisp/progmodes/xref.el (xref-find-declarations)
(xref-find-implementations, xref-find-type-definitions): New
commands.  Add bindindgs as well.

* lisp/progmodes/xref.el (xref-find-all-definitions): Change to
the slightly longer binding M-' M-'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename xref-find-definitions-by-kind to xref-find-all-definitions</title>
<updated>2023-11-25T02:08:06+00:00</updated>
<author>
<name>Dmitry Gutov</name>
</author>
<published>2023-11-24T01:01:59+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=1de548833d2c31afd3afe3180870b3c6d575f00e'/>
<id>1de548833d2c31afd3afe3180870b3c6d575f00e</id>
<content type='text'>
* lisp/progmodes/xref.el (xref-find-all-definitions): Rename from
'xref-find-definitions-by-kind' and change accordingly.  Meaning
it collects definitions from all "kinds" by default (passing
through 'delete-dups', which only works if the items are
structurally the same) and asks for specific KIND only when called
with a prefix argument.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/progmodes/xref.el (xref-find-all-definitions): Rename from
'xref-find-definitions-by-kind' and change accordingly.  Meaning
it collects definitions from all "kinds" by default (passing
through 'delete-dups', which only works if the items are
structurally the same) and asks for specific KIND only when called
with a prefix argument.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename the xref-backend-extra-* methods to use the term definition</title>
<updated>2023-11-25T02:08:06+00:00</updated>
<author>
<name>Dmitry Gutov</name>
</author>
<published>2023-11-24T00:18:59+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=49c435914e4919dd213d641bb9e9c4f9f234ea60'/>
<id>49c435914e4919dd213d641bb9e9c4f9f234ea60</id>
<content type='text'>
Because they are not "extra", and to a large extent will contain
"kinds" already included in the 'xref-find-definitions' output.

* lisp/progmodes/eglot.el (eglot--xref-kinds-alist): Remove the entry
for 'references' because of differing semantics.  Simplify the names
of the keys as well (remove the 'eglot--xref-' prefix) because these
are shown to the user.  They won't be sent to any other backend, so
private names seem unnecessary.  Use strings, to ensure specific type.

* lisp/progmodes/eglot.el (xref-backend-definitions-by-kind):
Skip 'intern'.

* lisp/progmodes/xref.el (xref-backend-definition-kinds):
Rename from 'xref-backend-extra-kinds'.  Update all references.
(xref-xref-backend-definitions-by-kind): Rename from
'xref-backend-extra-defs'.  Update all references.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because they are not "extra", and to a large extent will contain
"kinds" already included in the 'xref-find-definitions' output.

* lisp/progmodes/eglot.el (eglot--xref-kinds-alist): Remove the entry
for 'references' because of differing semantics.  Simplify the names
of the keys as well (remove the 'eglot--xref-' prefix) because these
are shown to the user.  They won't be sent to any other backend, so
private names seem unnecessary.  Use strings, to ensure specific type.

* lisp/progmodes/eglot.el (xref-backend-definitions-by-kind):
Skip 'intern'.

* lisp/progmodes/xref.el (xref-backend-definition-kinds):
Rename from 'xref-backend-extra-kinds'.  Update all references.
(xref-xref-backend-definitions-by-kind): Rename from
'xref-backend-extra-defs'.  Update all references.
</pre>
</div>
</content>
</entry>
<entry>
<title>Eglot: use new xref-find-extra feature of Xref</title>
<updated>2023-11-25T02:08:05+00:00</updated>
<author>
<name>João Távora</name>
</author>
<published>2023-11-05T11:01:49+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=279203199a2d10677e42747476b39394a4184a78'/>
<id>279203199a2d10677e42747476b39394a4184a78</id>
<content type='text'>
This removes the need of some Eglot hacks to implement the commands
eglot-find-declaration, eglot-find-implementation, and
eglot-find-typeDefinition.

It also allows the new command xref-find-extra to find different kinds
of definitions.

* lisp/progmodes/eglot.el (eglot--xref-kinds-alist): New variable.
(eglot-find-declaration, eglot-find-implementation)
(eglot-find-typeDefinition): Use xref-find-extra.
(xref-backend-definitions): Minor tweak.
(xref-backend-references): Don't use eglot--lsp-xref-refs.
(eglot--lsp-xref-helper): Delete this helper.
(eglot--lsp-xref-refs): Delete this variable.
(xref-backend-extra-kinds, xref-backend-extra-defs): New implementation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes the need of some Eglot hacks to implement the commands
eglot-find-declaration, eglot-find-implementation, and
eglot-find-typeDefinition.

It also allows the new command xref-find-extra to find different kinds
of definitions.

* lisp/progmodes/eglot.el (eglot--xref-kinds-alist): New variable.
(eglot-find-declaration, eglot-find-implementation)
(eglot-find-typeDefinition): Use xref-find-extra.
(xref-backend-definitions): Minor tweak.
(xref-backend-references): Don't use eglot--lsp-xref-refs.
(eglot--lsp-xref-helper): Delete this helper.
(eglot--lsp-xref-refs): Delete this variable.
(xref-backend-extra-kinds, xref-backend-extra-defs): New implementation.
</pre>
</div>
</content>
</entry>
<entry>
<title>Xref: make xref-find-extra useful for non-interactive use</title>
<updated>2023-11-25T02:08:05+00:00</updated>
<author>
<name>João Távora</name>
</author>
<published>2023-11-05T10:54:17+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=963ccb4a1fe9397bf02674fe42990eb9f1ba2a11'/>
<id>963ccb4a1fe9397bf02674fe42990eb9f1ba2a11</id>
<content type='text'>
* lisp/progmodes/xref.el (xref-find-extra): Put interactive parts
inside interactive spec.  Make versatile for non-interactive use.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/progmodes/xref.el (xref-find-extra): Put interactive parts
inside interactive spec.  Make versatile for non-interactive use.
</pre>
</div>
</content>
</entry>
<entry>
<title>Xref: add xref-find-extra command</title>
<updated>2023-11-25T02:08:05+00:00</updated>
<author>
<name>Dmitry Gutov</name>
</author>
<published>2023-11-05T00:03:00+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=26121b4c49a3cc65f309a1cef87e38e35acefa0d'/>
<id>26121b4c49a3cc65f309a1cef87e38e35acefa0d</id>
<content type='text'>
* lisp/progmodes/elisp-mode.el (xref-backend-extra-kinds):
Implement for elisp backend.

* lisp/progmodes/xref.el (xref-backend-extra-kinds)
(xref-backend-extra-defs): New generic functions.
(xref-prompt-for-identifier): Tweak.
(xref--create-fetcher): Rework.
(xref-find-extra): New command.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/progmodes/elisp-mode.el (xref-backend-extra-kinds):
Implement for elisp backend.

* lisp/progmodes/xref.el (xref-backend-extra-kinds)
(xref-backend-extra-defs): New generic functions.
(xref-prompt-for-identifier): Tweak.
(xref--create-fetcher): Rework.
(xref-find-extra): New command.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use the project--list as history when prompting for a project</title>
<updated>2023-11-25T01:59:21+00:00</updated>
<author>
<name>Spencer Baugh</name>
</author>
<published>2023-11-21T15:11:52+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=505edceaf44a9d4e072975473170a674b949e504'/>
<id>505edceaf44a9d4e072975473170a674b949e504</id>
<content type='text'>
The project--list is already ordered such that the most recently used
projects are at the front.  Now we use it as the minibuffer history
when prompting for a project.

To avoid savehist from picking up project--list as a minibuffer
history variable and overriding our own persistence mechanism, we
don't pass project--list directly as a history variable, but instead
pass project--dir-history or project--name-history, dynamically-bound
to an appropriate value.  project--dir-history and
project--name-history won't be persisted since they're always unbound
at the top level; but if they are persisted anyway somehow, it won't
affect us.

If we later find a way to rely on savehist for persistence instead of
having our own mechanism, we can change the in-memory format of
project--list to be just a list of directories, and our explicit calls
to project--add-dir can be replaced by let-binding
history-delete-duplicates=t, history-length=t.

* lisp/progmodes/project.el (project--remember-dir): Add.
(project-remember-project): Use project--remember-dir.
(project--name-history, project-prompt-project-name)
(project--dir-history, project-prompt-project-dir): Pass a
preprocessed project--list as HIST to completing-read.  (bug#67310)
(project-switch-project): Call project--remember-dir.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The project--list is already ordered such that the most recently used
projects are at the front.  Now we use it as the minibuffer history
when prompting for a project.

To avoid savehist from picking up project--list as a minibuffer
history variable and overriding our own persistence mechanism, we
don't pass project--list directly as a history variable, but instead
pass project--dir-history or project--name-history, dynamically-bound
to an appropriate value.  project--dir-history and
project--name-history won't be persisted since they're always unbound
at the top level; but if they are persisted anyway somehow, it won't
affect us.

If we later find a way to rely on savehist for persistence instead of
having our own mechanism, we can change the in-memory format of
project--list to be just a list of directories, and our explicit calls
to project--add-dir can be replaced by let-binding
history-delete-duplicates=t, history-length=t.

* lisp/progmodes/project.el (project--remember-dir): Add.
(project-remember-project): Use project--remember-dir.
(project--name-history, project-prompt-project-name)
(project--dir-history, project-prompt-project-dir): Pass a
preprocessed project--list as HIST to completing-read.  (bug#67310)
(project-switch-project): Call project--remember-dir.
</pre>
</div>
</content>
</entry>
<entry>
<title>Optionally allow substitution patterns in erc-prompt</title>
<updated>2023-11-24T21:38:52+00:00</updated>
<author>
<name>F. Jason Park</name>
</author>
<published>2021-10-07T12:26:36+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=2ed9c9f1b3230bb99b60646fe1cf46664453f693'/>
<id>2ed9c9f1b3230bb99b60646fe1cf46664453f693</id>
<content type='text'>
* etc/ERC-NEWS: Add entry for `erc-prompt-format'.
* lisp/erc/erc-compat.el (erc-compat--defer-format-spec-in-buffer):
New macro to wrap `format-spec' specification values in functions that
run in the current buffer and fall back to the empty string.
* lisp/erc/erc.el (erc-prompt): Add predefined Custom choice for
function type in `erc-prompt-format'.
(erc--prompt-format-face-example): New "pre-propertized" value for
option `erc-prompt-format'.
(erc-prompt-format): New companion option for `erc-prompt' choice
`erc-prompt-format'.  New function of the same name to perform format
substitutions and serve as a Custom choice value for `erc-prompt'.
Based on work and ideas originally proposed by Stefan Kangas.
(erc--away-indicator, erc-away-status-indicator,
erc--format-away-indicator): New formatting function and helper
variables for displaying short away status.
(erc--user-modes-indicator): New variable.
(erc--format-user-modes): New function.
(erc--format-channel-status-prefix): New function.
(erc--format-modes): New function.
* test/lisp/erc/erc-scenarios-prompt-format.el: New file.  (Bug#51082)

Co-authored-by: Stefan Kangas &lt;stefankangas@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* etc/ERC-NEWS: Add entry for `erc-prompt-format'.
* lisp/erc/erc-compat.el (erc-compat--defer-format-spec-in-buffer):
New macro to wrap `format-spec' specification values in functions that
run in the current buffer and fall back to the empty string.
* lisp/erc/erc.el (erc-prompt): Add predefined Custom choice for
function type in `erc-prompt-format'.
(erc--prompt-format-face-example): New "pre-propertized" value for
option `erc-prompt-format'.
(erc-prompt-format): New companion option for `erc-prompt' choice
`erc-prompt-format'.  New function of the same name to perform format
substitutions and serve as a Custom choice value for `erc-prompt'.
Based on work and ideas originally proposed by Stefan Kangas.
(erc--away-indicator, erc-away-status-indicator,
erc--format-away-indicator): New formatting function and helper
variables for displaying short away status.
(erc--user-modes-indicator): New variable.
(erc--format-user-modes): New function.
(erc--format-channel-status-prefix): New function.
(erc--format-modes): New function.
* test/lisp/erc/erc-scenarios-prompt-format.el: New file.  (Bug#51082)

Co-authored-by: Stefan Kangas &lt;stefankangas@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
