Page 2 of 4

Filters

Posted: Tue 27 Mar, 2018 14:41
by HaRT

Latest post of the previous page:

pepak wrote:
Tue 27 Mar, 2018 06:32
Are they not there already?
Nope. Hence the bugreport.
pepak wrote:
Tue 27 Mar, 2018 06:32
I will definitely be doing that once I settle on a reasonable UX solution.
Thanks.
pepak wrote:
Tue 27 Mar, 2018 06:32
Many (=almost all) of the template options are irrelevant (e.g. "selected files"?).
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?
pepak wrote:
Tue 27 Mar, 2018 06:32
if you want a percentage sign, you must double it
What do unescaped percent signs mean? A hint would be useful somewhere in the dialog (or at least in the docs).
pepak wrote:
Tue 27 Mar, 2018 06:32
you should see something like "unknown %q at position 10". Will fix.
Thanks.
But please note that the dialogs are totally unusable after the error now. Or is it what you mean by “untranslated”?
pepak wrote:
Tue 27 Mar, 2018 06:32
It should start before I move the cursor.
I reckon so.

Filters

Posted: Tue 27 Mar, 2018 17:30
by pepak
So far:
  • Added the history support.
  • Fixed incorrect end-of-line on the last line.
  • FIxed the EConvertError.
Other comments:
  • I think I have a clear idea of how to implement the parameters-just-before-execution.
  • FAR-like metacharacters won't be supported. Way too much work for too little gain. Percentages will stay.
  • Undo seems to be a bug in FAR rather than in the plugin. Even if I move the creation of undo block before any other operation, the cursor still doesn't return to the original place.
  • Found an error with executing the plugin when the curor is outside of the selected block. Will fix.

Filters

Posted: Tue 27 Mar, 2018 17:32
by pepak
HaRT wrote:
Tue 27 Mar, 2018 14:41
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?
Yes, but I won't be implementing that.
What do unescaped percent signs mean? A hint would be useful somewhere in the dialog (or at least in the docs).
readme.en.txt, line 112-124.
But please note that the dialogs are totally unusable after the error now. Or is it what you mean by “untranslated”?
Change the string "Unknown '%%%c' at position %d - configuration is invalid" in the language file to "Unknown '%%%s' at position %d - configuration is invalid" and the error is gone.

Filters

Posted: Tue 27 Mar, 2018 18:19
by HaRT
pepak wrote:
Tue 27 Mar, 2018 17:32
readme.en.txt, line 112-124.
Indeed! I managed to forget this between reading the docs when I first saw the plugin and creating my first external filter yesterday. I changed the label this way: "&Command template (%i Input, %o Output, %w Width, %% percent)" for it to be my hint.
pepak wrote:
Tue 27 Mar, 2018 17:32
Change the string […] and the error is gone.
Thanks.

Filters

Posted: Fri 30 Mar, 2018 11:04
by pepak
Released version 0.03
  • Added support for plugin-call to a named filter. This allows calling of external filters which weren't available to plugin-calls in previous versions. Use the Filters.ExecuteByName script function; as an argument, provide the description of your filter, as entered into the filter's configuration.
  • Added support for a filter reconfiguration just before use. The purpose of this feature is to allow a modification of arguments of an external filter as per immediate requirements without having to create multiple filter configurations in advance. Just mark the filter as "Edit before use" and you will be asked to modify the filter settings before use.
  • Added support for combined STDOUT and STDERR output to the external filters.
  • Added history support to edit fields in the dialogs.
  • Fixed: After editing a filter's configuration, the selection of the filter list moved to the first item. Now it will stay at the edited item.
  • Fixed: If the filter was run against a selection and the filtered output ended with a newline, that newline got discarded and the first line after the selection got appended to the last line of the output.
  • Fixed: With persistent blocks enabled, if the cursor was outside of the selection at the time the plugin was executed, the filtered output would get written at the cursor position (i.e. inside some completely unrelated section of the file).
  • Moved the definition of the start of the undo block before any other operation on the editor's content in the hope that it would include the cursor movement into an Undo, if the user decided to use it. Unfortunately, it seems that FAR does not consider cursor movements a part of the Undo block (FAR3 build 5134).
  • Fixed an EConvertError exception when entering incorrect % modifiers into the external filter's command template.
Source codes can't be uploaded to PlugRing due to 413 Request Entity Too Large.

Filters

Posted: Fri 30 Mar, 2018 14:31
by HaRT
pepak wrote:
Fri 30 Mar, 2018 11:04
Released version 0.03
Thanks a lot!

A minor glitch: if I change a filter in another (second) instance of Far, I then see the changes in the plugin's configuration in the first instance, but if I open an editor there (in the first instance), the old configuration is still in effect.

And a minor wish: if the external filter cannot be executed (e.g. inaccessible executable), please restore/ don't clear the selection.

Filters

Posted: Fri 30 Mar, 2018 14:42
by pepak
HaRT wrote:
Fri 30 Mar, 2018 14:31
A minor glitch: if I change a filter in another (second) instance of Far, I then see the changes in the plugin's configuration in the first instance, but if I open an editor there (in the first instance), the old configuration is still in effect.
That's more or less by design. It could be changed with a minor effort, but I rather liked the effect of having an "active" set of filters and a set of "stored" filters. Plus it somewhat speeds up the plugin execution (I guess by as much as a few microseconds :-)). But I will think about it.
And a minor wish: if the external filter cannot be executed (e.g. inaccessible executable), please restore/ don't clear the selection.
That might be a lot more difficult than it looks, actually. I will see.

Filters

Posted: Sat 14 Apr, 2018 06:26
by pepak
HaRT wrote:
Fri 30 Mar, 2018 14:31
A minor glitch: if I change a filter in another (second) instance of Far, I then see the changes in the plugin's configuration in the first instance, but if I open an editor there (in the first instance), the old configuration is still in effect.
Fixed in 0.04 (not yet released).
And a minor wish: if the external filter cannot be executed (e.g. inaccessible executable), please restore/ don't clear the selection.
As far as I can tell, that is done by FAR, not me. At least, I couldn't find any place in my code where I could terminate the plugin and still keep the selection alive.

Filters

Posted: Sun 15 Apr, 2018 07:28
by pepak
Released version 0.04
  • In the filter configuration dialog, you can press the Copy button or keys F5 or CTRL+C to make a copy of the selected filter.
  • If a filter is set to "edit before use", its configuration dialog contains a new checkbox to let you save the modified settings to the configuration to make them permanent.
  • Filter list is always loaded just before use. As a result, if multiple instances of FAR are running and you change the plugin's configuration in one of them, it will immediately apply to all of them.
  • If a filter set to "edit before use" was called from a script, it would execute immediately without displaying the configuration dialog.

Filters

Posted: Mon 16 Sep, 2019 23:35
by skipik
I get this on an HTML file:

How to fix that?
Plugin version is 0.4.0.498.

Filters

Posted: Mon 16 Sep, 2019 23:58
by HaRT
skipik, Do you have elinks.exe in any of your PATHs? Can you execute the command line from the error text normally (with some existing HTML file of course)?

Filters

Posted: Tue 17 Sep, 2019 09:38
by skipik
HaRT wrote:
Mon 16 Sep, 2019 23:58
Do you have elinks.exe in any of your PATHs?
Ah, I don't. Where I should get it? Is there any link for binaries? Or I should build it by myself?

// upd

Nvm, found it.

Filters

Posted: Tue 17 Sep, 2019 10:58
by 2useven10
skipik wrote:
Tue 17 Sep, 2019 09:38
Where I should get it?
google knows where.

Filters

Posted: Thu 26 Sep, 2019 11:19
by HaRT
pepak wrote:
Sun 15 Apr, 2018 07:28
Released version 0.04
In the “Plugin Information” dialog (F3 in the “Plugin commands” menu), the Version is 4.0.0.497. Shouldn't it be 0.4.0.497 instead.

Filters

Posted: Thu 26 Sep, 2019 18:55
by pepak
It depends. What is the source of Plugin Information's dialog data? Because if you look at the version properties of the DLL using standard Windows APIs (e.g. using Explorer), you will get version 0.4. It is possible that P.I. does not use Windows standard VERSION_INFO, but in that case I am inclined to consider it an error in FAR, not the plugin.

Filters

Posted: Thu 26 Sep, 2019 21:20
by HaRT
pepak wrote:
Thu 26 Sep, 2019 18:55
What is the source of Plugin Information's dialog data?
Presumably the Version field of the GlobalInfo structure filled in the GetGlobalInfoW function exposed by the plug-in. Formally, it's unrelated to Windows' VERSION_INFO, but ideally should represent the same version. Far Encyclopedia recommends using the MAKEFARVERSION macro to form the version value.