From unknown Sat Sep 20 07:24:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59674: 28.2; icomplete-force-complete Incorrectly Completes Filename Case Resent-From: Cameron Norton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2022 09:46:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59674 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 59674@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166971513524418 (code B ref -1); Tue, 29 Nov 2022 09:46:03 +0000 Received: (at submit) by debbugs.gnu.org; 29 Nov 2022 09:45:35 +0000 Received: from localhost ([127.0.0.1]:54190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozxBE-0006Lg-CY for submit@debbugs.gnu.org; Tue, 29 Nov 2022 04:45:35 -0500 Received: from lists.gnu.org ([209.51.188.17]:60234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozrke-0002kT-VI for submit@debbugs.gnu.org; Mon, 28 Nov 2022 22:57:45 -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 1ozrke-00022D-MS for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 22:57:44 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ozrkc-0000QO-MY for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 22:57:44 -0500 Received: by mail-pl1-x634.google.com with SMTP id g10so12184185plo.11 for ; Mon, 28 Nov 2022 19:57:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=6+bdSZuTTILQ686+avnqQXCXuzYhSqZ7cmMwAxFePWM=; b=ZY+1Qbptr1Xoj4LNjVqdwG1W9Lne5mjv4pU/bmhqqFUu+tSNunRhAYDHmVT5yL0psw la6Ol5/Xu4NVJIMkbuzQObu8wCgFG7fwvvVatx3cKBHh1n5V/n7QaaVZnS9mEqnhuIS4 kTheS0iz/wecaktGi+nWDYWj7u0I9Ciaw+x6bQFY6boow2vjC+mKmSSj09uAV50ryf9X w9GYVUFvzEFnhKrslI8AmzgNraJPXnMUM2uqfXMmhrvuuG7cfTfDUpibfEipkPCgD4Lf Dzk0fg57CMD97vanYL659Dgec7xm+X/CXtIONSRuklfMxzp7Q3MEYuHNX+MzvFnarURV ELmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6+bdSZuTTILQ686+avnqQXCXuzYhSqZ7cmMwAxFePWM=; b=pcxDtQZEinVm0HHdeIi9w+yBknZweGaoCXImQX85iyjyzvukhKSIdYO0/RToZwhOMK Tlt6LgyBV+gUanZCkJimKg9aWHwF7cn9HBF73ns3vEACXZ9bWtRMwfu519F1yzXC6f5c t3eFm+ZyjDLk9ACrQLb6ZjARcU9VdacTHBUISVT3bOMffSXOpr7H35vKuGf+7EawtNzu mPaefopOQWB0Y0KCvOb3ASro/K9kOWSiEBMR0eqwTHCDFsUXD79FlFfNBvLDAPyHGkT2 2fbeplhu7IebYmxYTfPB5MgCWXAgC0KyX11r+tLNKrT6PfkNRp+umWi1ASWwOl6n65j6 eeyQ== X-Gm-Message-State: ANoB5pkPP8WXeMSuUZG1hFuyuIgwqEYWq2sYIHfSCXQCttGL5Hauloqk eVSq5Idd0ta1S6xsJYBgBwXcF+kDpVo= X-Google-Smtp-Source: AA0mqf7/bVDLyvZSoklVKtsa+tAbj9BpIdog/h0geJtsxytmrGWBrN/PbJ39vUAdUFvyioctiwu0ag== X-Received: by 2002:a17:902:8f96:b0:189:3803:23e6 with SMTP id z22-20020a1709028f9600b00189380323e6mr32763702plo.77.1669694260258; Mon, 28 Nov 2022 19:57:40 -0800 (PST) Received: from Soflan ([98.97.113.188]) by smtp.gmail.com with ESMTPSA id z7-20020a170903018700b001782398648dsm9747931plg.8.2022.11.28.19.57.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 19:57:39 -0800 (PST) User-agent: mu4e 1.8.11; emacs 28.2 From: Cameron Norton Date: Mon, 28 Nov 2022 19:55:06 -0800 Message-ID: <87tu2i4dlg.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=cameron.norton@gmail.com; helo=mail-pl1-x634.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-Mailman-Approved-At: Tue, 29 Nov 2022 04:45:27 -0500 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 (--) Using icomplete, I often navigate to certain files by using a single character for each component of the path name before completing with icomplete-force-complete, which I have bound to while in the minibuffer. So a file ./foo/bar/baz/asdf.txt would be visited via the sequence C-x C-f f/b/b/a Using icomplete-force-complete this way emulates the behavior in completion packages like Vertico without the extra dependency. However, with completion case sensitivity disabled, this sometimes results in the file's path being completed incorrectly with regards to capitalization. This is very noticeable when finding files in the usual subdirectories of $HOME, with ~/doc completing to ~/documents/ rather than ~/Documents/, for example. I can consistently reproduce this behavior through these steps. I have done this on both my usual Emacs 28.2 as well as the git master (currently 7939184). 1. Start a clean emacs via emacs -Q. 2. Evaluate the following: (icomplete-mode) (setq read-file-name-completion-ignore-case t) 3. Navigate to some subdirectory of $HOME via M-x cd or equivalent. 4. Start using C-x C-f to find a file in a different subdirectory of $HOME. The target file should be located in a subdirectory that starts with a capital letter (e.g. start finding something under ~/Documents somewhere). 5. Enter the file's pathname relative to the home directory (starting with ~/) or an abbreviation like above using all lowercase letters. Do not use any completion while doing so, and do not clear the minibuffer of the current non-home directory beforehand. 6. Complete the whole filename using icomplete-force-complete, which is bound to C-M-i by default. An example run on my machine has me cd to ~/Downloads M-x cd ~/Downloads then try to find the file ~/Documents/Misc/asdf.org by entering C-x C-f ~/d/m/a C-M-i This instead completes to ~/documents/Misc/asdf.org, with "Documents" uncapitalized but the other components completing with proper capitalization. (Apologies if this sent twice, I'm having unrelated technical issues.) Cameron Norton --- In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-09-12 built on frederik Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 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 -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 $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/d Minor modes in effect: icomplete-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-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 indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail vc-git diff-mode vc-dispatcher mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail org-element avl-tree generator ol-rmail ol-mhe ol-irc ol-info rmail-loaddefs auth-source eieio eieio-core eieio-loaddefs password-cache rfc2047 rfc2045 ietf-drums text-property-search mail-utils mm-util mail-prsvr wid-edit ol-docview doc-view jka-compr image-mode exif dired dired-loaddefs 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 pcomplete comint ansi-color ring org-list org-faces org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic json map bibtex iso8601 time-date ol org-keys oc org-compat advice org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs icomplete comp comp-cstr warnings subr-x rx cl-seq cl-macs cl-extra help-mode seq byte-opt gv cl-loaddefs cl-lib 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 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 182238 12573) (symbols 48 17422 0) (strings 32 55330 1555) (string-bytes 1 1877711) (vectors 16 29245) (vector-slots 8 520890 14491) (floats 8 109 254) (intervals 56 630 0) (buffers 992 14)) From unknown Sat Sep 20 07:24:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59674: 28.2; icomplete-force-complete Incorrectly Completes Filename Case Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2022 13:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59674 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Cameron Norton Cc: 59674@debbugs.gnu.org Received: via spool by 59674-submit@debbugs.gnu.org id=B59674.16697285049448 (code B ref 59674); Tue, 29 Nov 2022 13:29:01 +0000 Received: (at 59674) by debbugs.gnu.org; 29 Nov 2022 13:28:24 +0000 Received: from localhost ([127.0.0.1]:54488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p00eu-0002SK-F2 for submit@debbugs.gnu.org; Tue, 29 Nov 2022 08:28:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p00em-0002SE-9s for 59674@debbugs.gnu.org; Tue, 29 Nov 2022 08:28:21 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p00eg-0004Al-OU; Tue, 29 Nov 2022 08:28:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=FDs13zdL9/gDodwZUjqt348IP5i1ALwv6BAkIc3eF1g=; b=c8aBhtt2Jlou ejLZbG7j3FV+NII5kCXWfaqpC5XVoMPPA02j+QX9YOVMb3igkgVKOvUH13cig8IBj+kmxvxywSHgQ cGTbch73P/XXYhhaGW+d5ZRo7m1MngxKpnQBjWrY+TDoGrirQFfVPZHDvOmBxSHIbnJ2LvYVp24zD aERE7sciRi5I7mnNRcYAFpUDkTSjVs9+GT65JopnsNwdl2tD2dwTf77hotjjUMVr01RnZ6StXm/D7 gUmKH1K7TlFl4O/lp258Y+AwzbLo8iedEU3dzzGPcD0lBiPWrCevHB0P994gQ+NGtOTIoDnGwEw16 yBSEZr4Nm0FynZObgHW4OQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p00ef-0001uk-VD; Tue, 29 Nov 2022 08:28:10 -0500 Date: Tue, 29 Nov 2022 15:28:43 +0200 Message-Id: <838rjtnb3o.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87tu2i4dlg.fsf@gmail.com> (message from Cameron Norton on Mon, 28 Nov 2022 19:55:06 -0800) References: <87tu2i4dlg.fsf@gmail.com> X-Spam-Score: -2.3 (--) 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: -3.3 (---) > From: Cameron Norton > Date: Mon, 28 Nov 2022 19:55:06 -0800 > > > Using icomplete, I often navigate to certain files by using a single > character for each component of the path name before completing with > icomplete-force-complete, which I have bound to while in the > minibuffer. So a file > > ./foo/bar/baz/asdf.txt > > would be visited via the sequence > > C-x C-f f/b/b/a > > Using icomplete-force-complete this way emulates the behavior in > completion packages like Vertico without the extra dependency. > > However, with completion case sensitivity disabled, this sometimes > results in the file's path being completed incorrectly with regards to > capitalization. This is very noticeable when finding files in the usual > subdirectories of $HOME, with ~/doc completing to ~/documents/ > rather than ~/Documents/, for example. I cannot reproduce what you describe. I see a completely different behavior: as soon as I type ~/d/m M-C-i, ~/Documents disappears from the completions, and I see only ~/dir/moo ("dir" is another directory I have under my home directory). So I'm not sure why you see what you see: perhaps there's some step missing in the recipe? From unknown Sat Sep 20 07:24:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59674: 28.2; icomplete-force-complete Incorrectly Completes Filename Case Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2022 14:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59674 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 59674@debbugs.gnu.org, Cameron Norton Received: via spool by 59674-submit@debbugs.gnu.org id=B59674.166973183111592 (code B ref 59674); Tue, 29 Nov 2022 14:24:01 +0000 Received: (at 59674) by debbugs.gnu.org; 29 Nov 2022 14:23:51 +0000 Received: from localhost ([127.0.0.1]:54532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p01WZ-00030u-11 for submit@debbugs.gnu.org; Tue, 29 Nov 2022 09:23:51 -0500 Received: from heytings.org ([95.142.160.155]:36260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p01WX-00030o-EK for 59674@debbugs.gnu.org; Tue, 29 Nov 2022 09:23:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1669731828; bh=G6ywmSkU4IKVyuUbKX934PNb2OQVjYvHIY8uPdO9cdg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=cEBAP94Wn1GXBAj81rKSLR1bFEtlh90d8GqgURpEErRqv1L/As25VGLy5YF1fwrMM 2XTtoDQ/jUS5J9KOL0nfIY8LGJedXnc4TbUZcJZtopGssUAj1aAKBR7b1cLQzwa0yT kgrZgo6eT/P4wWfhWKNKNgnJ+9uYnSVZ2rMlPTCyy+9zP8qG+rOHBnQPa/qU/geK25 SB8/yINz+M4aOepp/qJ0qeP/ClGUo3Vuyf8nhlBCwjeu1p8TwEDekPDAbdBCJl5BNu f1aU5yz0mkxWba1oLm9JVJi/8OOzY3/2EHaZr/grLA1k73unYYIOYYUqryZ9EM67YX O9xlWCmm+KQCw== Date: Tue, 29 Nov 2022 14:23:47 +0000 From: Gregory Heytings In-Reply-To: <838rjtnb3o.fsf@gnu.org> Message-ID: References: <87tu2i4dlg.fsf@gmail.com> <838rjtnb3o.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) 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 (-) > > I cannot reproduce what you describe. I see a completely different > behavior: as soon as I type ~/d/m M-C-i, ~/Documents disappears from the > completions, and I see only ~/dir/moo ("dir" is another directory I have > under my home directory). > > So I'm not sure why you see what you see: perhaps there's some step > missing in the recipe? > The recipe is not incomplete, but it must be followed very carefully (it's really a corner case): mkdir -p ~/Zack/foo/bar ~/zock echo baz > ~/Zack/foo/bar/baz.txt emacs -Q M-x icomplete-mode RET M-: (setq read-file-name-completion-ignore-case t) RET M-x cd ~/zock RET C-x C-f ~/z/f/b/b ;; only type these characters, with only lower case letters ;; at that point you should see this in the minibuffer: ;; Find file: ~/zock/~/z/f/b/b[...ack/foo/bar/baz.txt] [Matched] C-M-i ;; now you see: ;; Find file: ~/zock/~/zack/foo/bar/baz.txt[...ack/foo/bar/baz.txt] [Matched] RET ;; the above baz.txt file is not opened, instead a new empty file is created, and you see: ;; Use M-x make-directory RET RET to create the directory and its parent