[Geany-Devel] Re: Search ignore diacriticals?

2024-08-29 Thread Giuseppe Penone via Devel
I did implement myself such functionality in case you want to copy that to
Geany see
https://github.com/giuspen/cherrytree/blob/fc1d7499067b9db9841175b5a2d6934dc65e4522/src/ct/ct_actions_find.cc#L629


On Thu, 29 Aug 2024, 09:49 Lex Trotman via Devel, 
wrote:

> On Thu, 29 Aug 2024 at 16:35, Austin Green via Devel
>  wrote:
> >
> > I was rather hoping to have the custom case folder as an additional
> option in any search.  Are the Scintilla people easily annoyed by requests
> for features?
> >
> >
>
> Not particularly, but will not often do it for you if it is some
> feature that is specific to you.  And also ATM there is no method for
> specifying such "custom" functionality to the search so that makes it
> more complex.  In general Scintilla provides commonly useful features,
> it is used by many applications and on major platforms, if some
> feature is not likely to be common its not likely to be added. But it
> has the ability to give you the whole buffer to perform such things as
> custom searches yourself.  As I said Geany does this for regex
> searches since it uses different regex engines to Scintilla.  So your
> plugin can ask for a pointer to the buffer and then search away using
> any search method you want to.
>
> Cheers
> Lex
> ___
> Devel mailing list -- devel@lists.geany.org
> To unsubscribe send an email to devel-le...@lists.geany.org
>
___
Devel mailing list -- devel@lists.geany.org
To unsubscribe send an email to devel-le...@lists.geany.org


[Geany-Devel] Re: Search ignore diacriticals?

2024-08-29 Thread Lex Trotman via Devel
On Thu, 29 Aug 2024 at 16:35, Austin Green via Devel
 wrote:
>
> I was rather hoping to have the custom case folder as an additional option in 
> any search.  Are the Scintilla people easily annoyed by requests for features?
>
>

Not particularly, but will not often do it for you if it is some
feature that is specific to you.  And also ATM there is no method for
specifying such "custom" functionality to the search so that makes it
more complex.  In general Scintilla provides commonly useful features,
it is used by many applications and on major platforms, if some
feature is not likely to be common its not likely to be added. But it
has the ability to give you the whole buffer to perform such things as
custom searches yourself.  As I said Geany does this for regex
searches since it uses different regex engines to Scintilla.  So your
plugin can ask for a pointer to the buffer and then search away using
any search method you want to.

Cheers
Lex
___
Devel mailing list -- devel@lists.geany.org
To unsubscribe send an email to devel-le...@lists.geany.org


[Geany-Devel] Re: Search ignore diacriticals?

2024-08-28 Thread Austin Green via Devel
I was rather hoping to have the custom case folder as an additional option in 
any search.  Are the Scintilla people easily annoyed by requests for features?


On Thu, 29 Aug 2024 13:41:59 +1000
Lex Trotman via Devel  wrote:

> In your plugin there is nothing stopping you from getting the buffer
> in one piece and implementing your own search on it, no need to annoy
> Scintilla.
> That is how Geany implements regex search using different engines from
> Scintillas.
> 
> On Thu, 29 Aug 2024 at 11:44, Austin Green via Devel
>  wrote:
> >
> > The search feature is supplied by Scintilla. There is a facility for 
> > setting a 'case-folder' (function or table) to handle case-insensitive 
> > searches, so allowing a user-supplied custom case-folder might be the 
> > easiest way. Then it could be handled in Geany via my plug-in. AFAIK there 
> > is no such option currently in Geany or Scintilla, so I'll ask the 
> > Scintilla people if they would consider adding it.
> >
> >
> > On Wed, 28 Aug 2024 17:47:38 +1000
> > Lex Trotman via Devel  wrote:
> >
> > > On Wed, 28 Aug 2024 at 16:23, Austin Green via Devel
> > >  wrote:
> > > >
> > > > Yes, that works, but I was hoping for the lazy version, e.g. an option 
> > > > on the search dialog.  Guess I'll have to code it myself.
> > >
> > > Indeed, AFAIK the Unicode standard does not define any normative
> > > mechanism to do this, so you are inventing your own requirement, and
> > > therefore you have to code it yourself.
> > >
> > > For some simple cases like Latin 1, decomposition will separate the
> > > diacritical from the base character so you can compare bases but
> > > ignore combining characters, but as I said, thats a function _you_
> > > want, not a normal defined one, so you will have to write it.
> > >
> > > Cheers
> > > Lex
> > >
> > > > Cheers,
> > > > Austin.
> > > >
> > > >
> > > > On Wed, 28 Aug 2024 13:27:46 +1000
> > > > Lex Trotman via Devel  wrote:
> > > >
> > > > > On Wed, 28 Aug 2024 at 12:57, Austin Green via Devel
> > > > >  wrote:
> > > > > >
> > > > > > Is there a way to get the Geany search to match letters with 
> > > > > > diacriticals as though they were not?  E.g. I want to be able to 
> > > > > > search for 'cafe' and have it match 'café' as well.
> > > > >
> > > > > Possibly you could use a regex to match e or é ?
> > > > >
> > > > > Cheers
> > > > > Lex
> > > > >
> > > > > > ___
> > > > > > Devel mailing list -- devel@lists.geany.org
> > > > > > To unsubscribe send an email to devel-le...@lists.geany.org
> > > > > ___
> > > > > Devel mailing list -- devel@lists.geany.org
> > > > > To unsubscribe send an email to devel-le...@lists.geany.org
> > > > ___
> > > > Devel mailing list -- devel@lists.geany.org
> > > > To unsubscribe send an email to devel-le...@lists.geany.org
> > > ___
> > > Devel mailing list -- devel@lists.geany.org
> > > To unsubscribe send an email to devel-le...@lists.geany.org
> > ___
> > Devel mailing list -- devel@lists.geany.org
> > To unsubscribe send an email to devel-le...@lists.geany.org
> ___
> Devel mailing list -- devel@lists.geany.org
> To unsubscribe send an email to devel-le...@lists.geany.org
___
Devel mailing list -- devel@lists.geany.org
To unsubscribe send an email to devel-le...@lists.geany.org


[Geany-Devel] Re: Search ignore diacriticals?

2024-08-28 Thread Lex Trotman via Devel
In your plugin there is nothing stopping you from getting the buffer
in one piece and implementing your own search on it, no need to annoy
Scintilla.
That is how Geany implements regex search using different engines from
Scintillas.

On Thu, 29 Aug 2024 at 11:44, Austin Green via Devel
 wrote:
>
> The search feature is supplied by Scintilla. There is a facility for setting 
> a 'case-folder' (function or table) to handle case-insensitive searches, so 
> allowing a user-supplied custom case-folder might be the easiest way. Then it 
> could be handled in Geany via my plug-in. AFAIK there is no such option 
> currently in Geany or Scintilla, so I'll ask the Scintilla people if they 
> would consider adding it.
>
>
> On Wed, 28 Aug 2024 17:47:38 +1000
> Lex Trotman via Devel  wrote:
>
> > On Wed, 28 Aug 2024 at 16:23, Austin Green via Devel
> >  wrote:
> > >
> > > Yes, that works, but I was hoping for the lazy version, e.g. an option on 
> > > the search dialog.  Guess I'll have to code it myself.
> >
> > Indeed, AFAIK the Unicode standard does not define any normative
> > mechanism to do this, so you are inventing your own requirement, and
> > therefore you have to code it yourself.
> >
> > For some simple cases like Latin 1, decomposition will separate the
> > diacritical from the base character so you can compare bases but
> > ignore combining characters, but as I said, thats a function _you_
> > want, not a normal defined one, so you will have to write it.
> >
> > Cheers
> > Lex
> >
> > > Cheers,
> > > Austin.
> > >
> > >
> > > On Wed, 28 Aug 2024 13:27:46 +1000
> > > Lex Trotman via Devel  wrote:
> > >
> > > > On Wed, 28 Aug 2024 at 12:57, Austin Green via Devel
> > > >  wrote:
> > > > >
> > > > > Is there a way to get the Geany search to match letters with 
> > > > > diacriticals as though they were not?  E.g. I want to be able to 
> > > > > search for 'cafe' and have it match 'café' as well.
> > > >
> > > > Possibly you could use a regex to match e or é ?
> > > >
> > > > Cheers
> > > > Lex
> > > >
> > > > > ___
> > > > > Devel mailing list -- devel@lists.geany.org
> > > > > To unsubscribe send an email to devel-le...@lists.geany.org
> > > > ___
> > > > Devel mailing list -- devel@lists.geany.org
> > > > To unsubscribe send an email to devel-le...@lists.geany.org
> > > ___
> > > Devel mailing list -- devel@lists.geany.org
> > > To unsubscribe send an email to devel-le...@lists.geany.org
> > ___
> > Devel mailing list -- devel@lists.geany.org
> > To unsubscribe send an email to devel-le...@lists.geany.org
> ___
> Devel mailing list -- devel@lists.geany.org
> To unsubscribe send an email to devel-le...@lists.geany.org
___
Devel mailing list -- devel@lists.geany.org
To unsubscribe send an email to devel-le...@lists.geany.org


[Geany-Devel] Re: Search ignore diacriticals?

2024-08-28 Thread Austin Green via Devel
The search feature is supplied by Scintilla. There is a facility for setting a 
'case-folder' (function or table) to handle case-insensitive searches, so 
allowing a user-supplied custom case-folder might be the easiest way. Then it 
could be handled in Geany via my plug-in. AFAIK there is no such option 
currently in Geany or Scintilla, so I'll ask the Scintilla people if they would 
consider adding it.


On Wed, 28 Aug 2024 17:47:38 +1000
Lex Trotman via Devel  wrote:

> On Wed, 28 Aug 2024 at 16:23, Austin Green via Devel
>  wrote:
> >
> > Yes, that works, but I was hoping for the lazy version, e.g. an option on 
> > the search dialog.  Guess I'll have to code it myself.
> 
> Indeed, AFAIK the Unicode standard does not define any normative
> mechanism to do this, so you are inventing your own requirement, and
> therefore you have to code it yourself.
> 
> For some simple cases like Latin 1, decomposition will separate the
> diacritical from the base character so you can compare bases but
> ignore combining characters, but as I said, thats a function _you_
> want, not a normal defined one, so you will have to write it.
> 
> Cheers
> Lex
> 
> > Cheers,
> > Austin.
> >
> >
> > On Wed, 28 Aug 2024 13:27:46 +1000
> > Lex Trotman via Devel  wrote:
> >
> > > On Wed, 28 Aug 2024 at 12:57, Austin Green via Devel
> > >  wrote:
> > > >
> > > > Is there a way to get the Geany search to match letters with 
> > > > diacriticals as though they were not?  E.g. I want to be able to search 
> > > > for 'cafe' and have it match 'café' as well.
> > >
> > > Possibly you could use a regex to match e or é ?
> > >
> > > Cheers
> > > Lex
> > >
> > > > ___
> > > > Devel mailing list -- devel@lists.geany.org
> > > > To unsubscribe send an email to devel-le...@lists.geany.org
> > > ___
> > > Devel mailing list -- devel@lists.geany.org
> > > To unsubscribe send an email to devel-le...@lists.geany.org
> > ___
> > Devel mailing list -- devel@lists.geany.org
> > To unsubscribe send an email to devel-le...@lists.geany.org
> ___
> Devel mailing list -- devel@lists.geany.org
> To unsubscribe send an email to devel-le...@lists.geany.org
___
Devel mailing list -- devel@lists.geany.org
To unsubscribe send an email to devel-le...@lists.geany.org


[Geany-Devel] Re: Search ignore diacriticals?

2024-08-28 Thread Lex Trotman via Devel
On Wed, 28 Aug 2024 at 16:23, Austin Green via Devel
 wrote:
>
> Yes, that works, but I was hoping for the lazy version, e.g. an option on the 
> search dialog.  Guess I'll have to code it myself.

Indeed, AFAIK the Unicode standard does not define any normative
mechanism to do this, so you are inventing your own requirement, and
therefore you have to code it yourself.

For some simple cases like Latin 1, decomposition will separate the
diacritical from the base character so you can compare bases but
ignore combining characters, but as I said, thats a function _you_
want, not a normal defined one, so you will have to write it.

Cheers
Lex

> Cheers,
> Austin.
>
>
> On Wed, 28 Aug 2024 13:27:46 +1000
> Lex Trotman via Devel  wrote:
>
> > On Wed, 28 Aug 2024 at 12:57, Austin Green via Devel
> >  wrote:
> > >
> > > Is there a way to get the Geany search to match letters with diacriticals 
> > > as though they were not?  E.g. I want to be able to search for 'cafe' and 
> > > have it match 'café' as well.
> >
> > Possibly you could use a regex to match e or é ?
> >
> > Cheers
> > Lex
> >
> > > ___
> > > Devel mailing list -- devel@lists.geany.org
> > > To unsubscribe send an email to devel-le...@lists.geany.org
> > ___
> > Devel mailing list -- devel@lists.geany.org
> > To unsubscribe send an email to devel-le...@lists.geany.org
> ___
> Devel mailing list -- devel@lists.geany.org
> To unsubscribe send an email to devel-le...@lists.geany.org
___
Devel mailing list -- devel@lists.geany.org
To unsubscribe send an email to devel-le...@lists.geany.org


[Geany-Devel] Re: Search ignore diacriticals?

2024-08-27 Thread Austin Green via Devel
Yes, that works, but I was hoping for the lazy version, e.g. an option on the 
search dialog.  Guess I'll have to code it myself.
Cheers,
Austin.


On Wed, 28 Aug 2024 13:27:46 +1000
Lex Trotman via Devel  wrote:

> On Wed, 28 Aug 2024 at 12:57, Austin Green via Devel
>  wrote:
> >
> > Is there a way to get the Geany search to match letters with diacriticals 
> > as though they were not?  E.g. I want to be able to search for 'cafe' and 
> > have it match 'café' as well.
> 
> Possibly you could use a regex to match e or é ?
> 
> Cheers
> Lex
> 
> > ___
> > Devel mailing list -- devel@lists.geany.org
> > To unsubscribe send an email to devel-le...@lists.geany.org
> ___
> Devel mailing list -- devel@lists.geany.org
> To unsubscribe send an email to devel-le...@lists.geany.org
___
Devel mailing list -- devel@lists.geany.org
To unsubscribe send an email to devel-le...@lists.geany.org


[Geany-Devel] Re: Search ignore diacriticals?

2024-08-27 Thread Lex Trotman via Devel
On Wed, 28 Aug 2024 at 12:57, Austin Green via Devel
 wrote:
>
> Is there a way to get the Geany search to match letters with diacriticals as 
> though they were not?  E.g. I want to be able to search for 'cafe' and have 
> it match 'café' as well.

Possibly you could use a regex to match e or é ?

Cheers
Lex

> ___
> Devel mailing list -- devel@lists.geany.org
> To unsubscribe send an email to devel-le...@lists.geany.org
___
Devel mailing list -- devel@lists.geany.org
To unsubscribe send an email to devel-le...@lists.geany.org