unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55491: All completion fragments get added to obarray
@ 2022-05-17 20:22 JD Smith
  2022-05-17 20:30 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 14+ messages in thread
From: JD Smith @ 2022-05-17 20:22 UTC (permalink / raw)
  To: 55491

[-- Attachment #1: Type: text/plain, Size: 3614 bytes --]


In Emacs 27 or 28, each and every partial fragment of text introduced to the completion system gets put into obarray.  From emacs -Q:

(intern-soft "ohno") <C-M-x> -> nil
(ohno <M-TAB>                -> No match
(intern-soft "ohno") <C-M-x> -> ohno :(

This has the result that, e.g.:

(test-completion "ohno" obarray nil) <C-M-x> ; t!  Sigh

will always return t during completion, for any completed fragment.  For completion systems that complete against obarray (e.g. emacs-lisp), this is obviously undesirable.  Tracing intern doesn’t reveal any obvious places where completion fragments are being captured into the symbol array. 

In GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))
 of 2021-03-27 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.2113
System Description:  macOS 12.3.1

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Quit
Mark set
nil
No match [2 times]
ohno
next-line: End of buffer
next-line: End of buffer
Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS JSON PDUMPER GMP

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

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
apropos tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 46191 5995)
 (symbols 48 6035 1)
 (strings 32 15585 1651)
 (string-bytes 1 518510)
 (vectors 16 10357)
 (vector-slots 8 129155 12342)
 (floats 8 20 45)
 (intervals 56 196 0)
 (buffers 1000 12))


[-- Attachment #2: Type: text/html, Size: 6269 bytes --]

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

end of thread, other threads:[~2022-06-11  0:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 20:22 bug#55491: All completion fragments get added to obarray JD Smith
2022-05-17 20:30 ` Lars Ingebrigtsen
2022-05-17 22:50   ` JD Smith
2022-05-18 11:03     ` Lars Ingebrigtsen
2022-05-18 11:07       ` Lars Ingebrigtsen
2022-05-18 22:19   ` Richard Stallman
2022-05-20  0:03     ` Lars Ingebrigtsen
2022-06-04 17:59       ` Dmitry Gutov
2022-06-05 14:15         ` Lars Ingebrigtsen
2022-06-05 23:36           ` Dmitry Gutov
2022-06-06 12:44             ` Lars Ingebrigtsen
2022-06-06 21:30               ` Dmitry Gutov
2022-06-07  9:30                 ` Lars Ingebrigtsen
2022-06-11  0:46                   ` Dmitry Gutov

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