GNU bug report logs - #56531
27.2; Ido C-f in read-file-name inserts twice the initial name

Previous Next

Package: emacs;

Reported by: Tobias Bora <tobias.bora <at> gmail.com>

Date: Wed, 13 Jul 2022 09:28:01 UTC

Severity: normal

Merged with 56532

Found in version 27.2

To reply to this bug, email your comments to 56531 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#56531; Package emacs. (Wed, 13 Jul 2022 09:28:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tobias Bora <tobias.bora <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 13 Jul 2022 09:28:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Bora <tobias.bora <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.2; Ido C-f in read-file-name inserts twice the initial name
Date: Wed, 13 Jul 2022 11:27:11 +0200
Dear maintainers,

If you enable ido with (setq ido-auto-merge-work-directories-length -1)
and evaluate:

(read-file-name  "Picture name:" "/tmp" nil nil "defaultname.png")

and go at the end of the buffer with C-e (not sure why the cursor is not
there by default), and press C-f to come back to a normal file prompt
(not using ido), then the initial text is written one more time, so the
prompt is now:

/tmp/defaultname.png*defaultname.png

where * is the position of the cursor. I would expect C-f in that case
to just prompt /tmp/defaultname.png.

Thanks!

In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, 
cairo version 1.16.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: NixOS 22.05 (Quokka)

Recent messages:
Mark set
"/tmp/KRITA_SWAP_FILE_MWZMdW"
user-error: No window left from selected window
user-error: No window right from selected window
Quit
"/tmp/"
Delete /tmp/a.pdf? (y or n) n [2 times]
Quit [5 times]
Mark set
M-s-w is undefined

Configured using:
 'configure
 --prefix=/nix/store/88i1c5xv4cznlwwxvygd5m3w8m1g8czw-emacs-27.2
 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
 --with-cairo'

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

Important settings:
  value of $EMACSLOADPATH:
  value of $LANG: fr_FR.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8

Major mode: Text

Minor modes in effect:
  dap-tooltip-mode: t
  dap-ui-many-windows-mode: t
  dap-ui-controls-mode: t
  dap-ui-mode: t
  dap-auto-configure-mode: t
  dap-mode: t
  treemacs-filewatch-mode: t
  treemacs-follow-mode: t
  treemacs-git-mode: t
  treemacs-fringe-indicator-mode: t
  which-key-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  TeX-PDF-mode: t
  TeX-source-correlate-mode: t
  ido-ubiquitous-mode: t
  ido-everywhere: t
  show-paren-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  recentf-mode: t
  delete-selection-mode: t
  minions-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-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
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/leo/.nix-profile/share/emacs/site-lisp/site-start hides 
/run/current-system/sw/share/emacs/site-lisp/site-start
/home/leo/.nix-profile/share/emacs/site-lisp/site-start hides 
/nix/store/hlvi7jg87pr89j4d3xli0bjb21gj7pyr-emacs-packages-deps/share/emacs/site-lisp/site-start
/home/leo/.nix-profile/share/emacs/site-lisp/site-start hides 
/nix/store/88i1c5xv4cznlwwxvygd5m3w8m1g8czw-emacs-27.2/share/emacs/site-lisp/site-start

Features:
(shadow sort mail-extr emacsbug sendmail eieio-opt winner helm-mode
helm-files helm-buffers helm-occur helm-tags helm-locate helm-grep
helm-regexp helm-misc helm-types help-fns radix-tree cl-print debug
backtrace reftex-sel cursor-sensor reftex-ref reftex-parse reftex-toc
vc-git diff-mode misearch multi-isearch server texmathp preview
prv-emacs reftex-dcr tex-bar toolbar-x font-latex tex-mode latexenc smex
helm-lsp helm-imenu dap-mouse dap-ui bui bui-list bui-info bui-entry
bui-core bui-history bui-button bui-utils lsp-lens dap-java dap-mode
dap-launch posframe dap-overlays lsp-java request autorevert
lsp-treemacs lsp-treemacs-themes treemacs treemacs-header-line
treemacs-compatibility treemacs-mode treemacs-bookmarks
treemacs-interface treemacs-extensions treemacs-mouse-interface
treemacs-tags treemacs-persistence treemacs-filewatch-mode
treemacs-follow-mode treemacs-rendering treemacs-annotations
treemacs-async treemacs-workspaces treemacs-dom treemacs-visuals
treemacs-fringe-indicator treemacs-scope pulse treemacs-faces
treemacs-icons treemacs-themes treemacs-core-utils pfuture
treemacs-logging treemacs-customization treemacs-macros which-key lsp-ui
lsp-ui-doc goto-addr lsp-ui-imenu lsp-ui-peek lsp-ui-sideline lsp-mode
spinner network-stream markdown-mode color inline ewoc lsp-ui-util
lsp-protocol ht projectile lisp-mnt grep ibuf-ext ibuffer
ibuffer-loaddefs adoc-mode tempo markup-faces yaml-mode flyspell ispell
gdb-mi bindat gud lua-mode tuareg speedbar sb-image ezimage dframe
tuareg-opam smie caml-help caml-types caml-emacs find-file csharp-mode
cc-langs imenu cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs org-ref org-ref-helm-bibtex
org-ref-helm helm-utils helm-bibtex bibtex-completion filenotify biblio
biblio-download biblio-dissemin biblio-ieee biblio-hal biblio-dblp
biblio-crossref biblio-arxiv biblio-doi biblio-core let-alist url-queue
hl-line helm-net helm-help helm helm-source eieio-compat
helm-multi-match helm-lib helm-config helm-easymenu async-bytecomp async
org-ref-core reftex-cite reftex reftex-loaddefs reftex-vars parsebib
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 org-ref-glossary org-ref-bibtex
org-ref-citeproc message rfc822 mml mml-sec epa epg epg-config gnus-util
rmail rmail-loaddefs mm-decode mm-bodies mm-encode mailabbrev mail-utils
gmm-utils mailheader key-chord hydra lv doi-utils org-ref-utils
org-ref-pdf ol-bibtex bibtex htmlize cl f s dash haskell-mode
haskell-cabal haskell-utils haskell-font-lock haskell-indentation
haskell-string haskell-sort-imports haskell-lexeme haskell-align-imports
haskell-complete-module haskell-ghc-support etags fileloop xref project
dabbrev haskell-customize shell eaf derived eaf-interleave org-noter
org-element avl-tree generator org ob ob-tangle ob-ref ob-lob ob-table
ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete
org-list org-faces org-entities time-date noutline outline org-version
ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat org-macs
org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs
eaf-mindmap bookmark text-property-search pp yasnippet-snippets
yasnippet validate auctex-latexmk tex-buf latex latex-flymake
flymake-proc flymake compile comint ansi-color ring warnings thingatpt
tex-ispell tex-style tex dbus crm advice company-nixos-options company
nixos-options dired dired-loaddefs ido-completing-read+ memoize cus-edit
cus-start cus-load minibuf-eldef ido debpaste xml-rpc timezone url-http
url url-proxy url-privacy url-expand url-methods url-history mailcap
url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr url-cookie url-domsuf url-util url-gw nsm rmc puny xml
re-builder rx paren undo-tree diff windmove recentf tree-widget wid-edit
aggressive-indent edmacro kmacro delsel minions moody
doom-themes-ext-org doom-themes-ext-visual-bell face-remap
doom-nord-light-theme pcase doom-themes doom-themes-base cl-extra
help-mode use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core finder-inf tex-site info package easymenu browse-url
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 chemacs tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type 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 elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu 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 charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 1101562 135164)
 (symbols 48 60227 2)
 (strings 32 426576 20010)
 (string-bytes 1 11344777)
 (vectors 16 131038)
 (vector-slots 8 2144825 163904)
 (floats 8 912 893)
 (intervals 56 10876 1625)
 (buffers 1000 27))





Forcibly Merged 56531 56532. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 13 Jul 2022 10:58:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56531; Package emacs. (Wed, 13 Jul 2022 11:09:02 GMT) Full text and rfc822 format available.

Message #10 received at 56531 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tobias Bora <tobias.bora <at> gmail.com>
Cc: 56531 <at> debbugs.gnu.org, 56532 <at> debbugs.gnu.org
Subject: Re: bug#56532: 27.2; Ido C-f in read-file-name inserts twice the
 initial name
Date: Wed, 13 Jul 2022 13:07:59 +0200
Tobias Bora <tobias.bora <at> gmail.com> writes:

> Dear maintainers,
>
> If you enable ido with (setq ido-auto-merge-work-directories-length -1)
> and evaluate:
>
> (read-file-name  "Picture name:" "/tmp" nil nil "defaultname.png")
>
> and go at the end of the buffer with C-e (not sure why the cursor is not
> there by default), and press C-f to come back to a normal file prompt
> (not using ido),

Are there some missing bits in this recipe?  `C-f' after eval-ing that
form just moves point, it doesn't change what's prompted for.

In any case, in Emacs directories are supposed to end with a slash, so
the correct syntax would be:

(read-file-name  "Picture name:" "/tmp/" nil nil "defaultname.png")

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 13 Jul 2022 11:09:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56531; Package emacs. (Wed, 13 Jul 2022 14:17:01 GMT) Full text and rfc822 format available.

Message #15 received at 56531 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Bora <tobias.bora <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 56531 <at> debbugs.gnu.org, 56532 <at> debbugs.gnu.org
Subject: Re: bug#56532: 27.2; Ido C-f in read-file-name inserts twice the
 initial name
Date: Wed, 13 Jul 2022 16:16:22 +0200
[Message part 1 (text/plain, inline)]
Thanks for you answer.

Well the procedure is complete: C-f moves the point until you reach the 
end of the message and then it changes the prompt. If you do C-e as I 
explained before C-f, the point should already be at the end of the 
message and therefore it can't move further.

I tried to add a slash, the problem is the same, as demonstrated in the 
attached gif.

On 13/07/2022 13:07, Lars Ingebrigtsen wrote:
> Tobias Bora <tobias.bora <at> gmail.com> writes:
>
>> Dear maintainers,
>>
>> If you enable ido with (setq ido-auto-merge-work-directories-length -1)
>> and evaluate:
>>
>> (read-file-name  "Picture name:" "/tmp" nil nil "defaultname.png")
>>
>> and go at the end of the buffer with C-e (not sure why the cursor is not
>> there by default), and press C-f to come back to a normal file prompt
>> (not using ido),
> Are there some missing bits in this recipe?  `C-f' after eval-ing that
> form just moves point, it doesn't change what's prompted for.
>
> In any case, in Emacs directories are supposed to end with a slash, so
> the correct syntax would be:
>
> (read-file-name  "Picture name:" "/tmp/" nil nil "defaultname.png")
>
[Peek 13-07-2022 16-14.gif (image/gif, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56531; Package emacs. (Wed, 13 Jul 2022 15:01:01 GMT) Full text and rfc822 format available.

Message #18 received at 56531 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tobias Bora <tobias.bora <at> gmail.com>
Cc: 56531 <at> debbugs.gnu.org, 56532 <at> debbugs.gnu.org
Subject: Re: bug#56532: 27.2; Ido C-f in read-file-name inserts twice the
 initial name
Date: Wed, 13 Jul 2022 17:00:03 +0200
Tobias Bora <tobias.bora <at> gmail.com> writes:

> Well the procedure is complete: C-f moves the point until you reach
> the end of the message and then it changes the prompt.

With the recipe, `C-f' just says [End of buffer] -- no prompts are
changed.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Removed tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 12 Aug 2022 15:55:02 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 363 days ago.

Previous Next


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