unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#72425: 29.2.50; substring (and other PCM styles) fails with candidates containing newlines
@ 2024-08-02 16:14 Spencer Baugh
  2024-08-02 16:17 ` Spencer Baugh
  2024-08-02 16:24 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 7+ messages in thread
From: Spencer Baugh @ 2024-08-02 16:14 UTC (permalink / raw)
  To: 72425; +Cc: Dmitry Gutov, Stefan Monnier


1. emacs -Q
2. (let ((completion-styles '(substring)))
     (completing-read ":" '("foo1bar" "foo2bar") nil nil "bar"))
3. Press TAB
4. foo1bar and foo2bar are suggested as completion candidates, because
   they contain "bar" as a substring.
5. (let ((completion-styles '(substring)))
     (completing-read ":" '("foo1\nbar" "foo2\nbar") nil nil "bar"))
6. Press TAB
7. Observe "[No match]" is printed.

This is due to a regex using "." when it should use a pattern which
actually matches anything, such as "[^z-a]".  A patch to fix will
follow.



In GNU Emacs 29.2.50 (build 9, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.15.12, Xaw scroll bars) of 2024-07-30 built on
 igm-qws-u22796a
Repository revision: cd9604db959c439c5695cf79f6533b5cbd340851
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Rocky Linux 8.10 (Green Obsidian)

Configured using:
 'configure --with-x-toolkit=lucid --without-gpm --without-gconf
 --without-selinux --without-imagemagick --with-modules --with-gif=no
 --with-cairo --with-rsvg --without-compress-install
 --with-native-compilation=aot --with-tree-sitter
 PKG_CONFIG_PATH=/usr/local/home/garnish/libtree-sitter/0.22.6-1/lib/pkgconfig/'

Configured features:
CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11
XDBE XIM XINPUT2 XPM LUCID ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: ELisp/l





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

end of thread, other threads:[~2024-08-15  7:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-02 16:14 bug#72425: 29.2.50; substring (and other PCM styles) fails with candidates containing newlines Spencer Baugh
2024-08-02 16:17 ` Spencer Baugh
2024-08-14  0:51   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-15  7:43     ` Eli Zaretskii
2024-08-02 16:24 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-02 19:32   ` Spencer Baugh
2024-08-02 21:22     ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors

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