Filters
- HaRT
- Moderator
- Posts: 10702
- Joined: Tue 30 Aug, 2005 17:21
- Has thanked: 212 times
- Been thanked: 342 times
Filters
Does the plugin support being applied to the selection only?
Will it replace the block (“vertical”) selection correctly?
When fed the selection, can it replace the entire editor contents?
Will it preserve/unify EOLs? Can this be toggled?
Can it handle
In general, it would be useful to have an outline of current and planned features (and of known bugs) in the announcement.
Will it replace the block (“vertical”) selection correctly?
When fed the selection, can it replace the entire editor contents?
Will it preserve/unify EOLs? Can this be toggled?
Can it handle
stderr
instead of/ together with stdout
?In general, it would be useful to have an outline of current and planned features (and of known bugs) in the announcement.
Фар есть инструмент, а не нянька. © 2009 DrKnS
Filters
Yes.
Vertical blocks are not supported. The plugin will refuse to execute on a vertical block.Will it replace the block selection (“vertical”) correctly?
Not at the moment. Only one or the other.Can it handlestderr
instead of/ together withstdout
?
All of that is written in the plugin's documentation. I could paste it into the announcement, sure, but then I would have to keep it updated with newer versions.In genera, it would be useful to have an outline of current and planned features (and of known bugs) in the announcement.
Filters
No, it will replace just the block.When fed the selection, can it replace the entire editor contents?
It will convert them to default. I don't think there's any other way of handling it because there is no real relation between the lines in the input and in the output.Will it preserve/unify EOLs?
No.Can this be toggled?
- HaRT
- Moderator
- Posts: 10702
- Joined: Tue 30 Aug, 2005 17:21
- Has thanked: 212 times
- Been thanked: 342 times
Filters
The obvious options are: use the filter output's EOLs verbatim OR use current editor's EOLs instead (I hope it's what you mean by default).
Фар есть инструмент, а не нянька. © 2009 DrKnS
Filters
To be honest, I think my current announcement is pretty much in-line with other people's plugin announcements. Not sure it would be appreciated if I spammed the announcement with a 200+ line text. After all, the brief description present should be sufficient for FAR users to know whether the plugin is completely outside of their need or that it might need a closer investigation.
Filters
Damn. I wanted a reply, not a thank-you. Oh well, I guess it can't hurt :-)
Anyway, yes, the plugin always uses editor's EOLs, since the text is entered using ECTL_SETSTRING with a NULL StringEOL. For the same reason the plugin also uses the editor's encoding.
- HaRT
- Moderator
- Posts: 10702
- Joined: Tue 30 Aug, 2005 17:21
- Has thanked: 212 times
- Been thanked: 342 times
Filters
I failed to find Windows pre-built packages there. Spent significant time to build it myself in 64-bit MinGW (finally, had to changepepak wrote: ↑Sat 10 Mar, 2018 10:02HTML View: This filter makes use of elinks (http://elinks.or.cz)
socklen_t
to size_t
and to add -lregex -L/F/msys64/mingw64/lib/binutils -liberty
to LIBS
in Makefile.config
) — only to see it (both in MinGW terminal and in CMD/FAR). What elinks packages do you use?Filters
I compiled my own using Cygwin (./autogen.sh & ./configure & make), that went without an issue. I failed to compile it using MingW no matter what I tried - even if compilation completed without errors, the executable didn't work.
Before that, I used binaries from here: http://www.paehl.com/open_source/?TextB ... extbrowser
Before that, I used binaries from here: http://www.paehl.com/open_source/?TextB ... extbrowser
- HaRT
- Moderator
- Posts: 10702
- Joined: Tue 30 Aug, 2005 17:21
- Has thanked: 212 times
- Been thanked: 342 times
Filters
Very nice interface trick in Settings to use double frame to indicate that the filters list has focus! It confused me at first but as I started moving around I liked it.
A simple wish: please add histories to the filter properties text fields: Description, File mask, Command template.
A more complex wish: support input of ad-hoc parameters to external filters. E.g. I add a “Sort” filter and then am able to specify the comparison starting column before each run.
It might support the same syntax as built-in metacharacters (in User menu, Apply command):
A simple wish: please add histories to the filter properties text fields: Description, File mask, Command template.
A more complex wish: support input of ad-hoc parameters to external filters. E.g. I add a “Sort” filter and then am able to specify the comparison starting column before each run.
It might support the same syntax as built-in metacharacters (in User menu, Apply command):
!?$<history>$<title>?<init>!
(I wonder if FAR API has a function to handle these in plugins). Or it might be some other syntax.Фар есть инструмент, а не нянька. © 2009 DrKnS
- HaRT
- Moderator
- Posts: 10702
- Joined: Tue 30 Aug, 2005 17:21
- Has thanked: 212 times
- Been thanked: 342 times
Filters
Bug 1: once I input a percent sign into the External Filter's command and press Space, an , the Plugins Configuration menu opens over the dialog once I discard the error message box, and both filter properties and filters list dialogs are unusable as I discard the menu.
Bug 2: the EOL of the last line resulting from the external filter is not inserted to the editor. This results in joining the last filtered line with the next original one.
Bug 3: if I Undo the filtering operation, the initial caret position is not restored.
Bug 2: the EOL of the last line resulting from the external filter is not inserted to the editor. This results in joining the last filtered line with the next original one.
Bug 3: if I Undo the filtering operation, the initial caret position is not restored.
Фар есть инструмент, а не нянька. © 2009 DrKnS
Filters
Personally, I hate it, but it looks better than all the alternatives I tried.
Are they not there already? If so, I must have overlooked them something, because having the history has always been my intention.A simple wish: please add histories to the filter properties text fields: Description, File mask, Command template.
On the TODO list. I wanted to get the plugin out fast and then polish these things. I will definitely be doing that once I settle on a reasonable UX solution.A more complex wish: support input of ad-hoc parameters to external filters. E.g. I add a “Sort” filter and then am able to specify the comparison starting column before each run.
Unfortunately, the built-in syntax is out. I had been looking into it when I was designing the command template, but then decided not to use it:It might support the same syntax as built-in metacharacters (in User menu, Apply command):!?$<history>$<title>?<init>!
(I wonder if FAR API has a function to handle these in plugins). Or it might be some other syntax.
- As far as I know, the API for processing of the syntax is not available to the plugins and I definitely do not want to implement it myself.
- Many (=almost all) of the template options are irrelevant (e.g. "selected files"?).
- There are no template options for the variables I need.
The error is mostly intended, if you want a percentage sign, you must double it. What is not correct is the fact that you get an untranslated message, you should see something like "unknown %q at position 10". Will fix.HaRT wrote: ↑Mon 26 Mar, 2018 23:56 Bug 1: once I input a percent sign into the External Filter's command and press Space, an "EConvertError: Format 'Unknown '%%%c' at position %d -' invalid or incompatible with argument" appears, the Plugins Configuration menu opens over the dialog once I discard the error message box, and both filter properties and filters list dialogs are unusable as I discard the menu.
The problem is, I don't know how to detect whether the last filtered line does or does not contain an EOL. But I will look into it.Bug 2: the EOL of the last line resulting from the external filter is not inserted to the editor. This results in joining the last filtered line with the next original one.
This is up to FAR, I think. I tell FAR to perform the undo and don't care how it does it. But maybe I am starting the undo process too late? It should start before I move the cursor.Bug 3: if I Undo the filtering operation, the initial caret position is not restored.
Last edited by pepak on Tue 27 Mar, 2018 06:33, edited 1 time in total.
- HaRT
- Moderator
- Posts: 10702
- Joined: Tue 30 Aug, 2005 17:21
- Has thanked: 212 times
- Been thanked: 342 times
Filters
Nope. Hence the bugreport.
Thanks.
I did not mean metacharacters in general. I rather suggested the particular parameters input syntax I mentioned:
!?$<history>$<title>?<init>!
. Is it familiar to you?
What do unescaped percent signs mean? A hint would be useful somewhere in the dialog (or at least in the docs).
Thanks.
But please note that the dialogs are totally unusable after the error now. Or is it what you mean by “untranslated”?
I reckon so.
Фар есть инструмент, а не нянька. © 2009 DrKnS