<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/lisp/progmodes, branch scratch/annotation-function-improvements</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 find invocation for macOS (Bug#48471).</title>
<updated>2021-05-23T11:03:49+00:00</updated>
<author>
<name>Philipp Stephani</name>
</author>
<published>2021-05-17T19:59:57+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=2e55201b8085d64c76d9a35bffff90a02133647e'/>
<id>2e55201b8085d64c76d9a35bffff90a02133647e</id>
<content type='text'>
* lisp/progmodes/project.el (project--files-in-directory): Instead of
appending a slash (which doesn't work well with macOS find), remove
trailing slash and pass -H instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/progmodes/project.el (project--files-in-directory): Instead of
appending a slash (which doesn't work well with macOS find), remove
trailing slash and pass -H instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>Document bug-reference setup for 3rd-party packages</title>
<updated>2021-05-22T17:06:57+00:00</updated>
<author>
<name>Tassilo Horn</name>
</author>
<published>2021-05-22T17:06:57+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=62e2dce3a99cffb174240eed633196058e3c18a2'/>
<id>62e2dce3a99cffb174240eed633196058e3c18a2</id>
<content type='text'>
* doc/emacs/maintaining.texi (Bug Reference): Add section explaining
adding support for third-party packages.
* lisp/progmodes/bug-reference.el (bug-reference-maybe-setup-from-vc)
(bug-reference-maybe-setup-from-mail)
(bug-reference-maybe-setup-from-irc): Rename from
bug-reference--maybe-setup-from-*, i.e., un-privatize them because
they are advertised in the docs now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* doc/emacs/maintaining.texi (Bug Reference): Add section explaining
adding support for third-party packages.
* lisp/progmodes/bug-reference.el (bug-reference-maybe-setup-from-vc)
(bug-reference-maybe-setup-from-mail)
(bug-reference-maybe-setup-from-irc): Rename from
bug-reference--maybe-setup-from-*, i.e., un-privatize them because
they are advertised in the docs now.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add documentation about bug-reference auto-setup.</title>
<updated>2021-05-21T21:15:46+00:00</updated>
<author>
<name>Tassilo Horn</name>
</author>
<published>2021-05-21T21:11:43+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=a3de48687eb28121f3dbfc20be19bd06c4cd6e98'/>
<id>a3de48687eb28121f3dbfc20be19bd06c4cd6e98</id>
<content type='text'>
* doc/emacs/maintaining.texi (Bug Reference): Add documentation about
the automatic setup.
* lisp/progmodes/bug-reference.el
(bug-reference-setup-from-irc-alist): Remove doubling in docstring.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* doc/emacs/maintaining.texi (Bug Reference): Add documentation about
the automatic setup.
* lisp/progmodes/bug-reference.el
(bug-reference-setup-from-irc-alist): Remove doubling in docstring.
</pre>
</div>
</content>
</entry>
<entry>
<title>(completing-read): Add `group-function` to the completion metadata</title>
<updated>2021-05-20T17:50:23+00:00</updated>
<author>
<name>Daniel Mendler</name>
</author>
<published>2021-04-25T11:07:29+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=443d9efc9524be6aff5d9703b81a821b3bb12f35'/>
<id>443d9efc9524be6aff5d9703b81a821b3bb12f35</id>
<content type='text'>
A completion table can specify a `group-function` in its metadata.
The group function takes two arguments, a completion candidate and a
transform argument.  The group function is used to group the
candidates after sorting and to enhance the completion UI with group
titles.

If the transform argument is nil, the function must return the title
of the group to which the completion candidate belongs.  The function
may also return nil if the candidate does not belong to a group.

If the transform argument is non-nil, the function must return the
transformed candidate.  For example, the transformation allows to
remove a redundant part of the candidate, which is then displayed in
the title.

The grouping functionality is guarded by the customizable variable
`completions-group` and turned off by default for the *Completions*
buffer.

The specific form of the `group-function` has been chosen in order to
allow allocation-free grouping.  This is important for completion UIs,
which continously update the displayed set of candidates (Icomplete,
Vertico, Ivy, etc.).  Only when the transform argument is non-nil the
candidate transformation is performed, which may involve a string
allocation as done in the function `xref--completing-read-group`.

The function `xref-show-definitions-completing-read` makes use of the
`group-function`, by moving the file name prefix to the title.  If
grouping is enabled, the *Completions* are displayed as
"linenum:summary" instead of "file:linenum:summary".  This way the
*Completions* buffer resembles the *Occur* buffer.

* doc/lispref/minibuf.texi: Add documentation.

* lisp/minibuffer.el (completion-metadata): Describe the
`group-function` in the docstring.
(completions-group): Add guard variable, off by default.
(completions-group-format): Add variable defining the format string
for the group titles.
(completions-group-title): Add face used by `completions-group-format`
for the group titles.
(completions-group-separator): Add face used by
`completions-group-format` for the group separator lines.
(minibuffer--group-by): New grouping function.
(minibuffer-completion-help): Use it.
(display-completion-list): Add optional GROUP-FUN argument.
(completion--insert-strings): Add optional GROUP-FUN argument.  Insert
group titles if `completions-format` is `one-column`.  Transform each
candidate with the GROUP-FUN.  Attach the untransformed candidate to
the property `completion--string`.

* lisp/simple.el (choose-completion): Retrieve the untransformed
completion candidate from the property `completion--string`.

* lisp/progmodes/xref.el:
(xref--completing-read-group): New grouping function.
(xref-show-definitions-completing-read): Use it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A completion table can specify a `group-function` in its metadata.
The group function takes two arguments, a completion candidate and a
transform argument.  The group function is used to group the
candidates after sorting and to enhance the completion UI with group
titles.

If the transform argument is nil, the function must return the title
of the group to which the completion candidate belongs.  The function
may also return nil if the candidate does not belong to a group.

If the transform argument is non-nil, the function must return the
transformed candidate.  For example, the transformation allows to
remove a redundant part of the candidate, which is then displayed in
the title.

The grouping functionality is guarded by the customizable variable
`completions-group` and turned off by default for the *Completions*
buffer.

The specific form of the `group-function` has been chosen in order to
allow allocation-free grouping.  This is important for completion UIs,
which continously update the displayed set of candidates (Icomplete,
Vertico, Ivy, etc.).  Only when the transform argument is non-nil the
candidate transformation is performed, which may involve a string
allocation as done in the function `xref--completing-read-group`.

The function `xref-show-definitions-completing-read` makes use of the
`group-function`, by moving the file name prefix to the title.  If
grouping is enabled, the *Completions* are displayed as
"linenum:summary" instead of "file:linenum:summary".  This way the
*Completions* buffer resembles the *Occur* buffer.

* doc/lispref/minibuf.texi: Add documentation.

* lisp/minibuffer.el (completion-metadata): Describe the
`group-function` in the docstring.
(completions-group): Add guard variable, off by default.
(completions-group-format): Add variable defining the format string
for the group titles.
(completions-group-title): Add face used by `completions-group-format`
for the group titles.
(completions-group-separator): Add face used by
`completions-group-format` for the group separator lines.
(minibuffer--group-by): New grouping function.
(minibuffer-completion-help): Use it.
(display-completion-list): Add optional GROUP-FUN argument.
(completion--insert-strings): Add optional GROUP-FUN argument.  Insert
group titles if `completions-format` is `one-column`.  Transform each
candidate with the GROUP-FUN.  Attach the untransformed candidate to
the property `completion--string`.

* lisp/simple.el (choose-completion): Retrieve the untransformed
completion candidate from the property `completion--string`.

* lisp/progmodes/xref.el:
(xref--completing-read-group): New grouping function.
(xref-show-definitions-completing-read): Use it.
</pre>
</div>
</content>
</entry>
<entry>
<title>* lisp/progmodes/sql.el: `sql-postgres-statement-starters' defcustom</title>
<updated>2021-05-19T13:07:52+00:00</updated>
<author>
<name>Ingo Lohmar</name>
</author>
<published>2021-05-19T13:02:33+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=dac694b8bb1e5a31a50215ceee6b064ae7c5001f'/>
<id>dac694b8bb1e5a31a50215ceee6b064ae7c5001f</id>
<content type='text'>
Recognize common table expression as statement start in Postgres.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recognize common table expression as statement start in Postgres.
</pre>
</div>
</content>
</entry>
<entry>
<title>* lisp/progmodes/js.el (js--make-framework-matcher): Use a closure</title>
<updated>2021-05-19T00:30:08+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2021-05-19T00:30:08+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=1276ba75eb0d308b76df34c522bb0d6e059c146e'/>
<id>1276ba75eb0d308b76df34c522bb0d6e059c146e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>* lisp/progmodes/gud.el (gud-tooltip-tips): Use proper closures</title>
<updated>2021-05-19T00:21:51+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2021-05-19T00:21:51+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=942cbc4deaa6c3ec9b142e6d27f92516097ac24b'/>
<id>942cbc4deaa6c3ec9b142e6d27f92516097ac24b</id>
<content type='text'>
Also prefer #' to quote function names.

(jdb): Fix $ =&gt; \'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also prefer #' to quote function names.

(jdb): Fix $ =&gt; \'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Visually truncate excessively long lines in Xref</title>
<updated>2021-05-18T00:36:40+00:00</updated>
<author>
<name>Dmitry Gutov</name>
</author>
<published>2021-05-18T00:33:29+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=d83db639d379df142482bf82d7eb020d2ec1ae73'/>
<id>d83db639d379df142482bf82d7eb020d2ec1ae73</id>
<content type='text'>
* lisp/progmodes/xref.el (xref-truncation-width): New option.
(xref--apply-truncation): New function.
(xref--insert-xrefs): Use it (bug#46859).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/progmodes/xref.el (xref-truncation-width): New option.
(xref--apply-truncation): New function.
(xref--insert-xrefs): Use it (bug#46859).
</pre>
</div>
</content>
</entry>
<entry>
<title>prepend newline in sqli buffer</title>
<updated>2021-05-16T14:32:10+00:00</updated>
<author>
<name>Ingo Lohmar</name>
</author>
<published>2021-05-16T14:32:10+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5a82d4ce5add6d5eb3c5071537eef950e583e699'/>
<id>5a82d4ce5add6d5eb3c5071537eef950e583e699</id>
<content type='text'>
(sql-remove-continuation-prompt, sql-send-string): Move newline
insertion.

Previously, the preoutput filter `sql-remove-continuation-prompt'
inserted a leading newline in the interactive SQL buffer if it decided
that is has to remove continuation prompts and that it had found all
it was looking for.

1) This filter function was a doubtful place to do that (arguably, its
   name does not suggest any action like this).
2) The behavior worked inconsistently, eg, when sending a single-line
   "SELECT" statement, because it only ran when the filter function
   needed to remove any prompts (for example, not when sending a
   region without newlines).

   This can lead to misaligned table headers, which explains why
   emacswiki and stackoverflow both present several fixes to this
   behavior.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(sql-remove-continuation-prompt, sql-send-string): Move newline
insertion.

Previously, the preoutput filter `sql-remove-continuation-prompt'
inserted a leading newline in the interactive SQL buffer if it decided
that is has to remove continuation prompts and that it had found all
it was looking for.

1) This filter function was a doubtful place to do that (arguably, its
   name does not suggest any action like this).
2) The behavior worked inconsistently, eg, when sending a single-line
   "SELECT" statement, because it only ran when the filter function
   needed to remove any prompts (for example, not when sending a
   region without newlines).

   This can lead to misaligned table headers, which explains why
   emacswiki and stackoverflow both present several fixes to this
   behavior.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add bug-reference-mode-force-auto-setup</title>
<updated>2021-05-16T14:19:57+00:00</updated>
<author>
<name>Tassilo Horn</name>
</author>
<published>2021-05-16T14:19:57+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=b6d02dc3766f30078fdf7778951e2be78589f446'/>
<id>b6d02dc3766f30078fdf7778951e2be78589f446</id>
<content type='text'>
* lisp/progmodes/bug-reference.el
(bug-reference-try-setup-from-rmail): Match the Rmail mbox filename
against GROUP-REGEXP in bug-reference-setup-from-mail-alist.
(bug-reference-mode-force-auto-setup): New function which forces
auto-setup even if bug-reference-bug-regexp and
bug-reference-url-format are already set.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/progmodes/bug-reference.el
(bug-reference-try-setup-from-rmail): Match the Rmail mbox filename
against GROUP-REGEXP in bug-reference-setup-from-mail-alist.
(bug-reference-mode-force-auto-setup): New function which forces
auto-setup even if bug-reference-bug-regexp and
bug-reference-url-format are already set.
</pre>
</div>
</content>
</entry>
</feed>
