[BRLTTY] Feature request: configurable prompt pattern

Dave Mielke dave at mielke.cc
Fri Mar 16 12:35:34 EDT 2018


[quoted lines by Aura Kelloniemi on 2018/03/16 at 17:45 +0200]

>To me hack means a solution which uses a feature in a non-intended way - e.g. 
>matches a prompt based on how that prompt is represented in text - instead of 
>just knowing what is a prompt and what is not.

But I'd argue that it currently works exactly as it was originally intended. 
Lack of foresight, or any otehr consideration(s) at the time, doesn't mean 
unintended. And, as I've already mentioned, until we (recently) got screen 
scroll tracking, navigating to a moving target didn't make all that much sense.

So you're still imposing your own view on how others see things. I don't think 
that's right. What's wrong with allowing for the possibility that others, for 
reasons you perhaps can't imagine, did something sensible? In my opinion, it's 
far more important to listen, and to allow for the possible intelligence of 
others, than it is to lecture and to judge.

>I like this part a lot. It makes separation of patterns very clear.

Yes. It's also part of my desire to look for ways to make things easier to use, 
understand, etc.

> > and, if it doesn't, then we join them, e.g.:
> >    (pattern1|pattern2|pattern3)
> > and do the context-independent thing.
>
>Wouldn't mixing these two types of behaviours be confusing to users. 

I don't think so. After all, the user knows if he/she is on a prompt or not. 
Besides, we could, for those braille devices that support long presses, make a 
long press force the context insensitive way.

>To me it would. If a line on which I am matches a pattern I did not mean it to 
>match, then I end up in a weird place instead of having it do the context-free 
>matching.

But, as the one who configured your own set of patterns, I'd think you'd be 
aware of what those patterns are. I don't think, therefore, that you'd be 
caught all that much by surprise.

>Context-sensitive by default prevents me from moving between different types 
>of prompts, unless I use the regex alternation syntax to join all my patterns 
>together thus preventing brltty from noticing that I have kinda multiple 
>patterns.

Or imlement the long press paradigm mentioned above so you have that choice.

>My personal preference is always context-free. 

We can have a preference or two to customize behaviour. The issue, to me, is 
what should the default behaviour be. What I mean is not just the default if no 
patterns are defined, but also what it should be if patterns are defined. I 
strive to make defaults be what most users would want and/or intuitively 
expect.

>Nicolas explained this in a good way in his latest post (before me posting 
>this one).

Sure, but that was before my recent suggestions. I'm also not certain that the 
fact that a user has begun to define his/her own patterns necessarily means 
that intuition matches the expected preferences of an expert user.

>My opinion is that if prompt matching is sometimes context-free and sometimes
>context-sensitive (based on some patterns), it can feel unpredictable from the
>user's point of view.

But that's an expert speaking. I personally think that the much more common 
case is to go to another of the same kind of prompt, with defined patterns 
providing a way for navigation to make an intelligent guess when not on a 
prompt.

>In other words I would want to have lists of patterns, 

I prefer the separate file approach, with a single (new) way to reload it, than 
the clipboard stuff. brltty.conf could have a prompt-file directive to specify 
it.

>Perl-style regex is my favourite. What is yours?

Mine is Posix extended regular expressions as they're the most likely ones to 
be supported on all platforms, and, at least to me, consistency is worth 
something. Maybe, if it's in high enough demand, a configure option, e.g. 
--with-regex-package, could be implemented to choose something else. Maybe we 
could include lots of them and have a selector within the menu to choose which 
one a user wants to use.

-- 
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke           | 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: Dave at Mielke.cc | Ottawa, Ontario   | Twitter: @Dave_Mielke
Phone: 1-613-726-0014 | Canada  K2A 1H7   |


More information about the BRLTTY mailing list