GNU bug report logs -
#29097
25.1; to support '_' as a word constituent, subword-mode regexes need updating
Previous Next
Reported by: Chris Hecker <checker <at> d6.com>
Date: Wed, 1 Nov 2017 03:52:02 UTC
Severity: minor
Tags: moreinfo
Found in version 25.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29097 in the body.
You can then email your comments to 29097 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29097
; Package
emacs
.
(Wed, 01 Nov 2017 03:52:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Chris Hecker <checker <at> d6.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 01 Nov 2017 03:52:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29097
; Package
emacs
.
(Wed, 01 Nov 2017 04:07:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 29097 <at> debbugs.gnu.org (full text, mbox):
> From: Chris Hecker <checker <at> d6.com>
> Date: Tue, 31 Oct 2017 20:51:23 -0700
> Cc: yamato <at> 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?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29097
; Package
emacs
.
(Wed, 01 Nov 2017 05:09:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 29097 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <at> gnu.org> wrote:
> > From: Chris Hecker <checker <at> d6.com>
> > Date: Tue, 31 Oct 2017 20:51:23 -0700
> > Cc: yamato <at> 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?
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29097
; Package
emacs
.
(Wed, 01 Nov 2017 05:55:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 29097 <at> debbugs.gnu.org (full text, mbox):
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 <at> d6.com>
>> Date: Tue, 31 Oct 2017 20:51:23 -0700
>> Cc: yamato <at> 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?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29097
; Package
emacs
.
(Wed, 01 Nov 2017 06:21:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 29097 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <at> 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 <at> d6.com>
> >> Date: Tue, 31 Oct 2017 20:51:23 -0700
> >> Cc: yamato <at> 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?
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29097
; Package
emacs
.
(Wed, 01 Nov 2017 09:29:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 29097 <at> debbugs.gnu.org (full text, mbox):
> 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 <at> 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 <at> d6.com>
>> >> Date: Tue, 31 Oct 2017 20:51:23 -0700
>> >> Cc: yamato <at> 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?
>>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29097
; Package
emacs
.
(Wed, 01 Nov 2017 19:34:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 29097 <at> debbugs.gnu.org (full text, mbox):
> From: Chris Hecker <checker <at> d6.com>
> Date: Wed, 01 Nov 2017 05:08:28 +0000
> Cc: 29097 <at> debbugs.gnu.org, yamato <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29097
; Package
emacs
.
(Wed, 01 Nov 2017 22:41:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 29097 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]
Added tag(s) moreinfo.
Request was from
Noam Postavsky <npostavs <at> users.sourceforge.net>
to
control <at> debbugs.gnu.org
.
(Fri, 10 Nov 2017 02:22:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29097
; Package
emacs
.
(Tue, 01 Oct 2019 16:00:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 29097 <at> debbugs.gnu.org (full text, mbox):
Noam Postavsky <npostavs <at> users.sourceforge.net> writes:
> tags 29097 + moreinfo
> quit
>
> Chris Hecker <checker <at> 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
bug closed, send any further explanations to
29097 <at> debbugs.gnu.org and Chris Hecker <checker <at> d6.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 01 Oct 2019 16:00:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 30 Oct 2019 11:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 180 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.