From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.bugs Subject: bug#55491: All completion fragments get added to obarray Date: Tue, 17 May 2022 16:22:35 -0400 Message-ID: <8AB5676F-ABCB-4849-AD65-B302AC5BDE6F@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_C9B5A44F-E824-4204-A014-987B714AF23A" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22744"; mail-complaints-to="usenet@ciao.gmane.io" To: 55491@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 17 22:23:11 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nr3ip-0005gR-RK for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 May 2022 22:23:11 +0200 Original-Received: from localhost ([::1]:49262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nr3io-0004Hs-Pj for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 May 2022 16:23:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nr3ig-0004Eq-Hh for bug-gnu-emacs@gnu.org; Tue, 17 May 2022 16:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36001) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nr3ig-0006TY-8X for bug-gnu-emacs@gnu.org; Tue, 17 May 2022 16:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nr3ig-0008Uy-34 for bug-gnu-emacs@gnu.org; Tue, 17 May 2022 16:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: JD Smith Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 May 2022 20:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55491 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165281896532622 (code B ref -1); Tue, 17 May 2022 20:23:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 May 2022 20:22:45 +0000 Original-Received: from localhost ([127.0.0.1]:58131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nr3iO-0008U5-GQ for submit@debbugs.gnu.org; Tue, 17 May 2022 16:22:44 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:48704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nr3iM-0008Tx-Ib for submit@debbugs.gnu.org; Tue, 17 May 2022 16:22:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nr3iM-0003oW-Bn for bug-gnu-emacs@gnu.org; Tue, 17 May 2022 16:22:42 -0400 Original-Received: from mail-qv1-xf31.google.com ([2607:f8b0:4864:20::f31]:38498) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nr3iJ-0006Rg-Os for bug-gnu-emacs@gnu.org; Tue, 17 May 2022 16:22:41 -0400 Original-Received: by mail-qv1-xf31.google.com with SMTP id n10so33855qvi.5 for ; Tue, 17 May 2022 13:22:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:mime-version:subject:message-id:date:to; bh=atpD/JQkPmCnGbav/kDSD6ywsLrvsMea2MhbZyPFEmk=; b=dQeJFAe5sHD/0pVA3Jg+kJn42y2MNlEUiQPOLbaGEW5r9Ug68oRnInJFVqsh5hT/LW yyx5KVkH9F/rrI/ZW17wsTzyNAoJbVednu8RdqC06hk4+miCH6lANb3jW0xZq3AHeIrx n7apUgzwYmNVPe6OBSIQ6s22+M3PpUMZ/gnGS3ZHQkEvajF+8xSI9sV4JAWz2nXlZP0a wvxrJcObj/P0gL5SY42H+Ih93nk/bEQ6v9IaF4z7lcqp9Djm1JXnAkJ5VO859m2pBbYt A6SbpyQG9MdoINZNBH5+A3Wfs81pdoBKm4YZpTqybaA0up/2ReM09RJqKDJx0cQjDL15 Lk2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=atpD/JQkPmCnGbav/kDSD6ywsLrvsMea2MhbZyPFEmk=; b=e02JHJ84jsWJXGO6ka6ZvZ0WRtilGWgFqDS85exXY0Vu0yr7zp6zKQkZDtwlBXmVuj 7ZwdEhk5y3+0jC60VUwgrQwZBekSz4ia/ncs2rseQDC4uWrMmXJfdnmgBrY4w1QOQBC6 /iulWKBsnMFFmfRjPz/OYWl3jxgig7aw8LrT8og2FU2C3t+EeqCnmRoXpV4eSexlb7aQ FJ8R7qEsaz+s4RC2i4t5DOCidDDF7EGTM73upPapay/mhpLQqo8VAkxmRdCUVHC7uvx7 MaTfonFjS7+wyHAxMhXHy7h+GP83WQ0NTupSSrzjtu/VN/VAUkBef9cfPEc258vIM3KD kEuQ== X-Gm-Message-State: AOAM532lF5IZMdrHQW7HTzBISENRJJQbnChtEV2l9GSFYQ/V4EK4uNSD cO1LBdw5sXx0ZF3HMbvo6wP/bPdOlvE= X-Google-Smtp-Source: ABdhPJxmR+yMwnW/hVmNcLMOs+pSEDBjfTuwFhZzu3PH1IgT+oPg2cDwZFbmiuJthVQAyLXLPu10ug== X-Received: by 2002:a05:6214:130d:b0:461:c9ee:a9e7 with SMTP id a13-20020a056214130d00b00461c9eea9e7mr12039154qvv.58.1652818957871; Tue, 17 May 2022 13:22:37 -0700 (PDT) Original-Received: from smtpclient.apple (cm-134-228-57-173.buckeyecom.net. [134.228.57.173]) by smtp.gmail.com with ESMTPSA id z17-20020ac84551000000b002f39b99f689sm8362503qtn.35.2022.05.17.13.22.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 May 2022 13:22:36 -0700 (PDT) X-Mailer: Apple Mail (2.3696.80.82.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::f31; envelope-from=jdtsmith@gmail.com; helo=mail-qv1-xf31.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:232495 Archived-At: --Apple-Mail=_C9B5A44F-E824-4204-A014-987B714AF23A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 In Emacs 27 or 28, each and every partial fragment of text introduced to = the completion system gets put into obarray. =46rom emacs -Q: (intern-soft "ohno") -> nil (ohno -> No match (intern-soft "ohno") -> ohno :( This has the result that, e.g.: (test-completion "ohno" obarray nil) ; 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=E2=80=99t reveal any = obvious places where completion fragments are being captured into the = symbol array.=20 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=3D/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)) --Apple-Mail=_C9B5A44F-E824-4204-A014-987B714AF23A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

In Emacs 27 or 28, each = and every partial fragment of text introduced to the completion system = gets put into obarray.  =46rom 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=E2=80=99t 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=3D/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))

= --Apple-Mail=_C9B5A44F-E824-4204-A014-987B714AF23A--