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#35062: [PATCH v3 2/3] constify a bit of xterm.c Date: Sat, 20 Apr 2019 14:47:24 +0300 Message-ID: <1555760844.18656.3@yandex.ru> References: <20190407021331.948-1-Hi-Angel@yandex.ru> <20190407021331.948-2-Hi-Angel@yandex.ru> <8336mml3s7.fsf@gnu.org> <1f700b05-16a8-1159-e2e3-61f9699981a1@cs.ucla.edu> <1555722559.16908.0@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="94625"; mail-complaints-to="usenet@blaine.gmane.org" Cc: eggert@cs.ucla.edu, 35062@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 20 13:58:22 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 1hHodQ-000OOj-F6 for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Apr 2019 13:58:20 +0200 Original-Received: from localhost ([127.0.0.1]:40380 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHodJ-0005zT-TH for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Apr 2019 07:58:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHodB-0005zG-MT for bug-gnu-emacs@gnu.org; Sat, 20 Apr 2019 07:58:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHoTS-0007Bo-6e for bug-gnu-emacs@gnu.org; Sat, 20 Apr 2019 07:48:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60553) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hHoTS-0007Bf-42 for bug-gnu-emacs@gnu.org; Sat, 20 Apr 2019 07:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hHoTR-0007qI-Pj for bug-gnu-emacs@gnu.org; Sat, 20 Apr 2019 07:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Apr 2019 11:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35062 X-GNU-PR-Package: emacs Original-Received: via spool by 35062-submit@debbugs.gnu.org id=B35062.155576085530107 (code B ref 35062); Sat, 20 Apr 2019 11:48:01 +0000 Original-Received: (at 35062) by debbugs.gnu.org; 20 Apr 2019 11:47:35 +0000 Original-Received: from localhost ([127.0.0.1]:45864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHoT1-0007pX-CM for submit@debbugs.gnu.org; Sat, 20 Apr 2019 07:47:35 -0400 Original-Received: from forward103o.mail.yandex.net ([37.140.190.177]:49748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHoSz-0007pK-AK for 35062@debbugs.gnu.org; Sat, 20 Apr 2019 07:47:34 -0400 Original-Received: from mxback8g.mail.yandex.net (mxback8g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:169]) by forward103o.mail.yandex.net (Yandex) with ESMTP id D47A65F8181E; Sat, 20 Apr 2019 14:47:26 +0300 (MSK) Original-Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback8g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id GLvLjrTk9Q-lQf4lL1E; Sat, 20 Apr 2019 14:47:26 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1555760846; bh=UgX8TVo4yIoj2per//eF1ohPqJWpAFCHpIAUAySeU7I=; h=In-Reply-To:Cc:To:Subject:From:References:Date:Message-Id; b=DWKvsOvRo1RbIsJjBwebgBc4eTf3JLd/S+DA+cjbgWMNefiRRN1RI9DqmhN0pxGvn Eftw0KbnavBroAPtLCCm4xwVsccqoMWd9iJKjbmyUWaKd3aiODMvFZZFquciVYHmgG Eh/wawOQ2Uyndv7dWTA8avy0JS70wviG2nlnj/uM= Authentication-Results: mxback8g.mail.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id i4YPErEi9w-lP2mrr80; Sat, 20 Apr 2019 14:47:25 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) In-Reply-To: <1555759540.18656.2@yandex.ru> X-Mailer: geary/emphasize-participated-in~g736c62cb-dirty 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:157892 Archived-At: On =D0=A1=D0=B1, Apr 20, 2019 at 14:25, Konstantin Kharlamov=20 wrote: >=20 >=20 > On =D0=A1=D0=B1, Apr 20, 2019 at 14:23, Konstantin Kharlamov=20 > wrote: >>=20 >>=20 >> On =D0=A1=D0=B1, Apr 20, 2019 at 14:01, Eli Zaretskii wro= te: >>>> Date: Sat, 20 Apr 2019 13:31:44 +0300 >>>> From: Konstantin Kharlamov >>>> Cc: eggert@cs.ucla.edu, 35062@debbugs.gnu.org >>>>=20 >>>> On =D0=A1=D0=B1, Apr 20, 2019 at 09:53, Eli Zaretskii =20 >>>> wrote: >>>> >> Date: Sat, 20 Apr 2019 04:09:19 +0300 >>>> >> From: Konstantin Kharlamov >>>> >> Cc: Eli Zaretskii , 35062@debbugs.gnu.org >>>> >> >>>> > I don't think I follow: Emacs's search commands do highlight the >>>> > matches, and we also have symbol-search commands ("M-s _"=20 >>>> etc.), =7F=7F=7F=7F=7Fso >>>> > what exactly is missing? >>>>=20 >>>> See: to any search a word in Emacs you have to either type it=20 >>>> =7F=7F=7F=7F=7Fmanually >>>> or copy-paste it. And then if you get unlucky to have next match >>>> offscreen, the search gonna carry currently visible portion of=20 >>>> text >>>> away. >>>>=20 >>>> In other editors and IDEs it's implemented instead by selecting a=20 >>>> =7F=7F=7F=7F=7Fword, >>>> which makes the editor to highlight matches. >>>=20 >>> "M-s ." will highlight matches for the symbol at point, without even >>> requiring you to select that symbol. >>=20 >> Wow, that's cool, I didn't know about=20 >> =7F(isearch-forward-symbol-at-point). >>=20 >>>> That's similar to what highlight-symbol.el is doing: you put a=20 >>>> =7F=7F=7Fcaret >>>> over a text, and after a short timeout (IIRC you can't set timeout >>>> to 0 as it introduces lags to Emacs) it highlights visible matches >>>> of the symbol under the caret. And then, if you want to, you can >>>> press a hotkey to lock the highlight. >>>=20 >>> So you want to avoid typing "M-s .", is that right? But selecting a >>> symbol will need more keystrokes (except for very short symbols), so >>> where's the gain in that? >>=20 >> Well, me not knowing about "M-s ." aside, I understand one can't=20 >> =7Fdirectly compare having to select a text in other editors with=20 >> Emacs, =7Fbecause those are mouse-oriented, and Emacs is=20 >> keyboard-oriented. The =7F"Emacsy" solution is implemented in=20 >> highlight-symbol.el, and it is =7Fquicker than typing "M-s .": you=20 >> just put a caret over a symbol, and =7Fmatches are automatically shown. >>=20 >> I just thought if I can write an analog of highlight-symbol.el by=20 >> =7Fbinding the "M-s ." >=20 > =E2=80=A6by binding the function to idle-timeout and post that as an answ= er=20 > here=20 > https://stackoverflow.com/questions/385661/how-to-highlight-all-occurrenc= es-of-a-word-in-an-emacs-buffer=20 > but I figured that this gonna make caret to jump to beginning of a=20 > word every time, so probably no. >=20 > (sorry, accidentally pressed Ctrl+enter in mail client instead of=20 > Ctrl+Backspace) >=20 Btw, I just tried setting (setq highlight-symbol-idle-delay 0) in=20 highlight-symbol.el, and it doesn't lag for me! This is amazing! I'll=20 try to keep it for today to see how it goes. =