* bug#34301: Unable to make underscore part of a word everywhere
@ 2019-02-03 18:09 Konstantin Kharlamov
2019-07-09 17:13 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Konstantin Kharlamov @ 2019-02-03 18:09 UTC (permalink / raw)
To: 34301
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#34301: Unable to make underscore part of a word everywhere
2019-02-03 18:09 bug#34301: Unable to make underscore part of a word everywhere Konstantin Kharlamov
@ 2019-07-09 17:13 ` Lars Ingebrigtsen
2019-07-09 18:07 ` Noam Postavsky
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-09 17:13 UTC (permalink / raw)
To: Konstantin Kharlamov; +Cc: 34301
Konstantin Kharlamov <hi-angel@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#34301: Unable to make underscore part of a word everywhere
2019-07-09 17:13 ` Lars Ingebrigtsen
@ 2019-07-09 18:07 ` Noam Postavsky
2020-08-31 10:05 ` Stefan Kangas
0 siblings, 1 reply; 4+ messages in thread
From: Noam Postavsky @ 2019-07-09 18:07 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 34301, Konstantin Kharlamov
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Konstantin Kharlamov <hi-angel@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?
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#34301: Unable to make underscore part of a word everywhere
2019-07-09 18:07 ` Noam Postavsky
@ 2020-08-31 10:05 ` Stefan Kangas
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Kangas @ 2020-08-31 10:05 UTC (permalink / raw)
To: Noam Postavsky; +Cc: Lars Ingebrigtsen, 34301-done, Konstantin Kharlamov
Noam Postavsky <npostavs@gmail.com> writes:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Konstantin Kharlamov <hi-angel@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-31 10:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-03 18:09 bug#34301: Unable to make underscore part of a word everywhere Konstantin Kharlamov
2019-07-09 17:13 ` Lars Ingebrigtsen
2019-07-09 18:07 ` Noam Postavsky
2020-08-31 10:05 ` Stefan Kangas
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).