From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Cameron Norton Newsgroups: gmane.emacs.bugs Subject: bug#59674: 28.2; icomplete-force-complete Incorrectly Completes Filename Case Date: Mon, 28 Nov 2022 19:55:06 -0800 Message-ID: <87tu2i4dlg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9432"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.11; emacs 28.2 To: 59674@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 29 10:46:29 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 1ozxC9-0002ER-2T for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Nov 2022 10:46:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozxBs-0001DF-FK; Tue, 29 Nov 2022 04:46:12 -0500 Original-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 1ozxBo-0001Bq-Q3 for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 04:46:08 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ozxBk-000689-Cd for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 04:46:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ozxBj-0006Mi-8l for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 04:46:03 -0500 X-Loop: help-debbugs@gnu.org 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-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166971513524418 (code B ref -1); Tue, 29 Nov 2022 09:46:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Nov 2022 09:45:35 +0000 Original-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 Original-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 Original-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 Original-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 Original-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) Original-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) 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-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 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249374 Archived-At: 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))