* bug#48995: 28.0.50; Within eshell, company completion for cd-less directory-changing wipes out all but the most recent subdirectory
@ 2021-06-13 3:23 Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-13 10:43 ` Basil L. Contovounesios
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-06-13 3:23 UTC (permalink / raw)
To: 48995
With an init file like
> (require 'company)
> (global-company-mode 1)
I run
> mkdir ~/apple ~/apple/ball ~/apple/ball/caterpillar ~/apple/ball/catnip
> emacs -q -l above-init.el
and start Eshell in the home directory. At the Eshell prompt, I type
> apple/ball/cat
and am presented with two candidates for completion in the Company popup. Choosing either one will complete with that subdirectory alone (for example, "catnip/" instead of something like the desired "/home/alice/apple/ball/catnip/").
This issue appears only in Emacs 28; if I perform the same experiment with the latest rev of origin/emacs-27, the completion correctly completes with the full path.
In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.16.0)
Repository revision: 0afab352e02d7070a8ced2af53c1d01217400cdf
Repository branch: master
System Description: NixOS 21.11 (Porcupine)
Configured using:
'configure
--prefix=/nix/store/9ywhrly5lb0565d7kz830j339hiwm4hg-emacs-gcc-20210612.0
--disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
--with-cairo --with-native-compilation'
Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX 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 $EMACSLOADPATH:
value of $EMACSNATIVELOADPATH: /nix/store/qf9ylv3vh988ls6y2fpmm6y4gk9mvka4-emacs-packages-deps/share/emacs/native-lisp::
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Eshell
Minor modes in effect:
shell-dirtrack-mode: t
eshell-prompt-mode: t
eshell-hist-mode: t
eshell-pred-mode: t
eshell-cmpl-mode: t
eshell-proc-mode: t
eshell-arg-mode: t
global-company-mode: t
company-mode: t
gpm-mouse-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
transient-mark-mode: t
Load-path shadows:
/run/current-system/sw/share/emacs/site-lisp/site-start hides /nix/store/qf9ylv3vh988ls6y2fpmm6y4gk9mvka4-emacs-packages-deps/share/emacs/site-lisp/site-start
/run/current-system/sw/share/emacs/site-lisp/site-start hides /nix/store/9ywhrly5lb0565d7kz830j339hiwm4hg-emacs-gcc-20210612.0/share/emacs/site-lisp/site-start
Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs auth-source password-cache json map 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 cl-extra help-mode em-unix em-term term shell
ehelp em-script em-prompt em-ls em-hist em-pred em-glob em-dirs esh-var
em-cmpl pcomplete comint ansi-color em-basic em-banner em-alias esh-mode
eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module
esh-groups esh-util company-oddmuse company-keywords company-etags etags
fileloop generator xref cl-seq project eieio eieio-core cl-macs
eieio-loaddefs ring company-gtags company-dabbrev-code company-dabbrev
company-files company-clang company-capf company-cmake company-semantic
company-template company-bbdb company edmacro kmacro pcase subr-x
cl-loaddefs cl-lib t-mouse term/linux jka-compr seq byte-opt gv bytecomp
byte-compile cconv disp-table iso-transl 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 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 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
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 109316 9452)
(symbols 48 9713 0)
(strings 32 31428 1928)
(string-bytes 1 1096160)
(vectors 16 17532)
(vector-slots 8 361930 8072)
(floats 8 54 296)
(intervals 56 248 0)
(buffers 992 12))
--
Mailfence.com
Private and secure email
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#48995: 28.0.50; Within eshell, company completion for cd-less directory-changing wipes out all but the most recent subdirectory
2021-06-13 3:23 bug#48995: 28.0.50; Within eshell, company completion for cd-less directory-changing wipes out all but the most recent subdirectory Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-06-13 10:43 ` Basil L. Contovounesios
2022-05-01 21:37 ` Dmitry Gutov
2023-01-07 10:24 ` bug#48995: Apparently fixed Nicolas Martyanoff
2023-01-07 10:37 ` bug#48995: apparently fixed Nicolas Martyanoff
2 siblings, 1 reply; 7+ messages in thread
From: Basil L. Contovounesios @ 2021-06-13 10:43 UTC (permalink / raw)
To: 48995; +Cc: Stefan Monnier, Brian Leung
Brian Leung via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@gnu.org> writes:
> With an init file like
>
>> (require 'company)
>> (global-company-mode 1)
>
> I run
>
>> mkdir ~/apple ~/apple/ball ~/apple/ball/caterpillar ~/apple/ball/catnip
>> emacs -q -l above-init.el
>
> and start Eshell in the home directory. At the Eshell prompt, I type
>
>> apple/ball/cat
>
> and am presented with two candidates for completion in the Company
> popup. Choosing either one will complete with that subdirectory alone
> (for example, "catnip/" instead of something like the desired
> "/home/alice/apple/ball/catnip/").
>
> This issue appears only in Emacs 28; if I perform the same experiment
> with the latest rev of origin/emacs-27, the completion correctly
> completes with the full path.
I suspect this is the same issue as the following, so I'm CCing Stefan.
https://lists.gnu.org/r/emacs-devel/2021-05/msg01220.html
https://lists.gnu.org/r/emacs-devel/2021-06/msg00254.html
I'm not familiar with Company, but in the case of Ivy, the problem boils
down to the following change in behaviour, starting with this change:
* lisp/eshell/em-cmpl.el: Try and fix bug#41423
82c76e3aeb 2021-01-31 19:27:10 -0500
https://git.sv.gnu.org/cgit/emacs.git/commit/?id=82c76e3aeb2465d1d1e66eae5db13ba53e38ed84
0. emacs -Q
1. Evaluate:
(let* (dir (clean (lambda () (when dir (delete-directory dir t)))))
;; Clean up temporary directory on exit.
(add-hook 'kill-emacs-hook clean)
;; Create temporary parent directory.
(setq dir (make-temp-file "ivy-" t))
;; Create 'bin' subdirectory.
(make-directory (expand-file-name "bin" dir))
;; Start `eshell' in parent directory.
(let ((default-directory dir))
(eshell))
;; Debug in-buffer completion.
(setq-local completion-in-region-function
(lambda (beg end table &optional pred)
(let* ((str (buffer-substring beg end))
(md (completion-metadata str table pred))
(all (completion-all-completions
str table pred (- end beg) md))
(standard-output (messages-buffer))
(inhibit-read-only t))
(terpri nil t)
(pp md)
(pp all)))))
2. C-h e
3. ./bi TAB
This used to yield:
(metadata
(cycle-sort-function . #[...])
(category . file)
(completion--unquote-requote . t))
(#("bin/"
0 1 (face completions-common-part)
1 2 (face completions-common-part arg-end t
rear-nonsticky (arg-end arg-begin))
2 3 (face (completions-first-difference)))
. 2)
but now yields:
(metadata (completion--unquote-requote . t))
(#("bin/" 0 4 (face (completions-common-part)))
. 0)
So even without Company/Ivy, there is some loss of information and the
highlighting in *Completions* is inaccurate.
Thanks,
--
Basil
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#48995: 28.0.50; Within eshell, company completion for cd-less directory-changing wipes out all but the most recent subdirectory
2021-06-13 10:43 ` Basil L. Contovounesios
@ 2022-05-01 21:37 ` Dmitry Gutov
0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Gutov @ 2022-05-01 21:37 UTC (permalink / raw)
To: Basil L. Contovounesios, 48995; +Cc: Stefan Monnier, Brian Leung
On 13.06.2021 13:43, Basil L. Contovounesios wrote:
> With an init file like
>
>> (require 'company)
>> (global-company-mode 1)
> I run
>
>> mkdir ~/apple ~/apple/ball ~/apple/ball/caterpillar ~/apple/ball/catnip
>> emacs -q -l above-init.el
> and start Eshell in the home directory. At the Eshell prompt, I type
>
>> apple/ball/cat
> and am presented with two candidates for completion in the Company
> popup. Choosing either one will complete with that subdirectory alone
> (for example, "catnip/" instead of something like the desired
> "/home/alice/apple/ball/catnip/").
>
> This issue appears only in Emacs 28; if I perform the same experiment
> with the latest rev of origin/emacs-27, the completion correctly
> completes with the full path.
Gentle ping: just want to confirm that this is still a problem, as
evidenced by a new report we just got on the Company bug tracker.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#48995: Apparently fixed
2021-06-13 3:23 bug#48995: 28.0.50; Within eshell, company completion for cd-less directory-changing wipes out all but the most recent subdirectory Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-13 10:43 ` Basil L. Contovounesios
@ 2023-01-07 10:24 ` Nicolas Martyanoff
2023-01-08 21:59 ` Dmitry Gutov
2023-01-07 10:37 ` bug#48995: apparently fixed Nicolas Martyanoff
2 siblings, 1 reply; 7+ messages in thread
From: Nicolas Martyanoff @ 2023-01-07 10:24 UTC (permalink / raw)
To: 48995
FYI This bug seems to have been fixed by
899055eef5b212d63e352ada2ac917d13c033a59.
--
Nicolas Martyanoff
https://n16f.net
nicolas@n16f.net
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#48995: apparently fixed
2021-06-13 3:23 bug#48995: 28.0.50; Within eshell, company completion for cd-less directory-changing wipes out all but the most recent subdirectory Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-13 10:43 ` Basil L. Contovounesios
2023-01-07 10:24 ` bug#48995: Apparently fixed Nicolas Martyanoff
@ 2023-01-07 10:37 ` Nicolas Martyanoff
2 siblings, 0 replies; 7+ messages in thread
From: Nicolas Martyanoff @ 2023-01-07 10:37 UTC (permalink / raw)
To: 48995
FYI This bug seems to have been fixed by
899055eef5b212d63e352ada2ac917d13c033a59.
--
Nicolas Martyanoff
https://n16f.net
nicolas@n16f.net
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-01-20 8:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-13 3:23 bug#48995: 28.0.50; Within eshell, company completion for cd-less directory-changing wipes out all but the most recent subdirectory Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-13 10:43 ` Basil L. Contovounesios
2022-05-01 21:37 ` Dmitry Gutov
2023-01-07 10:24 ` bug#48995: Apparently fixed Nicolas Martyanoff
2023-01-08 21:59 ` Dmitry Gutov
2023-01-20 8:27 ` Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-07 10:37 ` bug#48995: apparently fixed Nicolas Martyanoff
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).