GNU bug report logs - #34301
Unable to make underscore part of a word everywhere

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <hi-angel <at> yandex.ru>

Date: Sun, 3 Feb 2019 18:11:02 UTC

Severity: normal

Done: Stefan Kangas <stefan <at> marxist.se>

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 34301 in the body.
You can then email your comments to 34301 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#34301; Package emacs. (Sun, 03 Feb 2019 18:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Konstantin Kharlamov <hi-angel <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 03 Feb 2019 18:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Konstantin Kharlamov <hi-angel <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: Unable to make underscore part of a word everywhere
Date: Sun, 3 Feb 2019 21:09:48 +0300
By default the underscore "_" symbol is not being counted as part of a 
word, even though I have never met a language where it's a separate 
entity. This means e.g. that upon opening a file one is never being able 
to "search for word_wth_underscores under cursor", unless they modify 
current table. This problem haunts many people, e.g. this question has 
5576 views for 3 years 11 months 
https://emacs.stackexchange.com/questions/9583/how-to-treat-underscore-as-part-of-the-word

Known workarounds:
	1. Modify syntax table for every mode you happened to stumble upon.
	2. Use superword-mode

Why workarounds are bad:

	1. To make it work one has to search for syntax table name of the 
current mode, and then to modify config file accordingly, every time a 
new mode is being met. That's a lot of actions and research overall, a 
bloating config file; and also lots of work duplication by many Emacs users.
	2. superword-mode doesn't do anything to syntax table, and in 
particular doesn't work with evil-mode.

------

It would be great if Emacs has added a function or what not to just keep 
underscore as part of a word for all syntax tables by default.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34301; Package emacs. (Tue, 09 Jul 2019 17:14:01 GMT) Full text and rfc822 format available.

Message #8 received at 34301 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Konstantin Kharlamov <hi-angel <at> yandex.ru>
Cc: 34301 <at> debbugs.gnu.org
Subject: Re: bug#34301: Unable to make underscore part of a word everywhere
Date: Tue, 09 Jul 2019 19:13:23 +0200
Konstantin Kharlamov <hi-angel <at> yandex.ru> writes:

> By default the underscore "_" symbol is not being counted as part of a
> word, even though I have never met a language where it's a separate
> entity.

In natural languages it's usually not word-consistent.

> This means e.g. that upon opening a file one is never being
> able to "search for word_wth_underscores under cursor", unless they
> modify current table.

Any programming language mode sets _ to be part of words, surely?  If
not that's a bug in that mode?  What modes do you see this in?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34301; Package emacs. (Tue, 09 Jul 2019 18:08:02 GMT) Full text and rfc822 format available.

Message #11 received at 34301 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 34301 <at> debbugs.gnu.org, Konstantin Kharlamov <hi-angel <at> yandex.ru>
Subject: Re: bug#34301: Unable to make underscore part of a word everywhere
Date: Tue, 09 Jul 2019 14:07:44 -0400
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Konstantin Kharlamov <hi-angel <at> yandex.ru> writes:
>
>> By default the underscore "_" symbol is not being counted as part of a
>> word, even though I have never met a language where it's a separate
>> entity.
>
> In natural languages it's usually not word-consistent.
>
>> This means e.g. that upon opening a file one is never being
>> able to "search for word_wth_underscores under cursor", unless they
>> modify current table.
>
> Any programming language mode sets _ to be part of words, surely?  If
> not that's a bug in that mode?  What modes do you see this in?

Most languages give '_' symbol, not word, syntax.  Looking at the linked
SE thread, this sounds more like a problem with evil though, apparently
it's difficult to search for a symbol?





Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Mon, 31 Aug 2020 10:06:01 GMT) Full text and rfc822 format available.

Notification sent to Konstantin Kharlamov <hi-angel <at> yandex.ru>:
bug acknowledged by developer. (Mon, 31 Aug 2020 10:06:02 GMT) Full text and rfc822 format available.

Message #16 received at 34301-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 34301-done <at> debbugs.gnu.org,
 Konstantin Kharlamov <hi-angel <at> yandex.ru>
Subject: Re: bug#34301: Unable to make underscore part of a word everywhere
Date: Mon, 31 Aug 2020 10:05:42 +0000
Noam Postavsky <npostavs <at> gmail.com> writes:

> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> Konstantin Kharlamov <hi-angel <at> yandex.ru> writes:
>>
>>> By default the underscore "_" symbol is not being counted as part of a
>>> word, even though I have never met a language where it's a separate
>>> entity.
>>
>> In natural languages it's usually not word-consistent.
>>
>>> This means e.g. that upon opening a file one is never being
>>> able to "search for word_wth_underscores under cursor", unless they
>>> modify current table.
>>
>> Any programming language mode sets _ to be part of words, surely?  If
>> not that's a bug in that mode?  What modes do you see this in?
>
> Most languages give '_' symbol, not word, syntax.  Looking at the linked
> SE thread, this sounds more like a problem with evil though, apparently
> it's difficult to search for a symbol?

More information was requested, but none was given within 1 year, so I'm
closing this bug.  This seems to be either a bug in evil or some
programming mode.

If this is still an issue, please reply to this email (use "Reply to
all" in your email client) and we can reopen the bug report.

Best regards,
Stefan Kangas




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 28 Sep 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 182 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.