Subject: bug#58019: 28.2; ido-find-file tries to read URL with unnecessary trailing slash

From: Akira Shirai <[email-masked]>
Date: Fri, 23 Sep 2022 16:29:13 +0900

ido-find-file tries to read URL with unnecessary trailing slash.

1. emacs -Q
2. evaluate (ido-mode 1), (ido-everywhere 1), and (setq ido-use-url-at-point t)
3. type a URL like https://www.gnu.org/savannah-checkouts/gnu/emacs/emacs.html and move point onto the URL
4. type C-x C-f to run ido-find-file
   => ido-find-file tries to read URL with unnecessary trailing slash
   => Find file or URL: https://www.gnu.org/savannah-checkouts/gnu/emacs/emacs.html/ [Not readable]

In GNU Emacs 28.2 (build 1, x86_64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.5.1 (Build 21G83))
of 2022-09-14 built on F9A6231BCF26.local
Windowing system distributor 'Apple', version 10.3.2113
System Description:  macOS 12.6

Configured using:
'configure --with-ns --without-x --without-compress-install
--with-gnutls=no'

Configured features:
ACL LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS TOOLKIT_SCROLL_BARS
ZLIB

Important settings:
  value of $LANG: ja_JP.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  ido-everywhere: 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 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 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap ffap thingatpt url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs cl-loaddefs cl-lib
password-cache json subr-x map url-vars ido seq byte-opt gv bytecomp
byte-compile cconv japan-util 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 multi-tty make-network-process emacs)

Memory information:
((conses 16 78376 6570)
(symbols 48 7466 1)
(strings 32 33899 2371)
(string-bytes 1 914334)
(vectors 16 16919)
(vector-slots 8 294099 15234)
(floats 8 32 44)
(intervals 56 200 0)
(buffers 992 10))