From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#34301: Unable to make underscore part of a word everywhere Date: Sun, 3 Feb 2019 21:09:48 +0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="100290"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 To: 34301@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 03 19:11:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gqMEY-000PzE-LR for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Feb 2019 19:11:10 +0100 Original-Received: from localhost ([127.0.0.1]:58911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqMEX-0007s0-Ej for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Feb 2019 13:11:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqMER-0007rv-Di for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2019 13:11:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqMEQ-0002tj-GE for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2019 13:11:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58470) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqMEQ-0002td-CX for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2019 13:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gqMEQ-0000L6-6S for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2019 13:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Feb 2019 18:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34301 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15492174191249 (code B ref -1); Sun, 03 Feb 2019 18:11:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Feb 2019 18:10:19 +0000 Original-Received: from localhost ([127.0.0.1]:57751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqMDh-0000K5-VC for submit@debbugs.gnu.org; Sun, 03 Feb 2019 13:10:18 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqMDe-0000Jo-UC for submit@debbugs.gnu.org; Sun, 03 Feb 2019 13:10:16 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:35853) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gqMDY-0002Py-Rz for submit@debbugs.gnu.org; Sun, 03 Feb 2019 13:10:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqMDX-0007kR-TQ for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2019 13:10:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqMDV-0002PK-VK for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2019 13:10:07 -0500 Original-Received: from forward102o.mail.yandex.net ([2a02:6b8:0:1a2d::602]:42094) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gqMDS-0002MU-2q for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2019 13:10:04 -0500 Original-Received: from mxback22g.mail.yandex.net (mxback22g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:322]) by forward102o.mail.yandex.net (Yandex) with ESMTP id D10CF6680A97 for ; Sun, 3 Feb 2019 21:09:55 +0300 (MSK) Original-Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback22g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id mHAqthAzEY-9tVu3uDl; Sun, 03 Feb 2019 21:09:55 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1549217395; bh=0FeB/1yZnNin5nK5746Ff/OkNi62egcbWlKHbFTcyu4=; h=To:From:Subject:Message-ID:Date; b=Kq76xMXBUTt1xe5+BMKr8BgWCC3iEJbPpQAiCe0zxjl0FCH9RQ74PrKwrlA3z2JwN qr/D7fw9ycPArRE93dKOxPczooAyphWBnlNp9YKktBEuYfZioGA/NGgME6I9fDFXu6 FWJ0WZ2E+Cv/rYB0w8GsGWJgNsdc3jr8RhQe4W1E= Authentication-Results: mxback22g.mail.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id TnzutkAqYC-9taSlYmi; Sun, 03 Feb 2019 21:09:55 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155056 Archived-At: 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.