helm-recoll
helm-recoll copied to clipboard
Helm follow mode doesn't work
If I activate helm-follow-mode
in a helm-recoll
session and go to another line, the candidates window dissappears and I get the error message Aborting an helm session running in background
.
My versions: helm-core: 20180712.837, helm-recoll: 20160731.921
Reading quickly the code, I hardly see how persistent-action works here. I see a persistent-action which is describe-variable which when helm-mode is enabled will call helm while helm-recoll is still running, I also wonder what describe-variable is doing here, describe which variable? Candidates are filenames here isn't it? @michael-heerdegen ?
So @student-sx to answer your question, it is normal you get such error with follow-mode because helm-recoll is trying to run describe-variable (helmized) while helm-recoll is still running.
By design, we are dealing here with two chained sessions. First one acts only as a candidate selector, which are then sent to the second one. In here, you'll be able to activate follow mode.
Fixed blindly because I don't use recoll myself, so not sure all will work properly, let me know. Thanks.
helm-recoll is broken for now, will try to fix it as soon as possible.
Ok, now fixed. Prefixing options (-f -l -o -a) before pattern is no more working, will try to fix it later.
Your changes modify the proposed previous behavior, see #7, where this package follows a two steps candidates selecting mode.
Cayetano Santos [email protected] writes:
Your changes modify the proposed previous behavior, see #7, where this package follows a two steps candidates selecting mode.
Sorry but the package was completely broken, I tried to repair it. Indeed I removed the two actions that was previously added by action-transformer. One action was jumping to marked candidates... To do what? Even more confusing was its help message describing the behavior of recoll but we are no more in recoll when this action is called! The second action was to symlink candidates, but this is already available... What did I miss?
PS: Note that there is no more maintainer for this package previously maintained by M.Heerdegen.
-- Thierry
Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997
Sorry but the package was completely broken, I tried to repair it.
Sure, thanks for that. Just wanted to point out former behavior.
Indeed I removed the two actions that was previously added by action-transformer. One action was jumping to marked candidates... To do what?
Apply a second filter, not related to recoll, to limit the candidates.
Even more confusing was its help message describing the behavior of recoll but we are no more in recoll when this action is called!
I agree, help message only applies to first step.
Cayetano Santos [email protected] writes:
Apply a second filter, not related to recoll, to limit the candidates.
You can execute any actions on marked candidates in the first place, sorry but I don't understand why calling a second Helm with marked candidates, in what it helps? Did I miss something?
Thanks.
-- Thierry
Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997
You can execute any actions on marked candidates in the first place, sorry but I don't understand why calling a second Helm with marked candidates, in what it helps? Did I miss something? Thanks.
An example of my use of it. Say you prompt (in query mode) for all occurrences with "ext:pdf java", and you get 10 candidates, for example. How to limit to occurrences in a given folder, then by name ? Whether you complete the query with "dir:myfolder" one or several times, and then "filename:NameOfFile" (using full complete names); whether you select all candidates with M-a, press enter and use helm to limit the candidates using fuzzy matching. Sure, this is only convenience, but much faster to me.
Anyhow, feel free to remove it if you consider it is redundant functionality, or make it optional, I may tune my local configuration to recover it afterwards.
By the way, I just noticed that the -l flag became -q (and omitted) in latest recoll.
Thierry Volpiatto [email protected] writes:
PS: Note that there is no more maintainer for this package previously maintained by M.Heerdegen.
Yes, sorry about that. I got a bit away from Helm, didn't follow the latest changes, and I also was never a regular user of recoll, so you can remove me from the header if you didn't have done so yet -- all the best!
Cayetano Santos [email protected] writes:
You can execute any actions on marked candidates in the first place, sorry but I don't understand why calling a second Helm with marked candidates, in what it helps? Did I miss something? Thanks.
An example of my use of it. Say you prompt (in query mode) for all occurrences with "ext:pdf java", and you get 10 candidates, for example. How to limit to occurrences in a given folder, then by name ? Whether you complete the query with "dir:myfolder" one or several times, and then "filename:NameOfFile" (using full complete names); whether you select all candidates with M-a, press enter and use helm to limit the candidates using fuzzy matching. Sure, this is only convenience, but much faster to me.
Make sense. What could be done instead is using a simple read-string to set pattern and then call recoll on this pattern, displaying results in helm, I think it is what helm-ag is doing. The downside is you lost the ability of rewriting pattern on the fly if it is wrong, you have to reenter it from initial read-string.
Anyhow, feel free to remove it if you consider it is redundant functionality, or make it optional, I may tune my local configuration to recover it afterwards.
I reenabled it for now as you need this.
By the way, I just noticed that the -l flag became -q (and omitted) in latest recoll.
Seems that -q should be used for each pattern in latest recoll.
-- Thierry
Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997
To me, this might be a valid option.
As you don't use recoll yourself, let me know when you're done, I'll test your changes in depth to be sure everything is ok.
Cayetano Santos [email protected] writes:
To me, this might be a valid option.
It is now working AFAICT.
As you don't use recoll yourself, let me know when you're done, I'll test your changes in depth to be sure everything is ok.
For me everything seems to work now, but as I am not used to recoll I may miss something, please let me know what is not working as soon as you have time to test.
Thanks.
-- Thierry
Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997
Using recoll 1.25.16 + Xapian 1.4.11 + emacs 26.2.90 + helm 3.2 + arch linux.
Doing a query for "keyword" works as expected; however, doing an "ext:pdf keyword" returns nothing. Note that in cli "recoll -t ext:pdf keyword" returns a lot of items.
When doing a "recoll -t -f/-a/-o", I get nothing.
Looking closely, I see that as a command I get "recoll -f -t -c /home/user/.recoll/folder -q keyword" instead of "recoll -t -c /home/user/.recoll/folder -f keyword", so probably the problem comes from the setup-cmd function.
Cayetano Santos [email protected] writes:
Using recoll 1.25.16 + Xapian 1.4.11 + emacs 26.2.90 + helm 3.2.
Doing a query for "keyword" works as expected; however, doing an "ext:pdf keyword" returns nothing. Note that in cli "recoll -t ext:pdf keyword" returns a lot of items.
Hmm, I tried this here with ext:md README and it worked fine, though I had some false positives, don't know why it is not working on your side, be sure to use the last helm-recoll as I did many changes recently.
-- Thierry
Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997
Cayetano Santos [email protected] writes:
Using recoll 1.25.16 + Xapian 1.4.11 + emacs 26.2.90 + helm 3.2.
Ah, please use the last helm (not the stable 3.2), may be it is the reason why "ext:pdf else" is not working. I added a new slot :match-dynamic which is not in 3.2.
Thanks.
-- Thierry
Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997
Cayetano Santos [email protected] writes:
Using recoll 1.25.16 + Xapian 1.4.11 + emacs 26.2.90 + helm 3.2.
Doing a query for "keyword" works as expected; however, doing an "ext:pdf keyword" returns nothing. Note that in cli "recoll -t ext:pdf keyword" returns a lot of items.
Hmm, I see also that you are not using -q option to specify query, I thought it was mandatory, I used "-q ext:md -q README", it is working here but maybe it prevents more complex querys? Do you think we should use -q or not? Or perhaps only one -q preceding query? (e.g. -q ext:pdf something else).
Thanks.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.*
-- Thierry
Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997
Ok, so using latest helm-recoll and helm 3.3 now, things work much better now. But still ...
When I just enter "ext:pdf keyword"
, all is ok, as the resulting command is "recoll -t -c confdir -q ext:pdf keyword"
(the -q may be omitted, as it is the default). To the opposite, when doing "-f keyword"
I get as a command "recoll -f -t -c confdir -q keyword"
which is wrong, as it must be "recoll -f -t -c confdir keyword"
. Same for -a
and -o
. Do you agree ?
By the way, line 268, you should be using "-q" and not "-l", right ?
Tried to fix these issues, have a look at here. What do you think ?
Cayetano Santos [email protected] writes:
Ok, so using latest helm-recoll and helm 3.3 now, things work much better now. But still ...
When I just enter "ext:pdf keyword", all is ok, as the resulting command is "recoll -t -c confdir -q ext:pdf keyword" (the -q may be omitted, as it is the default). To the opposite, when doing "-f keyword" I get as a command "recoll -f -t -c confdir -q keyword" which is wrong, as it must be "recoll -t -c confdir -f keyword". Same for -a and -o.
So you mean that the options "-l", "-f", "-a", and "-o" should be used instead of "-q" and not with it?
Do you agree ?
Dunno, here the description of the man page:
recoll [ -c
and
The -q option can be used to specify an initial query on the command line. This query will be interpreted by default as a query language string. If -a is specified, the query string will be interpreted as an all words simple search query. If -o is specified, the query string will be interpreted as an any word simple search query. If -f is specified, the query string will be interpreted as a file name simple search query. If -l is specified, the query string will be interpreted as a query language simple search query.
If you confirm that "-l" "-f" "-a" "-o" should be used in place of "-q" I will make the change.
-- Thierry
Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997
Hmm, tried like you suggest i.e. using "-l" "-f" "-a" "-o" instead of "-q" and I see no difference, you can try with this modified function:
(defun helm-recoll--setup-cmd (dir)
(let* ((patterns (split-string helm-pattern))
(option (helm-aand (member (car patterns) '("-l" "-f" "-a" "-o"))
(car it)))
(pattern-seq (if option (cdr patterns) patterns)))
(append helm-recoll-options
(list "-c" dir) (cons (or option "-q") pattern-seq))))
So you mean that the options "-l", "-f", "-a", and "-o" should be used instead of "-q" and not with it?
To me, -q, -l or no flag comes to the same, and recoll uses a query language pattern, check recoll -t -h
.
The -q option can be used to specify an initial query on the command line. This query will be interpreted by default as a query language string.
If -l is specified, the query string will be interpreted as a query language simple search query.
If you confirm that "-l" "-f" "-a" "-o" should be used in place of "-q" I will make the change.
I would say so, yes.
Hmm, tried like you suggest i.e. using "-l" "-f" "-a" "-o" instead of "-q" and I see no difference, you can try with this modified function:
Done. That's perfect to me. Maybe we should complete by forcing to fall back to its default query language search with -q in case one enters a non existing flag, say -p for example. Other than this, this is fine for me.
By the way, follow mode is ok now too. Thanks for your contribution !
Cayetano Santos [email protected] writes:
Hmm, tried like you suggest i.e. using "-l" "-f" "-a" "-o" instead of "-q" and I see no difference, you can try with this modified function:
Done. That's perfect to me. Maybe we should complete by forcing to fall back to its default query language search with -q in case one enters a non existing flag, say -p for example. Other than this, this is fine for me.
Ok merged.
Thanks.
-- Thierry
Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997
Hi, I am trying to have a "preview" like in the GUI version of recoll. Is this possible by follow-mode of some sort? Thanks.