Replies: 18 comments 14 replies
-
Another sugguestion. In |
Beta Was this translation helpful? Give feedback.
-
太阳 ***@***.***> writes:
1. ( ) text/plain (*) text/html
Hi @thierryvolpiatto , I have made some changes in my local fork, and
if it's possible, I'd like to merge (some of) them with the
upstream. Following are the changes, if you're interested in any of
them, let me know and I'll make a PR. Thanks.
1. A helm-bm, which depends on bm, to show visual bookmarks created
by bm in buffer(s).
This would be a separate package, it could go in emacs-helm.
Oh but it seems it already exists: https://github.com/yasuyk/helm-bm.
2. A helm-flymake, helps to show flymake diagnostics in current
buffer.
Same for this one.
3. A new feature that can be used with helm-occur and helm-go-grep-ag
to grep in the parent directory.
What do you mean by parent directory? Parent directory of what?
I'll explain how I use it with helm-occur.
Thanks to explain, I guess you are opening buffers from files in a
directory and then launch helm-multi-occur-1 on these buffers.
If it is this, it is not implemented in Helm because too slow compared
to grep, but it is a good alternative for MSWindows users where grep is
not installed, otherwise on Linux grep is installed by default and it is
what is used for such task.
I bind C-s globally to helm-occur and also bind C-s to
helm-occur-grep-in-parent-dir in helm-occur-map, bind C-s to
helm-grep-in-parent-dir' in helm-grep-map`. When I want to search
something( e.g. "abc"), I'll press C-s to search it in current
buffer, if nothing is found or all results are useless, I can press
C-s again to search in current directory, and If I press C-s again,
it will search in upper directory. I find it very handy for me.
Looks interesting, this would go in Helm apart the initial global
binding (should be prefixed but I believe it is already).
4. Two sources, helm-outline and helm-theme, which are ported from
counsel. But I'm not sure whether there're copyright problems to
merge them.
These two should go in emacs-helm as separate packages like in 1) and 2),
but if you copy/paste the code from counsel it is indeed problematic.
Isn't helm-org.el with some modifications usable in outline as well?
5. In function helm-grep-ag-init, I encoded helm-pattern and
directory used in cmd-line.
Encode to what? default-*-coding-system?
Without these chagnes, I cann't use rg to search Chinese string on
Windows (Windows doesn't support utf-8 very well, and in China, it
uses gb18030 (or gbk, I forget which one) as coding system).
Is it working On Linux (without your changes)?
If so the change should be only for Windows (checking system-type).
I haven't observe any regressive bugs on Linux, so I guess it's safe
to make these changes.
So this would go in Helm.
So which one do you like? :)
All looks interesting, please make a separate PR and issue for each one.
Thanks.
…
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.*Message ID: ***@***.***>
--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
太阳 ***@***.***> writes:
1. ( ) text/plain (*) text/html
Another sugguestion. In helm-M-x-class, I find changing filtered-candidate-transformer's initform to helm-M-x-transformer-no-sort is better because you might want to use again what you
just used. Since helm-M-x-transformer-no-sort won't sort commands
history, what you just used is on the top of the list. It's very
convenient for me.
I have no particular opinion on this, sorting happens in this source
only when starting filtering, I generally do not filter when I want to
run the last commands I used, so I am not against this change, perhaps
make it optional with a user var as we may have complaint otherwise...
Same as for others make a separate PR.
Thanks.
…
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.*Message ID: ***@***.***>
--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
Also before you do any changes, I do not accept external dependencies like dash, s, f etc... and even seq in Helm. |
Beta Was this translation helpful? Give feedback.
-
太阳 ***@***.***> writes:
When you said "go in emacs-helm", you meant it could be in a seperate
repo like 'https://github.com/emacs-helm/helm-bm", right?
Yes.
Suppose that you have three files (f1, f2, f3) in directory /a/b/c/d,
and you open f1 and its buffer is the current. When you press C-s to
search "abc", helm-occur will first search it in f1's buffer, then you
press C-s again, helm will grep "abc" in directory "/a/b/c/d" (aka
files f1, f2, f3), when you press C-s again, it will grep all files
for "abc" in directory "/a/b/c" ( and all the subdirs ), just like you
invoke helm-grep-do-ag in directory "/a/b/c".
So we only need some keybindings for this, right?
It seems that helm-org only supports org-mode?
Yes, I meant modify it to support outline as well, not sure if it is
possible though.
Without my changes, it works on Linux, so I agree that these changes should be only for Windows.
I encode them with locale-coding-system, like the following
(cmd-line (helm-grep-ag-prepare-cmd-line
(encode-coding-string helm-pattern locale-coding-system)
(or (file-remote-p directory 'localname)
(encode-coding-string directory locale-coding-system))
type))
Hmm, seems safe to merge this as it is without making it specific for
windows.
…--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
太阳 ***@***.***> writes:
Suppose that you have three files (f1, f2, f3) in directory /a/b/c/d, and you open f1 and its buffer is the current. When you press C-s to search "abc", helm-occur will first search it
in f1's buffer, then you press C-s again, helm will grep "abc" in directory "/a/b/c/d" (aka files f1, f2, f3), when you press C-s again, it will grep all files for "abc" in directory "
/a/b/c" ( and all the subdirs ), just like you invoke helm-grep-do-ag in directory "/a/b/c".
So we only need some keybindings for this, right?
No.
Ah ok.
I added a new command helm-occur-grep-in-parent-dir in helm-occur.el, which looks like:
Specify you use ag in function names.
(defun helm-occur-grep-in-parent-dir ()
^^-ag
"Grep in the parent directory."
(interactive)
(let ((current-dir default-directory)
(input helm-input))
(when current-dir
(helm-run-after-exit #'helm-grep-ag-1 current-dir nil input))))
And I also added two variables helm-grep-dir and helm-grep-type , and a new command helm-grep-in-parent-dir in helm-grep.el
(defun helm-grep-in-parent-dir ()
^^-ag
"Grep in the parent directory."
(interactive)
(let ((parent-dir (file-name-parent-directory helm-grep-dir))
(type helm-grep-type)
(input helm-input))
(when parent-dir
(helm-run-after-exit #'helm-grep-ag-1 parent-dir type input))))
I also modified helm-grep-ag-1 to make it save directory and type to helm-grep-dir and helm-grep-type respectively.
Ok, will see the PR later.
Thanks.
…--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
About helm-bm (not yours but https://github.com/yasuyk/helm-bm), it needs some rework:
|
Beta Was this translation helpful? Give feedback.
-
太阳 ***@***.***> writes:
If I want to commit my helm-bm and helm-flymake to emacs-helm, you need to create these two repos first, right?
I see there is also a package helm-flymake at
https://github.com/tam17aki/helm-flymake.
I think it would be better to merge your code (or just fix like for
helm-bm) in existing projects.
Otherwise for other stuff you want to install in emacs-helm, I could
give you permissions to create/write, don't know yet how to do this as
github have changed its UI but I should find.
… —
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.*Message ID: ***@***.***>
--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
太阳 ***@***.***> writes:
太阳 @.*> writes:
If I want to commit my helm-bm and helm-flymake to emacs-helm, you need to create these two repos first, right?
I see there is also a package helm-flymake at https://github.com/tam17aki/helm-flymake. I think it would be better to merge your code (or just fix like for helm-bm) in existing
projects. Otherwise for other stuff you want to install in emacs-helm, I could give you permissions to create/write, don't know yet how to do this as github have changed its UI but I
should find.
…
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.>
-- Thierry
It seems this helm-flymake is not maintained well(in a issue, people
said it does not work together with Emacs 27.1), and there's no
reponse to issues.
In this case you could either move it to emacsorphanage and maintain
it from there or install your version here in emacs-helm under a new
name.
Did you try to contact the maintainer?
And the other helm-bm you mentioned does not see any commit in recent
8 years. I'm not sure it's possible or not to merge with them.
I forked it here https://github.com/thierryvolpiatto/helm-bm
and modify it to work properly, but yours is maybe better.
Same the maintainer should be contacted first.
… —
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.*Message ID: ***@***.***>
--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
@tarsius what do you think is the best to do for both helm-bm and helm-flymake? |
Beta Was this translation helpful? Give feedback.
-
Hello Jonas,
thanks for your advices on this, I think I fully agree with you.
We will try to contact the maintainers and move their packages with
modifications (they are mostly broken) to emacs-helm if they agree.
Jonas Bernoulli ***@***.***> writes:
… @tarsius what do you think is the best to do for both helm-bm and helm-flymake?
Of course I agree that the original authors should be contacted first.
In this case you could either move it to emacsorphanage and maintain
it from there or install your version here in emacs-helm under a new
name.
On Melpa we usually consider forking under a new name only as a last resort. It is better if the original author agrees to handover the package or to share responsibility with an
additional maintainer. Two packages that do the same thing is problematic because users will have to decide which should be used.
If the original author is unresponsive, hasn't touched the package in years, and there are serious issues, then it is okay for someone else to take over anyway. In such a case the Melpa
maintainers have to vet the volunteer to some extend, to reduce the risk of a malicious or unqualified person taking over. By putting the new repository on the Emacsorphanage, the risk can
be mitigated to an extend. If it turns out that there is a problem with the new maintainer, the organization owners can revoke their access.
But there are many package in the orphanage now and that limits our ability to look out for problematic behavior or even provide guidance. So in cases like this, where there is a clearly
more qualified person to "oversee" the work of the volunteer, it would be better if that person (you) took charge.
In short, I recommend that these packages be moved to the emacs-helm organization, not emacsorphanage.
See also https://github.com/melpa/melpa/wiki/Unmaintained-Packages-and-Forks.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.*Message ID: ***@***.***>
--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
@zbelial helm-flymake is now in emacs-helm, you should be able to start working on it, add yourself as maintainer, modify code etc... |
Beta Was this translation helpful? Give feedback.
-
Hi @thierryvolpiatto , about the grep-in-parent-dir feature, I guess I need some advice, thanks in advance. Here is the problem. |
Beta Was this translation helpful? Give feedback.
-
太阳 ***@***.***> writes:
Suppose that you have three files (f1, f2, f3) in directory /a/b/c/d, and you open f1 and its buffer is the current. When you press C-s to search "abc", helm-occur will first search it
in f1's buffer, then you press C-s again, helm will grep "abc" in directory "/a/b/c/d" (aka files f1, f2, f3), when you press C-s again, it will grep all files for "abc" in directory "
/a/b/c"( and all the subdirs ), just like you invoke helm-grep-do-ag in directory "/a/b/c".
Hi @thierryvolpiatto , about the grep-in-parent-dir feature, I guess I
need some advice, thanks in advance. Here is the problem. Let me
describe my workflow first. I use the helm-occur command to show all
lines matching something, if what I'm looking for can not be found, I
invoke helm-occur-grep-in-parent-dir-ag to grep all files in default
directory, then grep the upper parent directory using
helm-grep-in-parent-dir-ag command. But yesterday I found another
command, helm-occur-visible-buffers . This command can execute on
multiple buffers. Because these buffers' default-directory may be
different, when I invoke helm-occur-grep-in-parent-dir-ag from any
buffer, it can ONLY grep in that buffer's default-directory ( and then
the upper parent directory). This behaviour may be not what's
expected. The more natural behaviour may be to grep in all buffers'
default-directory, I'm not sure. Also I don't know how to implement it
now. Any advice?
What about using `helm-common-dir` with the buffer-file-name's of each
visible buffer as argument. This remind me I have to move this function
to helm-lib.
…--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
For helm-bm, the author is not responding and I am afraid he will not as there is no activity in his github repo since many years. |
Beta Was this translation helpful? Give feedback.
-
Jonas Bernoulli ***@***.***> writes:
1. ( ) text/plain (*) text/html
Thanks!
Wouldn't it make it more sense to move it to emacs-helm instead of your personal account?
Yes sure, I was waiting a possible answer from the author by courtesy.
Please add a library commentary, even if it is just
;; Helm sources for bm.el (https://github.com/joodland/bm).
Yes I didn't work yet on the headers (author, version, package-requires
etc...). Same I was waiting. If no answer until the end of the week I will
make the move to emacs-helm, possibly next week.
… —
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.*Message ID: ***@***.***>
--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
Hello Jonas,
Jonas Bernoulli ***@***.***> writes:
Okay, thanks!
I see you have already updated Melpa recipe, so I moved helm-bm to
emacs-helm, I will push last changes to headers in a few minutes, still
no answer from original author though.
Thanks.
… —
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.*Message ID: ***@***.***>
--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
Jonas Bernoulli ***@***.***> writes:
1. ( ) text/plain (*) text/html
Done.
Great! Thanks!
… —
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.*Message ID: ***@***.***>
--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
Hi @thierryvolpiatto , I have made some changes in my local fork, and if it's possible, I'd like to merge (some of) them into the upstream. Following are the changes, if you're interested in any of them, let me know and I'll make a PR. Thanks.
helm-bm
, which depends on bm, to show visual bookmarks created by bm in buffer(s).helm-flymake
, helps to show flymake diagnostics in current buffer.helm-occur
andhelm-go-grep-ag
to grep in the parent directory. I added two functions,helm-occur-grep-in-parent-dir
andhelm-grep-in-parent-dir
. I'll explain how I use it withhelm-occur
. I bind C-s globally tohelm-occur
and also bind C-s tohelm-occur-grep-in-parent-dir
inhelm-occur-map
, bind C-s tohelm-grep-in-parent-dir' in
helm-grep-map`. When I want to search something( e.g. "abc"), I'll press C-s to search it in current buffer, if nothing is found or all results are useless, I can press C-s again to search in current directory, and If I press C-s again, it will search in upper directory. I find it very handy for me.helm-outline
andhelm-theme
, which are ported from counsel. But I'm not sure whether there're copyright problems to merge them.helm-grep-ag-init
, I encodedhelm-pattern
anddirectory
used incmd-line
. Without these chagnes, I cann't use rg to search Chinese string on Windows (Windows doesn't support utf-8 very well, and in China, it uses gb18030 (or gbk, I forget which one) as coding system). I haven't observe any regressive bugs on Linux, so I guess it's safe to make these changes.So which one do you like? :)
Beta Was this translation helpful? Give feedback.
All reactions