unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Mendler <mail@daniel-mendler.de>
To: Eli Zaretskii <eliz@gnu.org>, Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 61274@debbugs.gnu.org
Subject: bug#61274: 29.0.60; dabbrev-capf signals errors
Date: Sat, 4 Feb 2023 18:30:41 +0100	[thread overview]
Message-ID: <c8e01b85-1d3b-17b9-0b8a-e6aeccc38569@daniel-mendler.de> (raw)
In-Reply-To: <83fsbltko3.fsf@gnu.org>

On 2/4/23 18:17, Eli Zaretskii wrote:
>> From: Stefan Monnier <monnier@iro.umontreal.ca>
>> Cc: Daniel Mendler <mail@daniel-mendler.de>,  61274@debbugs.gnu.org
>> Date: Sat, 04 Feb 2023 12:13:27 -0500
>>
>>> maybe dabbrev-capf is unsuitable to serve as the value of
>>> completion-at-point-functions?
>>
>> As the name implies, it's a function designed specifically for use on
>> `completion-at-point-functions`.  Maybe dabbrev is not well adapted
>> for use within a normal completion UI, but `dabbrev-capf` should do its
>> best to obey the rules of `completion-at-point-functions`, so I think
>> the behavior Daniel suggests is indeed what `dabbrev-capf` should try
>> to do.
> 
> Then there's something here that puzzles me: the recipe presented by
> Daniel is basically identical to what dabbrev-completion does.  And
> yet dabbrev-completion produces different effects when invoked in the
> same buffer with the same text at point.  What is responsible for the
> difference in behavior?

You mean that the stringp type error does not occur? There is some code
in `dabbrev-completion' which sets up Dabbrev (resets variables etc), so
this is likely causing the difference.

However the second issue still occurs even with `dabbrev-completion'.
When I execute `dabbrev-completion' in a buffer where no completions are
found, I get the message "dabbrev--abbrev-at-point: No possible
abbreviation preceding point", while the message should be the usual "No
match" from `completion-at-point'. At this point we are moving into
problematic territory however, since Stefan reimplemented
`dabbrev-completion' based on `dabbrev-capf'. We may want a more
specific error message for `dabbev-completion', while we don't want any
errors signalled by `dabbrev-capf', such that it conforms to the
`completion-at-point-functions' contract.

Daniel





  reply	other threads:[~2023-02-04 17:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-04 11:03 bug#61274: 29.0.60; dabbrev-capf signals errors Daniel Mendler
2023-02-04 13:16 ` Eli Zaretskii
2023-02-04 16:03   ` Daniel Mendler
2023-02-04 16:54     ` Eli Zaretskii
2023-02-04 17:13       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-04 17:17         ` Eli Zaretskii
2023-02-04 17:30           ` Daniel Mendler [this message]
2023-02-04 18:09             ` Eli Zaretskii
2023-02-04 18:21               ` Daniel Mendler
2023-02-04 17:23       ` Daniel Mendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c8e01b85-1d3b-17b9-0b8a-e6aeccc38569@daniel-mendler.de \
    --to=mail@daniel-mendler.de \
    --cc=61274@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).