aplteam / Fire

GUI for Find and Replace operations in Dyalog APL
MIT License
3 stars 0 forks source link

RFE: start with with a search phrase. #20

Closed norberturkiewicz closed 4 years ago

norberturkiewicz commented 4 years ago

I.e.

]fire search for this

Would start fire and execute the search with default settings.

aplteam commented 4 years ago

The argument is taken; you can do

      ]fire .

to start the search in the current namespace.

I could investigate and when it's not a dot put it into the "Search" field, but I am not particularly keen on this.

If you imply that the syntax should also "press" the OK button: 80% of the problems reported to me were caused by the fact that people did not realize that they had changed some parameter and then forgot about it. When they do not even see it any more, it's probably getting worse.

Why exactly is this important to you? Maybe I am missing something here but you need to type what you want to search for in any case, so that does not make any difference, yes? And saving the time it takes to press <enter> is not exactly a big time saver either.

norberturkiewicz commented 4 years ago

It seemed like a convenient way to do a quick search. I imagine It would work even if the gui was already up but hidden by bringing it to the front.

Maybe I should be asking if any of fire functionality will be exposed via an api?

aplteam commented 4 years ago

I could make that happen for search; replace is not going to work this way I think - way too dangerous.

The GUI parameters could become options/flags and the argument could be searched for. It could either be something like

]fire "Search for this" -nogui -case=1|0 ...

Or a completely different user command like

]firenogui "Search for this"  -case=1|0 ...

I would like to know what exactly you want to do with the result. That might be important!

norberturkiewicz commented 4 years ago

I agree about replace not being a smart idea.

My use is a quick find to get a quick hist list. Maybe a summary table of the first 10 matches and a note that more exist.

Would using regex be an option? I think less switches is better.

aplteam commented 4 years ago

I dislike the idea of restricting the output; there are better ways to do this.

I think the list of names should be returned as a nested matrix with one column. That could then either be assigned to a variable or put on display with the editor.

Watch this video:

https://www.dropbox.com/s/nk2ktlrn8fpcs7r/QED.mp4?dl=0

Would you like to see ⎕ED as part of the syntax of the user command framework? I've suggested this to Dyalog many times over the last 5 or so years....

Although I think it should be possible to say

RegEx are no problem but you need to specify -regex for this.

The switches would all have defaults, so you specify only those you need to change.

norberturkiewicz commented 4 years ago

Completely irrelevant but I don't think there is an uglier syntax than

]q←doSomething
norberturkiewicz commented 4 years ago

I dislike the idea of restricting the output; there are better ways to do this.

I think the list of names should be returned as a nested matrix with one column. That could then either be assigned to a variable or put on display with the editor.

Watch this video:

https://www.dropbox.com/s/nk2ktlrn8fpcs7r/QED.mp4?dl=0

Would you like to see ⎕ED as part of the syntax of the user command framework? I've suggested this to Dyalog many times over the last 5 or so years....

Although I think it should be possible to say

RegEx are no problem but you need to specify -regex for this.

The switches would all have defaults, so you specify only those you need to change.

HTMLRenderer for output or a temp html and open with default system viewer?

aplteam commented 4 years ago

It should have been q←]command really.

HTMLRenderer:

  1. That makes it version dependent: at least 17.0. Not an option.

  2. Why? If you want poper output you have to go via the GUI. It is all there. Only a list in the session makes kind of sense.