GNU bug report logs - #53604
29.0.50; read-buffer-to-switch unconditonally overrides minibuffer-completion-table

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Visuwesh <visuweshm@HIDDEN>; dated Fri, 28 Jan 2022 14:46:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 28 Jan 2022 14:45:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 28 09:45:18 2022
Received: from localhost ([127.0.0.1]:57960 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nDSV3-0007Di-Qt
	for submit <at> debbugs.gnu.org; Fri, 28 Jan 2022 09:45:18 -0500
Received: from lists.gnu.org ([209.51.188.17]:41004)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <visuweshm@HIDDEN>) id 1nDRn4-0003ay-6v
 for submit <at> debbugs.gnu.org; Fri, 28 Jan 2022 08:59:50 -0500
Received: from eggs.gnu.org ([209.51.188.92]:57892)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <visuweshm@HIDDEN>)
 id 1nDRn3-0005yY-K4
 for bug-gnu-emacs@HIDDEN; Fri, 28 Jan 2022 08:59:49 -0500
Received: from [2607:f8b0:4864:20::642] (port=33470
 helo=mail-pl1-x642.google.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <visuweshm@HIDDEN>)
 id 1nDRn0-0007Ga-7L
 for bug-gnu-emacs@HIDDEN; Fri, 28 Jan 2022 08:59:49 -0500
Received: by mail-pl1-x642.google.com with SMTP id k17so6044162plk.0
 for <bug-gnu-emacs@HIDDEN>; Fri, 28 Jan 2022 05:59:44 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:subject:date:message-id:mime-version;
 bh=Bd5SfqYnTxPqEuylwrf3S0R9ZzJuGWbobsSrNrHG1j0=;
 b=gcnxWqqRZQ/a/d1swBp4uOad6hAobkXWoXSN3w4vQh66vepq/1SDCd6gzSVZu7girh
 3eaq/HHdVQCYKM6ebOoXCY86iwiqE1FvvShrZugdvtGcpwtoleyO8XvYWXgJ7uJD9gMv
 5DOviINTgHM+spXWo9lrQ4lO6FF3rL/i1mcCfXhgoi+cp02LleYlahh5xyBZ+gkjT51M
 cD+dbO5h7B/YBAO9Al0gzpePItmOZW0R9L7geGdDnBm1wd7aCzwNc4U3LXBHsUn0dNsW
 O/pBUrOBjJt0P0wwA2uPlL6R/QHEj02QROzvfkGShteZJdbAFczaOiKp9rfzydFgHMHP
 dEjQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=Bd5SfqYnTxPqEuylwrf3S0R9ZzJuGWbobsSrNrHG1j0=;
 b=C/d2ojvDNz07r0tr6K7QXR70eRzyFm3nQBAs8S0ubLy5CGfA7z+5VsiYsCDKGebyDM
 WYinuMQ45AH9FG+/t8le4Vn7axI4oz+5Nj6MJziLuMY3kNOG/RQ8Z7M4eleSq4B5TPGa
 OjTCba9qyffJYC/CseN3hMrY6VOtfVby4e2Ng1cOCURhxHB8+Pl1ru7YXt6z36NsxBkE
 z9bcFr1ylDSZ5YlEheRp5OHi+oq4uifRxiGaDaYlXMkhn4uS7pX3K9M7btO+JDFQ1biI
 Zm3fle5zAyTkeyi7lZywhQLVmkkgOhcZhVtTtk6lTLV0DmJapZsdt0eEOcUPN5UpLRmb
 4hTg==
X-Gm-Message-State: AOAM533kdjw/exrFSrTC73dqVr9xWcq6MeZ31a7hlPWCcKNy6Pvglw2W
 TcC+EZS7oWM9dEMHI6nqr4Bwf/CfuOw=
X-Google-Smtp-Source: ABdhPJxLfdhXbUMOBMdB66YSB4ETrFPzZluVPNuP6g5Nl1BHWHTgVZrcLYigQp8Tro+uRrpa/wFRhw==
X-Received: by 2002:a17:90b:3e81:: with SMTP id
 rj1mr19673139pjb.190.1643378383108; 
 Fri, 28 Jan 2022 05:59:43 -0800 (PST)
Received: from localhost ([49.204.135.37])
 by smtp.gmail.com with ESMTPSA id l26sm21878877pgm.73.2022.01.28.05.59.42
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 28 Jan 2022 05:59:42 -0800 (PST)
From: Visuwesh <visuweshm@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.0.50; read-buffer-to-switch unconditonally overrides
 minibuffer-completion-table
Date: Fri, 28 Jan 2022 19:29:33 +0530
Message-ID: <87o83wc662.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::642
 (failed)
Received-SPF: pass client-ip=2607:f8b0:4864:20::642;
 envelope-from=visuweshm@HIDDEN; helo=mail-pl1-x642.google.com
X-Spam_score_int: -12
X-Spam_score: -1.3
X-Spam_bar: -
X-Spam_report: (-1.3 / 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,
 PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  `read-buffer-to-switch', used by `switch-to-buffer',
 unconditionally
 sets `minibuffer-completion-table' to `rbts-completion-table'. It should
 only do that when `read-buffer-function' is set to nil sin [...] 
 Content analysis details:   (1.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (visuweshm[at]gmail.com)
 -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,
 medium trust [209.51.188.17 listed in list.dnswl.org]
 0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [209.51.188.17 listed in wl.mailspike.net]
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 1.3 SPOOFED_FREEMAIL       No description available.
 1.5 SPOOF_GMAIL_MID        From Gmail but it doesn't seem to be...
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 28 Jan 2022 09:45:16 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

`read-buffer-to-switch', used by `switch-to-buffer', unconditionally
sets `minibuffer-completion-table' to `rbts-completion-table'.  It
should only do that when `read-buffer-function' is set to nil since
`read-buffer-function' cannot do its job properly.

As a minimal reproduction, consider the following [a]

    1. emacs -Q
    2. Evaluate the following form,
        (let ((read-buffer-function
               (lambda (&rest _)
                 (completing-read "prompt: " (list "1" "2")))))
          (call-interactively #'switch-to-buffer))
    3. Type TAB.
    4. *Completions* buffer does not show "1" "2".  If you replace
       (call-interactively ...) with (read-buffer ""), it does.

a. To justify my request, I will write my problem here.  I wrote a
custom read-buffer-function to include "virtual" buffer candidates
(popularised by ivy, helm, etc.) like recentf files, bookmarks, etc.,
but the current behaviour makes my job much harder (or uglier i.e.,
advice) as I have to write custom switch-to-buffer-* commands and remap
the standard switch-to-buffer-*.



BTW, should the docstring of `switch-to-buffer' mention
`read-buffer-to-switch'?  I see that Lars decided against it in bug#23131
(https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-07/msg00703.html).

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars)
Repository revision: 4b7e73432cd07612e5225189e18696f755c8f954
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: NixOS 21.11 (Porcupine)

Configured using:
 'configure
 --prefix=/nix/store/rsgfliii3k06j8i77zn295yp87qbq0yr-emacs-git-20211221.0
 --disable-build-details --with-modules --with-x-toolkit=lucid
 --with-xft --with-cairo --with-native-compilation'

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

Important settings:
  value of $EMACSLOADPATH: 
  value of $EMACSNATIVELOADPATH: /nix/store/x6fjznfj7wks7nvs6xgsk1q4fcd5rjrw-emacs-packages-deps/share/emacs/native-lisp::
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Help

Minor modes in effect:
  semantic-minor-modes-format: ((:eval (if (or semantic-highlight-edits-mode semantic-show-unmatched-syntax-mode)  S)))
  shell-dirtrack-mode: t
  recentf-mode: t
  eros-mode: t
  pdf-occur-global-minor-mode: t
  minibuffer-depth-indicate-mode: t
  repeat-mode: t
  display-time-mode: t
  display-battery-mode: t
  straight-use-package-mode: t
  straight-package-neutering-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/viz/.nix-profile/share/emacs/site-lisp/site-start hides /nix/store/x6fjznfj7wks7nvs6xgsk1q4fcd5rjrw-emacs-packages-deps/share/emacs/site-lisp/site-start
/home/viz/lib/emacs/straight/build/map/map hides /nix/store/rsgfliii3k06j8i77zn295yp87qbq0yr-emacs-git-20211221.0/share/emacs/29.0.50/lisp/emacs-lisp/map
/home/viz/lib/emacs/straight/build/let-alist/let-alist hides /nix/store/rsgfliii3k06j8i77zn295yp87qbq0yr-emacs-git-20211221.0/share/emacs/29.0.50/lisp/emacs-lisp/let-alist
/nix/store/rsgfliii3k06j8i77zn295yp87qbq0yr-emacs-git-20211221.0/share/emacs/29.0.50/lisp/emacs-lisp/eieio-compat hides /nix/store/rsgfliii3k06j8i77zn295yp87qbq0yr-emacs-git-20211221.0/share/emacs/29.0.50/lisp/obsolete/eieio-compat

Features:
(shadow emacsbug sendmail vc-annotate add-log log-view pcvs-util
find-dired grep vc-mtn vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs
vc etags fileloop info-look ucs-normalize debug edebug backtrace
expand-region text-mode-expansions cc-mode-expansions
the-org-mode-expansions er-basic-expansions expand-region-core
expand-region-custom tramp tramp-loaddefs trampver tramp-integration
files-x tramp-compat ls-lisp comp comp-cstr minibuf-eldef
ement-room-list ement ement-notify notifications ement-room ewoc
ement-api ement-structs ement-macros plz dns ts s dash dictionary
dictionary-connection shell-command+ help-at-pt olivetti xref apropos
cal-iso tabify calc-bin calc-vec org-capture doct calc-comb calc-poly
calc-stuff calc-prog calc-frac calcalg2 calc-trail lacarte icomplete
calc-cplx calc-incom calc-undo calc-yank calc-store calc-math calccomp
calc-arith calc-misc calc-alg calc-ext calc-aent calc-menu calc
calc-loaddefs rect calc-macs cus-start view writegood-mode cal-islam
holidays hol-loaddefs mule-util cal-move nnfolder cl-print timezone
ob-ditaa ob-plantuml org-crypt org-habit org-clock org-colview org-plot
misc flyspell ispell org-pdftools org-noter org-indent shortdoc help-fns
radix-tree flow-fill nndoc crm bug-reference shr-color smerge-mode diff
mm-archive gnus-fun gnus-cite mail-extr gnus-bcklg qp gnus-async sort
gnus-ml pulse color latexenc ox-odt rng-loc rng-uri rng-parse rng-match
rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util
ox-latex ox-icalendar org-agenda org-refile ox-html table ox-ascii
ox-publish ox org-element avl-tree generator goto-addr pdf-sync
pdf-annot facemenu pdf-outline pdf-links ob-C cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ob-shell
ob-racket async ob-async tempo ol-eww ol-rmail ol-mhe ol-irc ol-info
ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe
ol-docview doc-view ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src
ob-comint org-pcomplete org-list org-faces org-entities org-version
ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex ol org-keys oc
org-compat org-macs org-loaddefs pdf-history misearch multi-isearch
dired-aux face-remap shell pcomplete nndraft nnmh nnmaildir nnagent nnml
nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg
gnus-art mm-uu mml2015 mm-view mml-smime smime dig nntp gnus-cache
gnus-sum gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap
nnmail mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int
gnus-range message yank-media rfc822 mml mml-sec epa epg rfc6068
epg-config mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader
gnus-win executable time-stamp reveal noutline outline recentf
tree-widget vc-git diff-mode vc-dispatcher gnutls network-stream
url-http url-gw nsm rmc url-cache url-auth eww xdg url-queue shr
pixel-fill kinsoku svg dom puny mm-url gnus nnheader gnus-util
mail-utils server paredit edmacro kmacro eros time-date checkdoc
lisp-mnt mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr flymake-proc flymake project warnings thingatpt hl-todo
writegood-mode-autoloads wordel-autoloads sokoban-autoloads
ement-autoloads ts-autoloads s-autoloads map-autoloads plz-autoloads
nov-autoloads esxml-autoloads kv-autoloads transmission-autoloads
lua-mode-autoloads nix-mode-autoloads magit-section-autoloads
dash-autoloads racket-mode-autoloads eros-autoloads
flymake-shellcheck-autoloads avy avy-autoloads siege-mode-autoloads
paredit-autoloads puni-autoloads expand-region-autoloads
filladapt-autoloads compose quail scroll-other-window
org-pdftools-autoloads org-noter-autoloads finder-inf
math-delimiters-autoloads doct-autoloads ob-async-autoloads
async-autoloads emacs-ob-racket-autoloads valign-autoloads
org-starless-autoloads cdlatex-autoloads auctex-autoloads tex-site
easy-mmode pdf-occur ibuf-ext ibuffer ibuffer-loaddefs tablist advice
tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local find-func cedet
pdf-isearch let-alist pdf-misc imenu pdf-tools package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source eieio
eieio-core eieio-loaddefs json map url-vars compile comint ansi-color
ring cus-edit wid-edit pdf-view password-cache bookmark
text-property-search pp jka-compr pdf-cache pdf-info tq pdf-util
pdf-macs image-mode dired-x dired dired-loaddefs exif
pdf-tools-autoloads let-alist-autoloads tablist-autoloads derived
mb-depth cus-load repeat visual-fill-autoloads olivetti-autoloads
hl-todo-autoloads time format-spec battery dbus filenotify xml
disp-table lacarte-autoloads shell-command-plus-autoloads rx icalendar
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs
chemtable-autoloads molar-mass-autoloads pcase straight-autoloads info
cl-seq cl-extra help-mode straight cl-macs cl-loaddefs cl-lib
vz-nh-theme seq gv subr-x byte-opt bytecomp byte-compile cconv
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax 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 emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget keymap hashtable-print-readable backquote threads
dbusbind inotify dynamic-setting system-font-setting font-render-setting
cairo x-toolkit x multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 2050564 584582)
 (symbols 48 54221 486)
 (strings 32 273447 55866)
 (string-bytes 1 203473076)
 (vectors 16 143788)
 (vector-slots 8 2972964 406447)
 (floats 8 139821 6723)
 (intervals 56 158849 33066)
 (buffers 992 101))




Acknowledgement sent to Visuwesh <visuweshm@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#53604; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 28 Jan 2022 15:00:03 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.