Re: [Geany-Users] Feature request: "Open all" (after "Find in files")

2014-09-12 Thread Lex Trotman
On 12 September 2014 21:23, Nick Treleaven
 wrote:
> On 12/09/2014 09:38, Matthew Brush wrote:
>>
>> At least for my use, I actually want the files all open in Geany, then
>> maybe I'll do individual replace-in-file for each file or other edits on
>> each file that contains matches. Just modifying some unknown group of
>> potentially open or closed files en masse without any control or seeing
>> the results wouldn't be very useful for the mentioned use-case,
>> especially where the step #3 isn't a "replace-in-session" operation.
>
>
> Me too, for the same reason. From a terminal I use:
>
> grep blah -l |xargs geany -i &

Neat trick, I'll use that :)

>
> but it would be much nicer to use Find in Files then e.g. right click the
> Messages pane and choose Open All.

Agree the right click menu is the right place, my concern was having a
menu item that only applied when the message window was visible with
suitable contents.

Could also apply to any message window contents that recognise
filenames not just FIF results. As I said above if its automated it
doesn't matter if the file occurs several times since the open code
already has the checks to prevent opening multiple times.

Cheers
Lex

> ___
> Users mailing list
> Users@lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users


Re: [Geany-Users] Feature request: "Open all" (after "Find in files")

2014-09-12 Thread Nick Treleaven

On 12/09/2014 09:38, Matthew Brush wrote:

At least for my use, I actually want the files all open in Geany, then
maybe I'll do individual replace-in-file for each file or other edits on
each file that contains matches. Just modifying some unknown group of
potentially open or closed files en masse without any control or seeing
the results wouldn't be very useful for the mentioned use-case,
especially where the step #3 isn't a "replace-in-session" operation.


Me too, for the same reason. From a terminal I use:

grep blah -l |xargs geany -i &

but it would be much nicer to use Find in Files then e.g. right click 
the Messages pane and choose Open All.

___
Users mailing list
Users@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users


Re: [Geany-Users] Feature request: "Open all" (after "Find in files")

2014-09-12 Thread Matthew Brush

On 14-09-12 01:06 AM, Thomas Martitz wrote:

Am 11.09.2014 13:38, schrieb Péter:

Lex Trotman wrote:

I can manually add the extra "-l" option to grep, but maybe it is
worth to
add a "only file names" checkbox too.


You wouldn't need to do that, just ignore the line number in the
message window.  Opening from clicking on the line in the message
window already checks if the file is open and just switches to it
without re-opening.

Exactly where "open all files listed in the message window" menu item
should go is debatable, but if a pull request was provided then that
can be bikeshedded afterwards.


I guess it may be a quite common procedure currently to:
1. issue a "find in files" (with extra "-l" grep-option to achieve a
*lot* shorter list);
2. keep pressed the "next message" until all files (with the searched
text in them) get opened;


Neat, I usually just scroll down the list of matches and click on a 
random match from each file to get it opened in Geany. Didn't think 
about -l option for grep to make it easier.



3. issue a "replace all (in session, i.e. opened files)" command.

The 2. point is cumbersome, ugly, and maybe error-prone (is it
guaranteed that no file will skipped? will it start from the first hit?).



You can do all of this in a single grep-sed combo without involving geany.



You can also edit text files without involving Geany :) I think the 
point was to do it in Geany.



I guess if we wanted to have such a functionality inside Geany I would
do it in a way which doesn't actually involve opening the files. Perhaps
by calling sed (like we call grep for find in files).



At least for my use, I actually want the files all open in Geany, then 
maybe I'll do individual replace-in-file for each file or other edits on 
each file that contains matches. Just modifying some unknown group of 
potentially open or closed files en masse without any control or seeing 
the results wouldn't be very useful for the mentioned use-case, 
especially where the step #3 isn't a "replace-in-session" operation.


Cheers,
Matthew Brush

___
Users mailing list
Users@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users


Re: [Geany-Users] Feature request: "Open all" (after "Find in files")

2014-09-12 Thread Thomas Martitz

Am 11.09.2014 13:38, schrieb Péter:

Lex Trotman wrote:
I can manually add the extra "-l" option to grep, but maybe it is 
worth to

add a "only file names" checkbox too.


You wouldn't need to do that, just ignore the line number in the
message window.  Opening from clicking on the line in the message
window already checks if the file is open and just switches to it
without re-opening.

Exactly where "open all files listed in the message window" menu item
should go is debatable, but if a pull request was provided then that
can be bikeshedded afterwards.


I guess it may be a quite common procedure currently to:
1. issue a "find in files" (with extra "-l" grep-option to achieve a 
*lot* shorter list);
2. keep pressed the "next message" until all files (with the searched 
text in them) get opened;

3. issue a "replace all (in session, i.e. opened files)" command.

The 2. point is cumbersome, ugly, and maybe error-prone (is it 
guaranteed that no file will skipped? will it start from the first hit?).




You can do all of this in a single grep-sed combo without involving geany.

I guess if we wanted to have such a functionality inside Geany I would 
do it in a way which doesn't actually involve opening the files. Perhaps 
by calling sed (like we call grep for find in files).


Best regards.
___
Users mailing list
Users@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users


Re: [Geany-Users] Feature request: "Open all" (after "Find in files")

2014-09-11 Thread Lex Trotman
On 11 September 2014 21:38, Péter  wrote:
> Lex Trotman wrote:
>>>
>>> I can manually add the extra "-l" option to grep, but maybe it is worth
>>> to
>>> add a "only file names" checkbox too.
>>
>>
>> You wouldn't need to do that, just ignore the line number in the
>> message window.  Opening from clicking on the line in the message
>> window already checks if the file is open and just switches to it
>> without re-opening.
>>
>> Exactly where "open all files listed in the message window" menu item
>> should go is debatable, but if a pull request was provided then that
>> can be bikeshedded afterwards.
>
>
> I guess it may be a quite common procedure currently to:

How "common" something is is always debatable since everyone has their
own usage patterns, all you can say is it is common for you, and I
don't think I've ever done it :)


> 1. issue a "find in files" (with extra "-l" grep-option to achieve a *lot*
> shorter list);
> 2. keep pressed the "next message" until all files (with the searched text
> in them) get opened;
> 3. issue a "replace all (in session, i.e. opened files)" command.
>
> The 2. point is cumbersome, ugly, and maybe error-prone (is it guaranteed
> that no file will skipped? will it start from the first hit?).

So that will be extra incentive for you to provide a pull-request/patch :)

Cheers
Lex

>
>
> --
> Péter
>
>
> ___
> Users mailing list
> Users@lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users


Re: [Geany-Users] Feature request: "Open all" (after "Find in files")

2014-09-11 Thread Péter

Lex Trotman wrote:

I can manually add the extra "-l" option to grep, but maybe it is worth to
add a "only file names" checkbox too.


You wouldn't need to do that, just ignore the line number in the
message window.  Opening from clicking on the line in the message
window already checks if the file is open and just switches to it
without re-opening.

Exactly where "open all files listed in the message window" menu item
should go is debatable, but if a pull request was provided then that
can be bikeshedded afterwards.


I guess it may be a quite common procedure currently to:
1. issue a "find in files" (with extra "-l" grep-option to achieve a *lot* 
shorter list);
2. keep pressed the "next message" until all files (with the searched text in 
them) get opened;
3. issue a "replace all (in session, i.e. opened files)" command.

The 2. point is cumbersome, ugly, and maybe error-prone (is it guaranteed that no file will skipped? 
will it start from the first hit?).


--
Péter


___
Users mailing list
Users@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users


Re: [Geany-Users] Feature request: "Open all" (after "Find in files")

2014-09-10 Thread Lex Trotman
On 10 September 2014 21:12, Péter  wrote:
> It would be handy to have an "open all" command when the message tab shows
> the search results (with file names).
>
> (Because, among others, there is no "replace all, in this directory (and
> below)", only "replace all, in opened files".)

Editing closed files is a good way to screw things up royally since
you can't see what happened :)  So it should not be added as a
standard part of Geany.  Those who know enough to want to change all
files in the directory are probably also able to write scripts to do
so.

>
> I can manually add the extra "-l" option to grep, but maybe it is worth to
> add a "only file names" checkbox too.

You wouldn't need to do that, just ignore the line number in the
message window.  Opening from clicking on the line in the message
window already checks if the file is open and just switches to it
without re-opening.

Exactly where "open all files listed in the message window" menu item
should go is debatable, but if a pull request was provided then that
can be bikeshedded afterwards.

Cheers
Lex

>
> --
> Péter
>
>
>
> ___
> Users mailing list
> Users@lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users


Re: [Geany-Users] Feature request: "Open all" (after "Find in files")

2014-09-10 Thread Péter

I wrote:

"only file names" checkbox


(Or "file list".)


___
Users mailing list
Users@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users