all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#29097: 25.1; to support '_' as a word constituent, subword-mode regexes need updating
@ 2017-11-01  3:51 Chris Hecker
  2017-11-01  4:06 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Hecker @ 2017-11-01  3:51 UTC (permalink / raw)
  To: 29097; +Cc: yamato

[-- Attachment #1: Type: text/html, Size: 6922 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29097: 25.1; to support '_' as a word constituent, subword-mode regexes need updating
  2017-11-01  3:51 bug#29097: 25.1; to support '_' as a word constituent, subword-mode regexes need updating Chris Hecker
@ 2017-11-01  4:06 ` Eli Zaretskii
  2017-11-01  5:08   ` Chris Hecker
  2017-11-01  5:54   ` Masatake YAMATO
  0 siblings, 2 replies; 9+ messages in thread
From: Eli Zaretskii @ 2017-11-01  4:06 UTC (permalink / raw)
  To: Chris Hecker; +Cc: 29097, yamato

> From: Chris Hecker <checker@d6.com>
> Date: Tue, 31 Oct 2017 20:51:23 -0700
> Cc: yamato@redhat.com
> 
> If you like using identifiers with underscores (_) in them, like
> C macros or even just regular identifiers, you can add _ as a word
> constituent in the syntax tables, but if you're using subword-mode
> then the forward and backwards regexes need updating to work
> correctly.  Here is the relevant section of my .emacs c-mode hook:

Perhaps we should make subword-forward-regexp and
subword-backward-regexp defcustoms?





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29097: 25.1; to support '_' as a word constituent, subword-mode regexes need updating
  2017-11-01  4:06 ` Eli Zaretskii
@ 2017-11-01  5:08   ` Chris Hecker
  2017-11-01 19:33     ` Eli Zaretskii
  2017-11-01  5:54   ` Masatake YAMATO
  1 sibling, 1 reply; 9+ messages in thread
From: Chris Hecker @ 2017-11-01  5:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 29097, yamato

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]

That may be, I don't know the tradeoffs for that, but I do think the
updated regexes I sent are strictly superior in my testing so I think they
should become the new defaults, unless I missed some case.

Chris


On Tue, Oct 31, 2017 at 21:07 Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Chris Hecker <checker@d6.com>
> > Date: Tue, 31 Oct 2017 20:51:23 -0700
> > Cc: yamato@redhat.com
> >
> > If you like using identifiers with underscores (_) in them, like
> > C macros or even just regular identifiers, you can add _ as a word
> > constituent in the syntax tables, but if you're using subword-mode
> > then the forward and backwards regexes need updating to work
> > correctly.  Here is the relevant section of my .emacs c-mode hook:
>
> Perhaps we should make subword-forward-regexp and
> subword-backward-regexp defcustoms?
>

[-- Attachment #2: Type: text/html, Size: 1349 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29097: 25.1; to support '_' as a word constituent, subword-mode regexes need updating
  2017-11-01  4:06 ` Eli Zaretskii
  2017-11-01  5:08   ` Chris Hecker
@ 2017-11-01  5:54   ` Masatake YAMATO
  2017-11-01  6:20     ` Chris Hecker
  1 sibling, 1 reply; 9+ messages in thread
From: Masatake YAMATO @ 2017-11-01  5:54 UTC (permalink / raw)
  To: eliz; +Cc: 29097, checker

Hi,

I read the original bug report.

I wonder why you want do

   (modify-syntax-entry ?_ "w")

.

This change suppresses the difference of \M-f and \M-C-f.
Do you really want this suppression?

Masatake YAMATO


>> From: Chris Hecker <checker@d6.com>
>> Date: Tue, 31 Oct 2017 20:51:23 -0700
>> Cc: yamato@redhat.com
>> 
>> If you like using identifiers with underscores (_) in them, like
>> C macros or even just regular identifiers, you can add _ as a word
>> constituent in the syntax tables, but if you're using subword-mode
>> then the forward and backwards regexes need updating to work
>> correctly.  Here is the relevant section of my .emacs c-mode hook:
> 
> Perhaps we should make subword-forward-regexp and
> subword-backward-regexp defcustoms?





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29097: 25.1; to support '_' as a word constituent, subword-mode regexes need updating
  2017-11-01  5:54   ` Masatake YAMATO
@ 2017-11-01  6:20     ` Chris Hecker
  2017-11-01  9:28       ` Masatake YAMATO
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Hecker @ 2017-11-01  6:20 UTC (permalink / raw)
  To: Masatake YAMATO, eliz; +Cc: 29097

[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]

Yes, sexp's include entire brace blocks and whatnot.  I just want to
forward into valid c identifiers but with subword support.  So there's
still a big difference between the two functions?

Chris



On Tue, Oct 31, 2017 at 22:54 Masatake YAMATO <yamato@redhat.com> wrote:

> Hi,
>
> I read the original bug report.
>
> I wonder why you want do
>
>    (modify-syntax-entry ?_ "w")
>
> .
>
> This change suppresses the difference of \M-f and \M-C-f.
> Do you really want this suppression?
>
> Masatake YAMATO
>
>
> >> From: Chris Hecker <checker@d6.com>
> >> Date: Tue, 31 Oct 2017 20:51:23 -0700
> >> Cc: yamato@redhat.com
> >>
> >> If you like using identifiers with underscores (_) in them, like
> >> C macros or even just regular identifiers, you can add _ as a word
> >> constituent in the syntax tables, but if you're using subword-mode
> >> then the forward and backwards regexes need updating to work
> >> correctly.  Here is the relevant section of my .emacs c-mode hook:
> >
> > Perhaps we should make subword-forward-regexp and
> > subword-backward-regexp defcustoms?
>

[-- Attachment #2: Type: text/html, Size: 1710 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29097: 25.1; to support '_' as a word constituent, subword-mode regexes need updating
  2017-11-01  6:20     ` Chris Hecker
@ 2017-11-01  9:28       ` Masatake YAMATO
  0 siblings, 0 replies; 9+ messages in thread
From: Masatake YAMATO @ 2017-11-01  9:28 UTC (permalink / raw)
  To: checker; +Cc: 29097

> Yes, sexp's include entire brace blocks and whatnot.  I just want to
> forward into valid c identifiers but with subword support.  So there's
> still a big difference between the two functions?

I'm talking in narrower scope: C identifier.
Originally subword-mode focuses on moving the point within a C identifier.

I will use '*' is for the current point position.
I will use '^' is for the point position when you press
a key for forwarding.

Let's introduce an example.

gtk_main

=======================================begin
\M-\C-f works as follows:

gtk_main
*-------^

\M-f(subword mode: off) works as follows:

gtk_main
*--^

\C-f works as follows:

gtk_main
*^
=======================================end

For gtk_main, there is no area that subword-mode works.

Subword more make sense when a user thinks granularity(?) of
moving the point with \M-f is too large.

=======================================begin
\M-f(subword mode: off):

NSObjectGtk_main
*----------^

\M-f(subword mode: on):

NSObjectGtk_main
*-^
=======================================end

subword mode provides finer granularity \M-f to those who thinks
granularity(?) of moving the point with (original) \M-f is too large.

This is the original intention I worked on c-subword-mode, the
ancestor of subword-mode.


In other hand, you are setting,

>    (modify-syntax-entry ?_ "w")

It seems for me that you think granularity(?) of moving the point with
(original) \M-f is too small. This syntax modification makes moving the
point with (original) \M-f larger.

My basic assumption for designing c-subword-mode is not satisfied.
So I cannot show good direction as an original developer.

The mode syntax defines the behavior of \M-\C-f and \M-f in the mode.
Extending syntax mechanism allowing to define upper case, lower case
and something is ideal. The behavior of subword-forward and subword-backward
can be derived from the exnteded syntax.

Masatake YAMATO
> Yes, sexp's include entire brace blocks and whatnot.  I just want to
> forward into valid c identifiers but with subword support.  So there's
> still a big difference between the two functions?
> 
> Chris
> 
> 
> 
> On Tue, Oct 31, 2017 at 22:54 Masatake YAMATO <yamato@redhat.com> wrote:
> 
>> Hi,
>>
>> I read the original bug report.
>>
>> I wonder why you want do
>>
>>    (modify-syntax-entry ?_ "w")
>>
>> .
>>
>> This change suppresses the difference of \M-f and \M-C-f.
>> Do you really want this suppression?
>>
>> Masatake YAMATO
>>
>>
>> >> From: Chris Hecker <checker@d6.com>
>> >> Date: Tue, 31 Oct 2017 20:51:23 -0700
>> >> Cc: yamato@redhat.com
>> >>
>> >> If you like using identifiers with underscores (_) in them, like
>> >> C macros or even just regular identifiers, you can add _ as a word
>> >> constituent in the syntax tables, but if you're using subword-mode
>> >> then the forward and backwards regexes need updating to work
>> >> correctly.  Here is the relevant section of my .emacs c-mode hook:
>> >
>> > Perhaps we should make subword-forward-regexp and
>> > subword-backward-regexp defcustoms?
>>





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29097: 25.1; to support '_' as a word constituent, subword-mode regexes need updating
  2017-11-01  5:08   ` Chris Hecker
@ 2017-11-01 19:33     ` Eli Zaretskii
  2017-11-01 22:40       ` Chris Hecker
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2017-11-01 19:33 UTC (permalink / raw)
  To: Chris Hecker; +Cc: 29097, yamato

> From: Chris Hecker <checker@d6.com>
> Date: Wed, 01 Nov 2017 05:08:28 +0000
> Cc: 29097@debbugs.gnu.org, yamato@redhat.com
> 
> That may be, I don't know the tradeoffs for that, but I do think the updated regexes I sent are strictly superior in
> my testing so I think they should become the new defaults, unless I missed some case.

I think you underestimate the number of possible use cases.  See the
responses by YAMATO-san.

I stand by my suggestion to make this a defcustom, then each user can
do whatever they want with this regexp.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29097: 25.1; to support '_' as a word constituent, subword-mode regexes need updating
  2017-11-01 19:33     ` Eli Zaretskii
@ 2017-11-01 22:40       ` Chris Hecker
       [not found]         ` <87shdm3mby.fsf@users.sourceforge.net>
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Hecker @ 2017-11-01 22:40 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 29097, yamato

[-- Attachment #1: Type: text/plain, Size: 516 bytes --]

There is something weird going on with my local behavior when I was testing
some examples of where the current thing is broken, so something else in my
.emacs is affecting this somehow relative to --no-init-file.  I'll reply to
the thread after I tediously binary search for whatever is doing it, it may
be the current default behavior is reasonable and whatever this mystery
thing is was making it so I thought I needed to change those regexes.  I'll
report back after spelunking and making some more tests.

Chris

[-- Attachment #2: Type: text/html, Size: 726 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29097: 25.1; to support '_' as a word constituent, subword-mode regexes need updating
       [not found]         ` <87shdm3mby.fsf@users.sourceforge.net>
@ 2019-10-01 15:59           ` Lars Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-01 15:59 UTC (permalink / raw)
  To: 29097

Noam Postavsky <npostavs@users.sourceforge.net> writes:

> tags 29097 + moreinfo
> quit
>
> Chris Hecker <checker@d6.com> writes:
>
>> There is something weird going on with my local behavior when I was
>> testing some examples of where the current thing is broken, so
>> something else in my .emacs is affecting this somehow relative to
>> --no-init-file.  I'll reply to the thread after I tediously binary
>> search for whatever is doing it, it may be the current default
>> behavior is reasonable and whatever this mystery thing is was making
>> it so I thought I needed to change those regexes.  I'll report back
>> after spelunking and making some more tests.

More information was requested, but no response was given within a
couple of, so I'm closing this bug report.  If the problem still exists,
please reopen this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-10-01 15:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-01  3:51 bug#29097: 25.1; to support '_' as a word constituent, subword-mode regexes need updating Chris Hecker
2017-11-01  4:06 ` Eli Zaretskii
2017-11-01  5:08   ` Chris Hecker
2017-11-01 19:33     ` Eli Zaretskii
2017-11-01 22:40       ` Chris Hecker
     [not found]         ` <87shdm3mby.fsf@users.sourceforge.net>
2019-10-01 15:59           ` Lars Ingebrigtsen
2017-11-01  5:54   ` Masatake YAMATO
2017-11-01  6:20     ` Chris Hecker
2017-11-01  9:28       ` Masatake YAMATO

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.