|
From: | Konstantin Kharlamov |
Subject: | bug#35062: [PATCH v3 2/3] constify a bit of xterm.c |
Date: | Sat, 20 Apr 2019 14:58:18 +0300 |
On Сб, Apr 20, 2019 at 14:47, Konstantin Kharlamov <hi-angel@yandex.ru> wrote:
On Сб, Apr 20, 2019 at 14:25, Konstantin Kharlamov <hi-angel@yandex.ru> wrote:Btw, I just tried setting (setq highlight-symbol-idle-delay 0) in highlight-symbol.el, and it doesn't lag for me! This is amazing! I'll try to keep it for today to see how it goes.On Сб, Apr 20, 2019 at 14:23, Konstantin Kharlamov <hi-angel@yandex.ru> wrote:On Сб, Apr 20, 2019 at 14:01, Eli Zaretskii <eliz@gnu.org> wrote:Date: Sat, 20 Apr 2019 13:31:44 +0300 From: Konstantin Kharlamov <hi-angel@yandex.ru> Cc: eggert@cs.ucla.edu, 35062@debbugs.gnu.orgOn Сб, Apr 20, 2019 at 09:53, Eli Zaretskii <eliz@gnu.org> wrote:>> Date: Sat, 20 Apr 2019 04:09:19 +0300 >> From: Konstantin Kharlamov <hi-angel@yandex.ru> >> Cc: Eli Zaretskii <eliz@gnu.org>, 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 _" etc.), so> what exactly is missing?See: to any search a word in Emacs you have to either type it manuallyor copy-paste it. And then if you get unlucky to have next matchoffscreen, the search gonna carry currently visible portion of textaway.In other editors and IDEs it's implemented instead by selecting a word,which makes the editor to highlight matches."M-s ." will highlight matches for the symbol at point, without evenrequiring you to select that symbol.Wow, that's cool, I didn't know about (isearch-forward-symbol-at-point).That's similar to what highlight-symbol.el is doing: you put a caret 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 matchesof the symbol under the caret. And then, if you want to, you can press a hotkey to lock the highlight.So you want to avoid typing "M-s .", is that right? But selecting a symbol will need more keystrokes (except for very short symbols), sowhere's the gain in that?Well, me not knowing about "M-s ." aside, I understand one can't directly compare having to select a text in other editors with Emacs, because those are mouse-oriented, and Emacs is keyboard-oriented. The "Emacsy" solution is implemented in highlight-symbol.el, and it is quicker than typing "M-s .": you just put a caret over a symbol, and matches are automatically shown.I just thought if I can write an analog of highlight-symbol.el by binding the "M-s ."…by binding the function to idle-timeout and post that as an answer here https://stackoverflow.com/questions/385661/how-to-highlight-all-occurrences-of-a-word-in-an-emacs-buffer but I figured that this gonna make caret to jump to beginning of a word every time, so probably no.(sorry, accidentally pressed Ctrl+enter in mail client instead of Ctrl+Backspace)
Ah, never mind, typing the text is impossible.
[Prev in Thread] | Current Thread | [Next in Thread] |