New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
helm-find-files fails with "Text is read-only" when the current path does not fit the frame when helm-echo-input-in-header-line
is t
#2579
Comments
Rodrigo Kassick ***@***.***> writes:
What happened?
When the full file path does not fit the current frame and helm-echo-input-in-header-line is t, trying to navigate up the file tree with helm-find-files fails with Text is read-only .
Oddly enough, this only happens after a new frame is created -- helm works perfectly with the long file name at the first frame you open it, but after creating a new frame, helm-find-files
starts failing on all frames.
Maximizing the current frame usually fixes the issue (as long as the path does fit inside the resized frame)
With (setq helm-echo-input-in-header-line nil) I could not observe the issue.
I was only able to reproduce on emacs-29 (currently at 6c86faec29e7e9f12b71886dc66b62e1da43cdf7, but I've been observing the issue for a while now).
Emacs-28.1 (as packaged by Fedora) did not present the issue
So you mean it is reproducible on emacs-29+ but not on emacs-28.1?
Here I couldn't reproduce on both (28 and 30, last from master).
Here what I did:
1) C-x 5 2 => new frame
2) M-: (setq helm-echo-input-in-header-line t)
3) C-x C-f (hff) and navigate to a looong directory and filename and
didn't have errors.
What did I miss to reproduce?
Will try again tomorrow more carefully.
Thanks.
…--
Thierry
|
Exactly
I've just compiled from master to make sure -- Still got the same error on 30. I've tried to follow your steps, got the same results. Are you sure that the full path did not fit inside the current frame without truncating? The steps-to-reproduce I provided were more on the line of "I'm currently vieweing a file inside a looong path and want to navigate from it". Yours, on the other hand, sounded more like "I'm at my home folder and I'm going to navigate to a file inside a looong path". Either way, navigating to the looong path also triggered the issue once the path became long enough (like
Maybe the path was not long enough? Maybe it needs to be at least twice the frame width? Maybe the bug is more easilly triggered when navigating upwards from a looong path ? Here I created a file inside
Let me know if you need any other information! |
in `helm-minibuffer-set-up-hook`.
Rodrigo Kassick ***@***.***> writes:
So you mean it is reproducible on emacs-29+ but not on emacs-28.1?
Exactly
Here I couldn't reproduce on both (28 and 30, last from master).
I've just compiled from master to make sure -- Still got the same error on 30.
I've tried to follow your steps, got the same results. Are you sure that the full path did not fit inside the current frame without truncating?
The steps-to-reproduce I provided were more on the line of "I'm currently vieweing a file inside a looong path and want to navigate from it". Yours, on the other hand, sounded more like
"I'm at my home folder and I'm going to navigate to a file inside a looong path".
Either way, navigating to the looong path also triggered the issue once the path became long enough (like /home/kassick/tmp/emacs-30-vanilla/nullam/eu/ante/vel/est/convallis/dignissim/
Fusce/suscipit/wisi/nec/facilisis/facilisis/est/dui) the cursor moves to the beginning of the minibuffer and I get the read-only message. In a 79 char wide frame, the path was truncated at
least once before this, without triggering the error. Also, the issue appears more like a transient bug when navigating to the long path -- on several attempts, it correctly navigated up
to nullam/eu/ante/vel/est/convallis/dignissim/Fusce/suscipit/wisi/nec/facilisis/facilisis/est/dui/fermentum/leo/quis/tempor/ligula/erat/quis/odio/Nunc/porta/vulputate/tellus/some_file.txt
and then back; In others, it would fail at some random point
What did I miss to reproduce?
Maybe the path was not long enough? Maybe it needs to be at least twice the frame width? Maybe the bug is more easilly triggered when navigating upwards from a looong path ?
I could reproduce by using
"nullam/eu/ante/vel/est/convallis/dignissim/Fusce/suscipit/wisi/nec/facilisis/facilisis/est/dui/fermentum/leo/quis/tempor/ligula/erat/quis/odio/Nunc/porta/vulputate/tellus/some_file.txt"
as current-buffer before starting helm-find-files, I could even reproduce
from 28.2 as well; when navigating to the same path from elsewhere
i.e. some_file.txt is not the current-buffer, I can't reproduce.
If I add helm-hide-minibuffer-maybe to helm-minibuffer-set-up-hook, it
fixes the issue, so I have add it by default.
… Here I had the following setup:
Will try again tomorrow more carefully.
Let me know if you need any other information!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.*Message ID: ***@***.***>
--
Thierry
|
Cool! I can confirm it fixes in the vanilla setup, but it's still failing in Spacemacs with the same setup. I'll wait for the next release and then open an issue there. Merci! |
I can still reproduce the bug in helm-20230101.1922 (commit 431e34d) with the following setup: (eval-when-compile
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(require 'use-package))
(use-package helm
:ensure t
:bind ("C-x C-f" . helm-find-files)
("M-x" . helm-M-x)
:config
(setq
helm-echo-input-in-header-line t ;; this would trigger the bug before; works as expected with the workaround below
helm-minibuffer-set-up-hook '(helm-hide-minibuffer-maybe) ;; proposed workaround
helm-display-header-line nil ;; with helm-20230101.1922 this triggers the bug
)
(helm-mode 1)) Setting |
Rodrigo Kassick ***@***.***> writes:
I can still reproduce the bug in helm-20230101.1922 (commit 431e34d) with the following setup:
(setq
helm-echo-input-in-header-line t ;; this would trigger the bug before; works as expected with the workaround below
helm-minibuffer-set-up-hook '(helm-hide-minibuffer-maybe) ;;
Always use add-hook to setup a hook, NOT setq.
Setting helm-display-header-line to nil causes the bug to surface
again.
Of course, it have to be non nil inconditionally when you use
helm-echo-input-in-header-line. I will try to make this clear in
docstrings.
Thanks.
Spacemacs sets this to nil by default
🙄
…--
Thierry
|
…der-line is t When the current path is longer then the current frame width, helm-ff may open with the cursor in a wrong position. Any interaction will result in a "Text is readonly" message, until helm ends up navigating to the root folder and we can interact again. According to @thierryvolpiatto, helm-echo-input-in-header-line and helm-display-header-line must be both set. emacs-helm/helm#2579 (comment) Updating spacemac's defaults for these variables fixes the issue.
…der-line is t (#15876) helm-echo-input-in-header-line and helm-display-header-line must be both set. emacs-helm/helm#2579 (comment) Updated docstring makes this clear in helm documentation: emacs-helm/helm@4e39df9
What happened?
When the full file path does not fit the current frame and
helm-echo-input-in-header-line
ist
, trying to navigate up the file tree withhelm-find-files
fails withText is read-only
.Oddly enough, this only happens after a new frame is created -- helm works perfectly with the long file name at the first frame you open it, but after creating a new frame, helm-find-files starts failing on all frames.
Maximizing the current frame usually fixes the issue (as long as the path does fit inside the resized frame)
With
(setq helm-echo-input-in-header-line nil)
I could not observe the issue.I was only able to reproduce on emacs-29 (currently at
6c86faec29e7e9f12b71886dc66b62e1da43cdf7
, but I've been observing the issue for a while now).Emacs-28.1 (as packaged by Fedora) did not present the issue
Minimal
init.el
used for the tests:Installed packages:
Video reproducing the issue:
Gravacao.de.tela.de.2022-12-27.15-50-07.webm
Backtrace when the issue happens:
How to reproduce?
emacs-29
branchhelm-echo-input-in-header-line
set tot
helm-find-files
Expected result: Helm navigates to the parent folder
Observed result: a
Text is read-only
message, the cursor in an odd place in the helm window and eventually helm presents the files on the root folderHelm Version
Melpa or NonGnuElpa
Emacs Version
Emacs-28/29
OS
GNU/Linux
Relevant backtrace (if possible)
Minimal configuration
The text was updated successfully, but these errors were encountered: