Re: ENB: Completing #578: support for org-mode tags

2017-11-22 Thread Edward K. Ream
On Tuesday, November 21, 2017 at 10:55:15 AM UTC-6, Edward K. Ream wrote:
>
> On Tue, Nov 21, 2017 at 10:34 AM, Edward K. Ream  
> wrote:
>
> Unless I hear objections, I am going to comment out the code in the org 
>> mode reader and writer that inserts or delete tags.
>>
>
> ​Done at fde1e6. ### marks all changes. I'll be happy to reinstate the 
> code if that's what we decide. But I think decluttering is the elegant way.
>

Rev f4bb1d removes all the code marked by ### comments.

EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: ENB: Completing #578: support for org-mode tags

2017-11-21 Thread Edward K. Ream
On Tue, Nov 21, 2017 at 10:34 AM, Edward K. Ream 
wrote:

Unless I hear objections, I am going to comment out the code in the org
> mode reader and writer that inserts or delete tags.
>

​Done at fde1e6. ### marks all changes. I'll be happy to reinstate the code
if that's what we decide. But I think decluttering is the elegant way.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: ENB: Completing #578: support for org-mode tags

2017-11-21 Thread Edward K. Ream
On Tuesday, November 21, 2017 at 9:46:12 AM UTC-6, Edward K. Ream wrote:

I'll play with declutter today. If it works as I expect it will I'll remove 
> all the code affected by deleting org-mode tags.
>

This is the first time I have used declutter, and I think this is going to 
handle org-mode tags very well.

Declutter is completely optional because it requires @bool tree-declutter = 
True.

The body text of @data tree-declutter-patterns determines what gets 
decluttered. For my test I used the following rule:

RULE ^([^:]*):([\w_@]+:)+\s*$
REPLACE \1

There are two parts to the regex.  The head ^([^:]*) (\1) is retained. The 
tail :([\w_@]+:)+\s*$ contains all the tags.

The regex is subtle, and not perfect:

1. The tail will match :tag1:tag2: but *not* :tag1: :tag2:
2. The entire pattern will fail if colons appear in the head.
3. The entire pattern will fail if anything besides whitespace follows the 
tags.

It's not easy to see how to improve the regex.  For example, replacing 
^([^:]*) by ^([^:]*) does not work, as you can see for yourself on the regex 
testing page . I invite all you regex gurus to suggest 
improvements.

Unless I hear objections, I am going to comment out the code in the org 
mode reader and writer that inserts or delete tags.

All comments welcome.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: ENB: Completing #578: support for org-mode tags

2017-11-21 Thread Edward K. Ream
On Tue, Nov 21, 2017 at 9:46 AM, Edward K. Ream  wrote:

automatically stripping org-mode tags has several nasty aspects:
>

​And one more:

4. Unit tests must be aware of the setting.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.