Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #20611
    LifeTimer
    Participant

    If an exported filter contains (or at least begins with) a TAB, it cannot be re-imported again (or rather, it will just result in an empty line in the filter dialog).

    The apparent reason is that the filter data is exported to a TAB-separated file, while TAB characters in the data itself are not escaped, thus messing up the structure of the TAB-separated line.

    Therefore, please look into escaping TAB-characters in the exported filter TSV files.

    #20614
    Yutaka Emura
    Keymaster

    Hello,

    I don’t reproduce the issue. TAB should be escaped as \t. Did you check “Use Escape Sequences” or “Regular expressions” in the Filter toolbar?

    #20616
    LifeTimer
    Participant

    I have a pretty good guess for why you fail to reproduce it. :-)

    When entering the filter strings manually, it is impossible to enter a raw TAB character (since this will only cause the GUI focus to change to the next control), BUT when doing it from a macro it can be done, without the TAB character being escaped!

    More specifically, I do like this (which is part of my normal workflow):

    I first select some text containing (among other things) a TAB character, and then execute a macro constituted by the following line:

    document.Filter(document.selection.Text, 0, eeFindKeepPrevious | eeFindNegative);

    You will then clearly see an unescaped TAB character in the filter list inside the EmEditor GUI, and it will also tag along to the export file in case of a filter export, in turn messing up the structure of the TSV file produced by such an export, and consequently making these lines of the export file impossible to re-import.

    So, the solution would then seemingly be to make sure that special characters like TAB are automatically escaped also when using macros to add filter levels containing them.

    #20619
    Yutaka Emura
    Keymaster

    This is fixed on beta 13.
    Thank you!

    #20627
    LifeTimer
    Participant

    Excellent, thanks!

    #20835
    LifeTimer
    Participant

    In the most recent beta version (16.0.0 beta 1) filter entries containing TABs don’t work to export and then reimport again. It doesn’t corrupt the filter export file line format now like before, but the TAB:s are instead double escaped when reimported now, and thus don’t work.

    That is, if you export a filter like this:

    \tABCD\t

    it becomes the following after you re-import it:

    \\tABCD\\t

    and thus won’t work anymore.

    (if it matters, I used the new macro functionality for exporting/importing it)

    #20837
    LifeTimer
    Participant

    Addition: I just noticed that this problem seems to be the same for all filter items containing backslashes.

    #20842
    Yutaka Emura
    Keymaster

    Hello LifeTimer,

    I reproduced the issue. This will be fixed on the next beta version.

    Thank you!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.