From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Reindert-Jan Ekker Newsgroups: gmane.emacs.bugs Subject: bug#55245: 28.1; project--read-project-buffer predicate fails with wrong-type-argument listp Date: Tue, 03 May 2022 14:01:05 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7981"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.10; emacs 28.1 To: 55245@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 03 17:09:21 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 1nlu9R-0001pu-8J for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 May 2022 17:09:21 +0200 Original-Received: from localhost ([::1]:39350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlu9Q-0000Da-69 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 May 2022 11:09:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlu9A-0000Bb-35 for bug-gnu-emacs@gnu.org; Tue, 03 May 2022 11:09:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlu99-0000NG-6F for bug-gnu-emacs@gnu.org; Tue, 03 May 2022 11:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlu99-00075c-1G for bug-gnu-emacs@gnu.org; Tue, 03 May 2022 11:09:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Reindert-Jan Ekker Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 May 2022 15:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55245 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.165159052427208 (code B ref -1); Tue, 03 May 2022 15:09:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 May 2022 15:08:44 +0000 Original-Received: from localhost ([127.0.0.1]:40678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlu8p-00074l-8s for submit@debbugs.gnu.org; Tue, 03 May 2022 11:08:44 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:35122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlrIh-00062N-KD for submit@debbugs.gnu.org; Tue, 03 May 2022 08:06:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlrIh-0002p8-CL for bug-gnu-emacs@gnu.org; Tue, 03 May 2022 08:06:43 -0400 Original-Received: from outbound1.mail.transip.nl ([2a01:7c8:7c8::72]:36630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlrId-0006LL-4z for bug-gnu-emacs@gnu.org; Tue, 03 May 2022 08:06:42 -0400 Original-Received: from submission9.mail.transip.nl (unknown [10.103.8.160]) by outbound1.mail.transip.nl (Postfix) with ESMTP id 4KszG063DYzRjMG for ; Tue, 3 May 2022 14:06:32 +0200 (CEST) Original-Received: from www.codesensei.nl (unknown [IPv6:2a01:7c8:bb02:73:5054:ff:fe0b:4b1]) by submission9.mail.transip.nl (Postfix) with ESMTPSA id 4KszFz4mtmz1y56 for ; Tue, 3 May 2022 14:06:31 +0200 (CEST) Original-Received: from dhcp-077-248-199-195.chello.nl ([77.248.199.195] helo=CodeSensei-MacBook-Air.local) by www.codesensei.nl with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nlrOy-0007R0-Th for bug-gnu-emacs@gnu.org; Tue, 03 May 2022 14:13:12 +0200 X-Scanned-By: ClueGetter at submission9.mail.transip.nl DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=transip-a; d=codesensei.nl; t=1651579591; h=from:subject:to:date: mime-version:content-type; bh=YTTPHsI8FQAkcTIeOlMEP54rEUMujRjcsAaIG50OLXA=; b=ME50SRC5yOugAUQ3DqvjIGZWgLrsSh/kAr4VZwFkNFUz+yYpdeHanR5XswnGa9Z7bhttkR N85rgH2dfJLQgIglRMAniNuHDTims+fV4yKH6feKliU8Uj7wgJ/4E+dKBDRz7GTUNKXqf0 W6VH+PI4/cXws1WyM4RJuvbbAvNjA+/XPB41vmOPhwbOqxAMl2Cb04aPi6B1u4e/NqCmEG IfEehnLr2fU/zsfpr08nBQHXANZe9f9XoWreH89Br0i0ggylZeeanp4LD87p6r6/yHrrz8 vTOznPpgr+11qlBg/dI1X95iOjKpW94pEFX5k5ASoHMyN1T3xX2bABQbyfKavA== X-Report-Abuse-To: abuse@transip.nl Received-SPF: pass client-ip=2a01:7c8:7c8::72; envelope-from=info@codesensei.nl; helo=outbound1.mail.transip.nl X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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-Mailman-Approved-At: Tue, 03 May 2022 11:08:42 -0400 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:231330 Archived-At: I encountered this bug because I use helm. After the following: (require 'helm) (require 'helm-config) (helm-mode 1) the command project-switch-to-buffer always fails with "wrong type argument listp". I posted this as a helm issue at first and got the following answer (quoting from https://github.com/emacs-helm/helm/issues/2506): The bug is not helm related, it is a bug in project--read-project-buffer (and possibly other functions which use the same predicate?), where its predicate expect a cons cell like (bufname . buf_object) and when the first call of the predicate used to determine default for read-buffer returns a buffer-name, this one is called next by the predicate function of read-buffer (which use the same predicate) with a buffer-name as argument instead of a cons cell hence the error "wrong type argument listp". Here a possible (quick) fix (not fully safe as it should check if buffer is a string or a buffer or nil): (defun project--read-project-buffer () (let* ((pr (project-current t)) (current-buffer (current-buffer)) (other-buffer (other-buffer current-buffer)) (other-name (buffer-name other-buffer)) (buffers (project-buffers pr)) (predicate (lambda (buffer) ;; BUFFER is an entry (BUF-NAME . BUF-OBJ) of Vbuffer_alist. (if (consp buffer) (memq (cdr buffer) buffers) (memq (get-buffer buffer) buffers))))) (read-buffer "Switch to buffer: " (when (funcall predicate (cons other-name other-buffer)) other-name) nil predicate))) In GNU Emacs 28.1 (build 2, aarch64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.5.2 (Build 20G95)) of 2022-05-01 built on CodeSensei-MacBook-Air.local Windowing system distributor 'Apple', version 10.3.2022 System Description: macOS 11.5.2 Configured using: 'configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp --infodir=/opt/homebrew/Cellar/emacs-plus@28/28.1/share/info/emacs --prefix=/opt/homebrew/Cellar/emacs-plus@28/28.1 --with-xml2 --with-gnutls --with-native-compilation --without-dbus --without-imagemagick --with-modules --with-rsvg --with-ns --disable-ns-self-contained 'CFLAGS=-I/opt/homebrew/opt/gcc/include -I/opt/homebrew/opt/libgccjit/include -I/opt/homebrew/opt/gmp/include -I/opt/homebrew/opt/jpeg/include' 'LDFLAGS=-L/opt/homebrew/lib/gcc/11 -I/opt/homebrew/opt/gcc/include -I/opt/homebrew/opt/libgccjit/include -I/opt/homebrew/opt/gmp/include -I/opt/homebrew/opt/jpeg/include'' Configured features: ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_CTYPE: UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: elisp Minor modes in effect: edebug-mode: t helm-mode: t helm-minibuffer-history-mode: t helm--remap-mouse-mode: t async-bytecomp-package-mode: t rainbow-delimiters-mode: t which-key-mode: t super-save-mode: t recentf-mode: t savehist-mode: t save-place-mode: t global-diff-hl-mode: t diff-hl-mode: t global-anzu-mode: t anzu-mode: t volatile-highlights-mode: t windmove-mode: t global-flycheck-mode: t flycheck-mode: t global-company-mode: t company-mode: t global-hl-line-mode: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-strict-mode: t smartparens-mode: t global-undo-tree-mode: t undo-tree-mode: t override-global-mode: t magit-wip-initial-backup-mode: t magit-wip-before-change-mode: t magit-wip-after-apply-mode: t magit-wip-after-save-mode: t magit-wip-mode: t global-git-commit-mode: t magit-auto-revert-mode: t global-auto-revert-mode: t shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-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 size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: ~/.emacs.d/rje/custom hides /opt/homebrew/Cellar/emacs-plus@28/28.1/share/emacs/28.1/lisp/custom /Users/reindert/.emacs.d/elpa/transient-20220425.1314/transient hides /opt/homebrew/Cellar/emacs-plus@28/28.1/share/emacs/28.1/lisp/transient Features: (shadow pulse bug-reference helm-config helm-projectile vc-mtn vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs cl-print debug ace-window avy goto-addr view emacsbug eieio-opt speedbar ezimage dframe shortdoc help-fns radix-tree tabify man helm-command helm-elisp helm-eval edebug backtrace helm-mode helm-misc gnutls epa-file network-stream nsm mailalias sort gnus-cite mail-extr qp vc-git winner tramp-archive tramp-gvfs helm-x-files helm-for-files helm-bookmark helm-adaptive helm-info bookmark pp helm-external helm-net helm-files image-dired helm-tags helm-locate helm-buffers helm-occur helm-grep helm-regexp helm-utils helm-help helm-types helm helm-core async-bytecomp helm-global-bindings helm-easymenu helm-source helm-multi-match helm-lib async rainbow-delimiters course course-ui course-server course-publish course-backend course-topic-link course-meta course-log course-projects course-deps publish-course yasnippet projectile lisp-mnt grep compile ibuf-ext ibuffer ibuffer-loaddefs ox-reveal 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 ox-html table ox-ascii ox-publish ox htmlize exec-path-from-shell midnight which-key flyspell ispell sane-term dired-x rje-savefiles super-save recentf tree-widget savehist saveplace rje-looks dimmer face-remap color diff-hl log-view vc-dir ewoc vc vc-dispatcher anzu volatile-highlights whitespace diminish rje-move move-text windmove rje-keys rje-windows rje-programming flycheck hl-todo rje-company company-oddmuse company-keywords company-etags etags fileloop xref project company-gtags company-dabbrev-code company-dabbrev company-files company-clang company-capf company-cmake company-semantic company-template company-bbdb company pcase rje-pass password-store auth-source-pass rje-agenda org-agenda rje-theme org-element avl-tree generator ol-w3m org-inlinetask ol-info ol-eww eww xdg url-queue mm-url ol-doi org-link-doi ol-docview org-ctags org-crypt deeper-blue-theme rje-mail org-mu4e mu4e mu4e-org mu4e-main mu4e-view mu4e-view-gnus gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader wid-edit mu4e-view-common mu4e-headers mu4e-compose mu4e-context mu4e-draft mu4e-actions ido rfc2368 smtpmail sendmail mu4e-mark mu4e-proc mu4e-utils doc-view jka-compr image-mode exif mu4e-lists mu4e-message shr kinsoku svg xml dom flow-fill hl-line mu4e-vars mu4e-meta f s rje-edit zop-to-char sudo-edit smartparens-config smartparens-org smartparens-text smartparens-python smartparens thingatpt browse-kill-ring undo-tree queue rje-org org-tempo tempo org-id org-refile org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob-plantuml ob-ditaa ob-python python tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat parse-time ls-lisp ob-shell ob ob-tangle org-src ob-ref ob-lob ob-table ob-exp ob-comint ob-core ob-eval org-table oc-basic bibtex iso8601 ol org-keys oc org-compat advice org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key use-package-core rje-packages epl finder-inf magit-wip magit-log which-func imenu magit-diff smerge-mode diff diff-mode git-commit log-edit easy-mmode message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process with-editor shell pcomplete comint ring server ansi-color magit-mode transient comp comp-cstr warnings cl-extra edmacro kmacro help-mode magit-git magit-base magit-section format-spec crm dash compat-27 compat-26 compat delsel cus-load rx info 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 cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode 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 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 hashtable-print-readable backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 1061008 99689) (symbols 48 62100 17) (strings 32 253698 9988) (string-bytes 1 8470187) (vectors 16 110269) (vector-slots 8 2374615 163638) (floats 8 672 364) (intervals 56 36959 1700) (buffers 992 47)) -- Reindert-Jan Ekker Code Sensei