Comments (25)
I'm actually unable to reproduce the original issue now. Currently, I do get a little delay when first listing the files or after 10 seconds of inactivity, but not after each character I type, as used to happen. So all looks good from my perspective.
from vertico.
Yes, remote-file-name-inhibit-cache
, is the way to configure Tramp's cache. It lived always in parallel to tramp-completion-reread-directory-timeout
, this has been clarified now.
For the problem of prompts I cannot say anything offhand. I would need to see a scenario, including traces. This is discussed better on the Tramp ML.
from vertico.
For a quick test, you can try any ssh server for which you don't have a password or login key installed, perhaps /ssh:git.savannah.gnu.org:/
does the job.
In fact, the first time you do this, there will be also a different prompt about accepting a fingerprint. This could also be problematic with Vertico – I don't know, but it's worth checking.
from vertico.
@cid0rz I don't have issues with Tramp currently. There is no need for any additional caching. Can you try the newest version of all packages? Newest commit ideally, not only newest released version. Furthermore - do you have an example configuration I can try with emacs -Q? Are doing anything special or do you access plain "/ssh:host:/path/to/file"?
from vertico.
Ill keep an eye on it and come back if necessary, now i need to catch up with something else using the now usable TRAMP, thank you :)
from vertico.
Yes, this is a known problem. I think this issue should actually be fixed on a lower level. You may want to compare Vertico with Icomplete. Icomplete does better, but it still feels slow with Tramp. There are not many differences between Icomplete and Vertico in how the completion table is accessed. Icomplete sets the variable non-essential=t
(such that it does not ask for passwords?) and then there is the icomplete-compute-delay
and icomplete-max-delay-chars
. I haven't investigated this closely. If you have some ideas for an easy fix please let me know - but I won't implement caching or workarounds on the ui level. My recommendation for heavy Tramp users is to use Selectrum, since Selectrum explicitly optimizes this use case, by replacing some of the file completion infrastructure with its own implementation.
from vertico.
I contacted the Tramp maintainer @albinus via mail. I hope he has some advice on this issue.
from vertico.
See the discussion on the mailing list:
- https://lists.gnu.org/archive/html/tramp-devel/2021-05/msg00016.html
- https://lists.gnu.org/archive/html/tramp-devel/2021-05/msg00018.html
from vertico.
To cache tramp directories for longer, set tramp-completion-reread-directory-timeout
to a larger value. The default value is 10s which is way too small.
from vertico.
One can also try to use an additional cache:
(defvar-local my-file-name-cache nil)
(defun my-file-name-all-completions (orig file dir)
(unless my-file-name-cache
(setq my-file-name-cache (make-hash-table :test #'equal)))
(all-completions file
(let ((completion-regexp-list))
(if-let (cached (gethash dir my-file-name-cache))
cached
(puthash dir (funcall orig "" dir)
my-file-name-cache)))))
(advice-add #'file-name-all-completions :around #'my-file-name-all-completions)
@astoff Does something like this help? But Tramp already does its own caching, so I would wonder if this improves anything.
from vertico.
I found the issue - the problem was that Vertico used a special file predicate.
from vertico.
Yes, some delay is there which is when the file names are retrieved initially. I wonder if this is better with Selectrum or Ivy? At least to me it feels like I can remove the disclaimer from the package, that it is not Tramp compatible. Now I think it is usable with Tramp.
from vertico.
No, I mean, at some point one has to call ls
in the remote, no way around this. Even in emacs -Q pressing C-x C-f /ssh:host:/ TAB TAB
often freezes for a couple of seconds, without any visual feedback.
As far as passwordless ssh remotes are concerned, all is good. I just tried the "sudo" remote and the password query didn't work. I believe there's an issue for that, already?
from vertico.
As far as passwordless ssh remotes are concerned, all is good. I just tried the "sudo" remote and the password query didn't work. I believe there's an issue for that, already?
There has been, but this is closed now as part of this one ;) I quickly tried the non-essential=t setting but this had other bad effects (not loading the file list at all?) so I didn't use it. It could be that there is no way to fix the prompt issue here. What do you want to see? Should this password prompt magically work? How does Icomplete handle this? I never had password prompts, since I always have some ssh agents running.
from vertico.
To cache tramp directories for longer, set
tramp-completion-reread-directory-timeout
to a larger value. The default value is 10s which is way too small.
tramp-completion-reread-directory-timeout
has been obsoleted in Tramp 2.4.5, part of Emacs 27.2.
from vertico.
@albinus Thank you! Is it remote-file-name-inhibit-cache then? The performance issue with all-completions
has been fixed here (f281aac). But there is still some issue with password prompts. Maybe @astoff can elaborate?
from vertico.
But there is still some issue with prompts. Maybe @astoff can elaborate?
You mean password prompts, right? Try C-x C-f /sudo::/ RET
. If you get the dired buffer, then it's just me.
from vertico.
@astoff Yes, password prompts. I get a dired buffer, but sudo is configured to not ask me.
from vertico.
Try C-x C-f /sudo::/ RET. If you get the dired buffer, then it's just me.
I get a dired buffer, but sudo is configured to not ask me.
Then even if you get a dired buffer, I might not be just me. 😅
from vertico.
What should I get? Can you please be specific?
from vertico.
I would need to see a scenario, including traces. This is discussed better on the Tramp ML.
Of course. Thank you for your help here! I will take it to the mailing list as soon as I get a better picture of what is going on, if it turns out that this is necessary.
@astoff I will try a modified sudoers file to check if there are password prompt issues.
from vertico.
I don't know. A password prompt does not work reliably with Icomplete, Selectrum etc. And with Vertico I am not seeing a prompt. I get an error "Opening connection...failed".
from vertico.
Hello,
Ive tried to move from my actual config with better-defaults (that use ido) to vertico with the following config:
(use-package vertico
:init
(vertico-mode)
;; Grow and shrink the Vertico minibuffer
;; (setq vertico-resize t)
;; Optionally enable cycling for `vertico-next' and `vertico-previous'.
;; (setq vertico-cycle t)
)
(use-package corfu
:config
(corfu-global-mode))
(use-package orderless
:init
(setq completion-styles '(orderless)
completion-category-defaults nil
completion-category-overrides '((file (styles . (partial-completion))))))
(use-package marginalia
:after vertico
:custom
(marginalia-annotators '(marginalia-annotators-heavy marginalia-annotators-light nil))
:init
(marginalia-mode))
(use-package consult)
When in my machine, everything worked fine and as expected. With TRAMP it was really slow, any path completion taked ages and even like froze so i had to C-g and start back. I have not tried to implement the cache shown in this issue, is it recommended to make a custom cache for vertico? Is it also necessary to increase the timeout as referred up? Thank you for the wonderful packages and for your help :)
from vertico.
Thank you, indeed using the main branches instead of the default straight recipes made the trick. It is a bit slow sometimes on tramp but is quite usable. I will try to publish my org configuraiton, meanwhile here it s
emacsvertico(org file).txt
By the way sometimes I sudo as sa different user or root, editing the partial path there is the more painful operation, moving along the path to get to the edit position to be more precise.
from vertico.
@cid0rz Okay, then the issue seems to be resolved as I had expected.
By the way sometimes I sudo as sa different user or root, editing the partial path there is the more painful operation, moving along the path to get to the edit position to be more precise.
Okay, what is the problem exactly? The minibuffer is just fundamental-mode
basically. This is not a Vertico issue. If you want special editing/navigation commands, you can write them easily.
from vertico.
Related Issues (20)
- Lagging cursor movement in Wayland
- Vertico distorts email attachments
- reject completions?
- Problematic completion Org mode commands
- Performance issues
- Pull request: don't delete right side of minibuffer after TAB HOT 1
- vertico-flat-mode with vertico-flat-max-lines > 1 does not respect (setq vertico-resize 'grow-only) HOT 5
- Query Regarding Functionality Similar to ivy-restrict-to-matches
- How to achieve fuzzy completion HOT 1
- Use a different sort strategy per command
- Error in post-command-hook (vertico--exhibit): (cyclic-function-indirection ConTeXt-mode)
- Keyboard macro and default M-x command selection
- Blank line among function completions with llama installed
- Odd issue with read-file-name and vertico
- Vertico taking several seconds to find file "~/", worse with Orderless HOT 1
- Should vertico allow prompt selection when `vertico-preselect` is set to `first`?
- Killing frame while vertico is active
- Apparent high CPU/memory footprint for Vertico when opening a Golang project
- Is there a way to clear M-x command history?
- Error in minibuffer-exit-hook (vertico-buffer--restore): (error "Attempt to delete minibuffer or sole ordinary window")
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vertico.