From unknown Sun Jun 15 08:16:17 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#61308 <61308@debbugs.gnu.org> To: bug#61308 <61308@debbugs.gnu.org> Subject: Status: 28.2; icomplete --- Error in post-command-hook: wrong-type-argument Reply-To: bug#61308 <61308@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:16:17 +0000 retitle 61308 28.2; icomplete --- Error in post-command-hook: wrong-type-ar= gument reassign 61308 emacs submitter 61308 Fernando de Morais severity 61308 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 05 21:32:53 2023 Received: (at submit) by debbugs.gnu.org; 6 Feb 2023 02:32:53 +0000 Received: from localhost ([127.0.0.1]:47013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOrJM-0004U5-AX for submit@debbugs.gnu.org; Sun, 05 Feb 2023 21:32:52 -0500 Received: from lists.gnu.org ([209.51.188.17]:48598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOrJK-0004Tx-Vm for submit@debbugs.gnu.org; Sun, 05 Feb 2023 21:32:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOrJK-0005CM-Mh for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 21:32:50 -0500 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pOrJI-0005WH-H5 for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 21:32:50 -0500 Received: by mail-oi1-x232.google.com with SMTP id r28so8682520oiw.3 for ; Sun, 05 Feb 2023 18:32:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=LSzh71BQK9BlrP7+KwMOS5YsltQZWfE5plZUbIuNHZk=; b=DzZkyMpp1jxKbhMTqFF1Fx1kVq7EieOMUn3zOmoOU12Llr9VfWlVeRQrg9WvVv4fn+ 0OOXdR5Uj03zewiQE0r/NW47gbUUruuN/McVtfJnInkj6tyr9vkRP6JGcI2vrDEqO2aG nxd8WnwQtf+rANFTz0Epc9QXu0pJAGGntHaUtbKTmGoKU/zhSPvAcmKBy4xK/40jaaIQ xJ0dFD2ELnk+tOjttU7HqSYUWkvTm8F2aVhFipwlr5YValcSiv136gTtcld62b8Nexyj Fsvod1W0ZPPhImCAXsPY3D6zBjraGxKeW6TYJdO+TwY6tpvfoZY+Q8RKN0oUYV7K1nRB pw1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LSzh71BQK9BlrP7+KwMOS5YsltQZWfE5plZUbIuNHZk=; b=YDp+jhkbJO1Q3uXdLzvPGO/voaZFFgykpxf0HAGYdCWg29doAgeHYh9ayPpjS506qY zUFTZuSZcDH3JGaGex5iu7vgEnf9NBynydGV5QFC4eXEUGooBWtSPJVm+653E9M+UGsi Mx0kwNRDUYNzyi52VZNEpWEwpwM9E4DgTlPgBKZxk/p8CZuY/T0eZ1jGmGxKh+twzjXM cQB6OnF4tHdDWXmDAwIBE1YYihbpYGNE9mzRdpkoTx8o/pmi7Yi/DSKb0KqkyiTeTNOj z2RftUozD9dv2+zYRb0Md3RaAIr4bxYt9FVmHpNj4h9K/GLGzWHideSbnXk0hQ76KFqF rmwg== X-Gm-Message-State: AO0yUKUpsZromPIpWXAEEGw45CQ5aiuwoxmojIidr+gfqaU27K1s0wDC jy6s8xP4QI+5kSZxOyCbwIGrmVhBbkU= X-Google-Smtp-Source: AK7set+caHUQzqFXl0qWMMLekZKT5SPMPxygvj6a5CNu0jDi8+SfA5v5tAD/s+fiV7Jpkhqr/AOr0g== X-Received: by 2002:a05:6808:115:b0:367:e981:65b0 with SMTP id b21-20020a056808011500b00367e98165b0mr7898131oie.58.1675650766508; Sun, 05 Feb 2023 18:32:46 -0800 (PST) Received: from sekai ([2804:14c:da80:82e2::26e8]) by smtp.gmail.com with ESMTPSA id cj24-20020a056830641800b0068bcb290a38sm4295896otb.55.2023.02.05.18.32.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Feb 2023 18:32:46 -0800 (PST) From: Fernando de Morais To: bug-gnu-emacs@gnu.org Subject: 28.2; icomplete --- Error in post-command-hook: wrong-type-argument Date: Sun, 05 Feb 2023 23:32:42 -0300 Message-ID: <87wn4vh6b9.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::232; envelope-from=fernandodemorais.jf@gmail.com; helo=mail-oi1-x232.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) To reproduce, which is possible with 'emacs -Q', please: 1. Evaluate the following snippet: (progn (with-eval-after-load 'icomplete (customize-set-variable 'enable-recursive-minibuffers t) (customize-set-variable 'help-window-select t) (customize-set-variable 'icomplete-show-matches-on-no-input t)) (icomplete-mode)) 2. C-x C-f 3. C-h v 4. Then RET (to select any candidate). Results in: - The window displaying the *Help* buffer is selected, but an error[1] is raised and I am left with the default Emacs completion system when I return to the minibuffer. [1] "Error in post-command-hook (icomplete-post-command-hook): (wrong-type-argument number-or-marker-p nil)" In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) of 2023-01-02 built on 2 Windowing system distributor 'The X.Org Foundation', version 11.0.12101006 System Description: Arch Linux Configured using: 'configure --with-x-toolkit=gtk3 --with-native-compilation --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --localstatedir=/var --with-cairo --with-harfbuzz --with-libsystemd --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LC_CTYPE: pt_BR.UTF-8 value of $LANG: pt_BR.UTF-8 value of $XMODIFIERS: @im=fcitx locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: pdf-occur-global-minor-mode: t shell-dirtrack-mode: t corfu-mode: t flymake-mode: t flyspell-mode: t goto-address-prog-mode: t hl-line-mode: t yas-minor-mode: t rainbow-delimiters-mode: t recentf-mode: t savehist-mode: t minions-mode: t movemail-auto-fetch-mode: t marginalia-mode: t icomplete-vertical-mode: t icomplete-mode: t minibuffer-electric-default-mode: t minibuffer-depth-indicate-mode: t display-time-mode: t global-so-long-mode: t electric-pair-mode: t delete-selection-mode: t display-battery-mode: t gcmh-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-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 temp-buffer-resize-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t hs-minor-mode: t Load-path shadows: None found. Features: (pdf-sync pdf-annot pdf-outline pdf-links pdf-history pdf-occur ibuffer-vc ibuf-ext ibuffer ibuffer-loaddefs tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw cedet pdf-isearch pdf-misc pdf-loader pdf-tools pdf-view pdf-cache pdf-info tq pdf-util pdf-macs mode-local tramp-cache tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat ls-lisp consult-dir ielm dabbrev skeleton eglot external-completion array filenotify jsonrpc ert ewoc debug backtrace imenu sh-script smie executable gnus-uu yenc timezone sgml-mode facemenu cc-awk cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs gnus-html gnus-dired diredfl completion mailalias smtpmail shadow footnote emacsbug sendmail modus-vivendi-theme flow-fill qp smiley gnus-cite mm-archive mail-extr gnus-bcklg embark-org embark-consult embark sort gnus-ml disp-table nnmaildir nnagent nnml nnnil nnrss gnus-topic mairix gnus-dup gnus-draft nndraft nnmh gnus-demon gnus-async gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache flyspell-correct comp comp-cstr etags fileloop pulse color view vc-svn misearch multi-isearch vc denote xref diff shortdoc cl-print help-fns radix-tree org-agenda org-refile consult-org conf-mode vc-git diff-mode vc-dispatcher org-eldoc org-indent image-file image-converter gnutls network-stream url-http url-gw nsm url-cache url-auth ol-eww eww-lnum eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr-tag-pre-highlight language-detection shr kinsoku svg dom gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range message rmc puny rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs mail-utils ol-docview doc-view jka-compr image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi ob-octave org-superstar org-element avl-tree generator org-contrib 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 noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex iso8601 ol org-keys oc org-compat advice org-macs org-loaddefs find-func holidays hol-loaddefs cal-menu calendar cal-loaddefs rx consult-icomplete consult bookmark cape-keyword cape mule-util shell pcmpl-args pcmpl-gnu pcmpl-linux pcmpl-unix pcomplete corfu time-date checkdoc lisp-mnt mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr dired-x dired-aux dired dired-loaddefs flymake-proc flymake project compile text-property-search exec-path-from-shell comint ansi-color ring warnings display-line-numbers epa-file epa derived epg rfc6068 epg-config cl-extra flyspell ispell goto-addr hl-line hideshow yasnippet help-mode rainbow-delimiters recentf tree-widget cus-start savehist server minions easy-mmode let-alist ibuf-macs marginalia icomplete minibuf-eldef mb-depth orderless time so-long edmacro kmacro elec-pair delsel format-spec battery dbus xml auth-source-pass modus-operandi-theme modus-themes pcase ffap thingatpt no-littering compat compat-29 gcmh system-packages tex-site 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 cus-edit pp cus-load wid-edit cl-loaddefs cl-lib 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 hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 1409864 204754) (symbols 48 60790 113) (strings 32 292283 20290) (string-bytes 1 11042012) (vectors 16 282913) (vector-slots 8 3690436 280728) (floats 8 91534 1156) (intervals 56 64998 4143) (buffers 992 68)) -- Regards, Fernando de Morais. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 08 02:36:33 2023 Received: (at 61308) by debbugs.gnu.org; 8 Feb 2023 07:36:33 +0000 Received: from localhost ([127.0.0.1]:54616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPf0L-0005fh-9P for submit@debbugs.gnu.org; Wed, 08 Feb 2023 02:36:33 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:37473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPf0K-0005fT-4f for 61308@debbugs.gnu.org; Wed, 08 Feb 2023 02:36:32 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 5CEE8E0009; Wed, 8 Feb 2023 07:36:21 +0000 (UTC) From: Juri Linkov To: Fernando de Morais Subject: Re: bug#61308: 28.2; icomplete --- Error in post-command-hook: wrong-type-argument In-Reply-To: <87wn4vh6b9.fsf@gmail.com> (Fernando de Morais's message of "Sun, 05 Feb 2023 23:32:42 -0300") Organization: LINKOV.NET References: <87wn4vh6b9.fsf@gmail.com> Date: Wed, 08 Feb 2023 09:20:57 +0200 Message-ID: <86cz6k1v3a.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 61308 Cc: 61308@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > (progn > (with-eval-after-load 'icomplete > (customize-set-variable 'enable-recursive-minibuffers t) > (customize-set-variable 'help-window-select t) > (customize-set-variable 'icomplete-show-matches-on-no-input t)) > (icomplete-mode)) > > 2. C-x C-f > 3. C-h v > 4. Then RET (to select any candidate). > > Results in: > > - The window displaying the *Help* buffer is selected, but an error[1] > is raised and I am left with the default Emacs completion system > when I return to the minibuffer. > > [1] "Error in post-command-hook (icomplete-post-command-hook): (wrong-type-argument number-or-marker-p nil)" Interesting bug report. I guess we need to double-check if we are still in the right buffer after help-window-select selects another window and thus confuses icomplete-mode: diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 014f38b2024..97457832e2c 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -686,6 +686,8 @@ icomplete-exhibit Should be run via minibuffer `post-command-hook'. See `icomplete-mode' and `minibuffer-setup-hook'." (when (and icomplete-mode + ;; Check if still in the right buffer (bug#61308) + (or (window-minibuffer-p) completion-in-region--data) (icomplete-simple-completing-p)) ;Shouldn't be necessary. (let ((saved-point (point))) (save-excursion From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 08 17:09:36 2023 Received: (at 61308) by debbugs.gnu.org; 8 Feb 2023 22:09:36 +0000 Received: from localhost ([127.0.0.1]:56832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPsdE-0005ku-H5 for submit@debbugs.gnu.org; Wed, 08 Feb 2023 17:09:36 -0500 Received: from mail-oo1-f41.google.com ([209.85.161.41]:45689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPsdC-0005kg-GA for 61308@debbugs.gnu.org; Wed, 08 Feb 2023 17:09:35 -0500 Received: by mail-oo1-f41.google.com with SMTP id c29-20020a4ad21d000000b00517a55a78d4so40210oos.12 for <61308@debbugs.gnu.org>; Wed, 08 Feb 2023 14:09:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :message-id:date:in-reply-to:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=BRUFts8FD7cDE99qj0GsdVhONCJl+L/0qr+YzMoRNBk=; b=BzsxNeoW27h1c6DKNDn3dKWJ8peAc8oKduvOmhGS63UlDlTdWbpHJtnkm+flZpQ9xZ J80Ruthiomjy6IENcjrTglm6ejkhx/TBs6WCttaSxilwSwC4gDjnL76zJFPkik5NLnZv TvdNbBUiAHtXj+bi3UYL2gtim4az72YIuoXeuxim4SHHMHeOAW25AC8Jq8Gxm3b8M8ZI rfwOxJPS+3Yaq0gIOdVGqdZ2jcA8SW9dSCbDJwMe9pISEt7OmkyWNc+RFFK2n4faUafa HhWmR7Wmy8JAW8P6IMt9Z+I5spRL9pkIceMhoKOpcJhvRGvIqTPbHnKtDmHNF1kzQpDt RI5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :message-id:date:in-reply-to:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BRUFts8FD7cDE99qj0GsdVhONCJl+L/0qr+YzMoRNBk=; b=YUwwGGSzFTTYvsLZRNMKT3qnnHaxKHhSzKa6md6ESKRCoVeJsAcTcl1h0Hm3xUG81A 3LeN6eWt3z8/khUUchdF24wUM3vg6rsq2nsCoaWBw5+5W5jU8B01br4lx7ueKgxYN2aO mO7geyx7OcaPomSWbsmFNGp/J9KxLm2nq/IH8IkuTZF60Y/nAe9bxG3MdWxel8XZP8jT 21dbBoCOYlNl6K5l+R36b9uWXr3l8TvoaGlAiD24TraO2Dk0NdzS+ffSrCBdRX9rgFls r5O6TE6vJDXc8edXglRuL2tP6n95PmI+Om8/1PUL0wpjX4oZl9Mhr0eOT7TeUywngFWp cWsw== X-Gm-Message-State: AO0yUKXAjqM4c+CmWxQYcmvzJUBWcbm/KT2WUG5p2UYzvm1+KOTA/s5X xTnsaTTpeAtuPwLK5+Exf5v42/vdiCU= X-Google-Smtp-Source: AK7set8KvTH8Rq3nrMN9eZTRffzOpei/K+6cJ86O5YjbX4/xwdopgGncE5LgM1qHFAiZKVZ3V1gM/g== X-Received: by 2002:a4a:cb8e:0:b0:4fb:cef6:5c9d with SMTP id y14-20020a4acb8e000000b004fbcef65c9dmr4063909ooq.9.1675894168599; Wed, 08 Feb 2023 14:09:28 -0800 (PST) Received: from sekai ([2804:14c:da80:82e2::4cf]) by smtp.gmail.com with ESMTPSA id h13-20020a4aa28d000000b004fd878ef510sm7999882ool.21.2023.02.08.14.09.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 14:09:28 -0800 (PST) From: Fernando de Morais To: Juri Linkov Subject: Re: bug#61308: 28.2; icomplete --- Error in post-command-hook: wrong-type-argument In-Reply-To: <86cz6k1v3a.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 08 Feb 2023 09:20:57 +0200") Date: Wed, 08 Feb 2023 19:09:09 -0300 Message-ID: <87a61n6c8q.fsf@gmail.com> References: <87wn4vh6b9.fsf@gmail.com> <86cz6k1v3a.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61308 Cc: 61308@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Juri, Juri Linkov writes: > Interesting bug report. I guess we need to double-check > if we are still in the right buffer after help-window-select > selects another window and thus confuses icomplete-mode: > > diff --git a/lisp/icomplete.el b/lisp/icomplete.el > index 014f38b2024..97457832e2c 100644 > --- a/lisp/icomplete.el > +++ b/lisp/icomplete.el > @@ -686,6 +686,8 @@ icomplete-exhibit > Should be run via minibuffer `post-command-hook'. > See `icomplete-mode' and `minibuffer-setup-hook'." > (when (and icomplete-mode > + ;; Check if still in the right buffer (bug#61308) > + (or (window-minibuffer-p) completion-in-region--data) > (icomplete-simple-completing-p)) ;Shouldn't be necessary. > (let ((saved-point (point))) > (save-excursion This solved the problem, thank you! =F0=9F=A4=9D I hope this path gets merged upstream. --=20 Regards, Fernando de Morais. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 09 13:10:36 2023 Received: (at 61308) by debbugs.gnu.org; 9 Feb 2023 18:10:37 +0000 Received: from localhost ([127.0.0.1]:33671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQBNU-0000ts-Km for submit@debbugs.gnu.org; Thu, 09 Feb 2023 13:10:36 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:45569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQBNS-0000tK-EW; Thu, 09 Feb 2023 13:10:35 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id A0122240008; Thu, 9 Feb 2023 18:10:26 +0000 (UTC) From: Juri Linkov To: Fernando de Morais Subject: Re: bug#61308: 28.2; icomplete --- Error in post-command-hook: wrong-type-argument In-Reply-To: <87a61n6c8q.fsf@gmail.com> (Fernando de Morais's message of "Wed, 08 Feb 2023 19:09:09 -0300") Organization: LINKOV.NET References: <87wn4vh6b9.fsf@gmail.com> <86cz6k1v3a.fsf@mail.linkov.net> <87a61n6c8q.fsf@gmail.com> Date: Thu, 09 Feb 2023 20:09:34 +0200 Message-ID: <86y1p6pv6p.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 61308 Cc: 61308@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) close 61308 30.0.50 thanks >> diff --git a/lisp/icomplete.el b/lisp/icomplete.el >> index 014f38b2024..97457832e2c 100644 >> --- a/lisp/icomplete.el >> +++ b/lisp/icomplete.el >> @@ -686,6 +686,8 @@ icomplete-exhibit >> Should be run via minibuffer `post-command-hook'. >> See `icomplete-mode' and `minibuffer-setup-hook'." >> (when (and icomplete-mode >> + ;; Check if still in the right buffer (bug#61308) >> + (or (window-minibuffer-p) completion-in-region--data) >> (icomplete-simple-completing-p)) ;Shouldn't be necessary. >> (let ((saved-point (point))) >> (save-excursion > > This solved the problem, thank you! 🤝 > > I hope this path gets merged upstream. Now merged to master. Thanks for the bug report. From unknown Sun Jun 15 08:16:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 10 Mar 2023 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator