-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Cannot pre-set 'follow attribute #2639
Comments
Alex Vorobiev ***@***.***> writes:
What happened?
I want to always see the content of the buffers whenever I have the
buffers source active. I tried adding this line to my configuration
(helm-set-attr 'follow 1 helm-source-buffers-list)
but helm-set-attr calls helm-get-current-source which fails with No buffer named *helm* error.
This is not working because the source is not already built, you have to
use cl-defmethod helm-setup-user-source to setup your source.
See
https://github.com/thierryvolpiatto/emacs-config/blob/main/init-helm.el#L355
and
https://github.com/emacs-helm/helm/wiki/FAQ#why-is-a-customizable-helm-source-nil.
But for follow you don't need this, instead set `helm-follow-mode-persistent` to t
and call once C-c C-f in helm-buffers-list or helm-mini and you are
done, next emacs session you will have follow enabled in this source, if
you call C-c C-f again follow will be disabled for next emacs session as well.
…--
Thierry
|
Thanks! Yes, I am aware of (setq helm-follow-mode-persistent t)
(unless (listp 'helm-source-names-using-follow)
(setq helm-source-names-using-follow (list)))
(add-to-list 'helm-source-names-using-follow "Buffers") Does it look reasonable? It feels like the the last line is good ergonomics and it looks more straightforward than the customizable source for this particular case. If |
Alex Vorobiev ***@***.***> writes:
1. ( ) text/plain (*) text/html
Thanks! Yes, I am aware of helm-follow-mode-persistent and I do use it
but I have many computers - both physical and often temporary virtual
- and would prefer a configuration where everything is pre-configured
to my liking from the beginning. I also share my settings with others
(often beginners) and telling them to memorize yet another emacs key
which they need to use only once seems cruel.
Tell them to remember C-h m (it is mentionned in mode-line), they will
find there a lot of infos.
After some experimentation I came up with this code (an excerpt form
my much larger helm configuration) which seems to be doing what I
want:
(setq helm-follow-mode-persistent t)
(unless (listp 'helm-source-names-using-follow)
(setq helm-source-names-using-follow (list)))
That's just mean helm is not loaded at this point, use (require 'helm) instead.
(add-to-list 'helm-source-names-using-follow "Buffers")
Does it look reasonable?
I generally prefer users use helm-follow-mode-persistent mechanism
though, but yes this is ok too.
It feels like the the last line is good ergonomics and if
helm-source-names-using-follow were initialized with an empty list by
default, the approach (and the strings corresponding to the source
names - I couldn't find them in the documentation) could be mentioned
somewhere in the help.
To have infos on a source use C-h d while running this source.
…--
Thierry
|
What happened?
I want to always see the content of the buffers whenever I have the buffers source active. I tried adding this line to my configuration
but
helm-set-attr
callshelm-get-current-source
which fails withNo buffer named *helm*
error.How to reproduce?
Run
prior to calling any helm commands.
Helm Version
Master branch
Emacs Version
Emacs-30+
OS
GNU/Linux
Relevant backtrace (if possible)
Minimal configuration
The text was updated successfully, but these errors were encountered: