unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#61274: 29.0.60; dabbrev-capf signals errors
@ 2023-02-04 11:03 Daniel Mendler
  2023-02-04 13:16 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Mendler @ 2023-02-04 11:03 UTC (permalink / raw)
  To: 61274; +Cc: monnier

The completion-at-point-function `dabbrev-capf' sometimes signals
errors. It would be good if the function would not do that but return
nil if no completions are found, such that the next Capf from the list
of completion functions gets its chance to run.

1. Start emacs -Q
2. Evaluate (require 'dabbrev).
3. Evaluate (setq completion-at-point-functions '(dabbrev-capf)) in the
scratch buffer.
4. Type `x M-TAB` in the scratch buffer. I observe the following error:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  dabbrev--goto-start-of-abbrev()
  dabbrev--abbrev-at-point()
  dabbrev-capf()
  completion--capf-wrapper(dabbrev-capf all)
  completion-at-point()
  funcall-interactively(completion-at-point)
  command-execute(completion-at-point)

Furthermore if no completions are found `dabbrev-capf' signals an error.
The messages buffer will then contain:

Scanning for dabbrevs...done
completion--some: No dynamic expansion for "xyz" found

In GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.16.0, Xaw scroll bars) of 2023-01-26 built on projects
Repository revision: f8c95d1a7681e861fc22d2a040cda0ddfe23eff4
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-02-04 18:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2023-02-04 18:09             ` Eli Zaretskii
2023-02-04 18:21               ` Daniel Mendler
2023-02-04 17:23       ` Daniel Mendler

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).