* Highlighting parentheses when matching parentheses resides outside visible window @ 2022-10-25 11:22 Heime 2022-10-25 11:40 ` Eli Zaretskii ` (3 more replies) 0 siblings, 4 replies; 20+ messages in thread From: Heime @ 2022-10-25 11:22 UTC (permalink / raw) To: Heime via Users list for the GNU Emacs text editor Although emacs is capable of highlighting parentheses, when the matching parentheses is located outside the visible window, there is no chance to see where a closing parenthesis actually matches. Can there be a solution to this? ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-25 11:22 Highlighting parentheses when matching parentheses resides outside visible window Heime @ 2022-10-25 11:40 ` Eli Zaretskii 2022-10-25 12:01 ` Heime 2022-10-25 22:41 ` Heime 2022-10-25 12:22 ` Jean Louis ` (2 subsequent siblings) 3 siblings, 2 replies; 20+ messages in thread From: Eli Zaretskii @ 2022-10-25 11:40 UTC (permalink / raw) To: help-gnu-emacs > Date: Tue, 25 Oct 2022 11:22:24 +0000 > From: Heime <heimeborgia@protonmail.com> > > > Although emacs is capable of highlighting parentheses, when the matching parentheses > is located outside the visible window, there is no chance to see where a closing > parenthesis actually matches. Can there be a solution to this? Did you try the non-default values of show-paren-style? ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-25 11:40 ` Eli Zaretskii @ 2022-10-25 12:01 ` Heime 2022-10-25 12:44 ` Eli Zaretskii 2022-10-25 22:41 ` Heime 1 sibling, 1 reply; 20+ messages in thread From: Heime @ 2022-10-25 12:01 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs ------- Original Message ------- On Tuesday, October 25th, 2022 at 11:40 AM, Eli Zaretskii <eliz@gnu.org> wrote: > > Date: Tue, 25 Oct 2022 11:22:24 +0000 > > From: Heime heimeborgia@protonmail.com > > > > Although emacs is capable of highlighting parentheses, when the matching parentheses > > is located outside the visible window, there is no chance to see where a closing > > parenthesis actually matches. Can there be a solution to this? > > > Did you try the non-default values of show-paren-style? What would you suggest I do exactly? ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-25 12:01 ` Heime @ 2022-10-25 12:44 ` Eli Zaretskii 0 siblings, 0 replies; 20+ messages in thread From: Eli Zaretskii @ 2022-10-25 12:44 UTC (permalink / raw) To: help-gnu-emacs > Date: Tue, 25 Oct 2022 12:01:22 +0000 > From: Heime <heimeborgia@protonmail.com> > Cc: help-gnu-emacs@gnu.org > > ------- Original Message ------- > On Tuesday, October 25th, 2022 at 11:40 AM, Eli Zaretskii <eliz@gnu.org> wrote: > > > > > Date: Tue, 25 Oct 2022 11:22:24 +0000 > > > From: Heime heimeborgia@protonmail.com > > > > > > Although emacs is capable of highlighting parentheses, when the matching parentheses > > > is located outside the visible window, there is no chance to see where a closing > > > parenthesis actually matches. Can there be a solution to this? > > > > > > Did you try the non-default values of show-paren-style? > > What would you suggest I do exactly? Try the various non-default values by customizing the variable, and then see if you like the results in the situations you describe. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-25 11:40 ` Eli Zaretskii 2022-10-25 12:01 ` Heime @ 2022-10-25 22:41 ` Heime 2022-10-26 11:09 ` Eli Zaretskii 1 sibling, 1 reply; 20+ messages in thread From: Heime @ 2022-10-25 22:41 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs ------- Original Message ------- On Tuesday, October 25th, 2022 at 11:40 AM, Eli Zaretskii <eliz@gnu.org> wrote: > > Date: Tue, 25 Oct 2022 11:22:24 +0000 > > From: Heime heimeborgia@protonmail.com > > > > Although emacs is capable of highlighting parentheses, when the matching parentheses > > is located outside the visible window, there is no chance to see where a closing > > parenthesis actually matches. Can there be a solution to this? > > > Did you try the non-default values of show-paren-style? Have spent some serious time scrutinising show-paren-style. I will explain the problem. Suppose your function is longer than your emacs window. Use "expression" as "show-paren-style", then go just after the last closing parenthesis. You get the associated region highlighted. BUT, try to scroll up the code, the highlighting get recomputed as the point moves across the window. Thus highlighting capability becomes useless when the part does not fit in the emacs window pane. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-25 22:41 ` Heime @ 2022-10-26 11:09 ` Eli Zaretskii 2022-10-26 17:05 ` Heime 0 siblings, 1 reply; 20+ messages in thread From: Eli Zaretskii @ 2022-10-26 11:09 UTC (permalink / raw) To: help-gnu-emacs > Date: Tue, 25 Oct 2022 22:41:33 +0000 > From: Heime <heimeborgia@protonmail.com> > Cc: help-gnu-emacs@gnu.org > > Have spent some serious time scrutinising show-paren-style. > > I will explain the problem. Suppose your function is longer than your emacs window. > Use "expression" as "show-paren-style", then go just after the last closing parenthesis. > You get the associated region highlighted. BUT, try to scroll up the code, the highlighting > get recomputed as the point moves across the window. Thus highlighting capability becomes > useless when the part does not fit in the emacs window pane. I'm sorry, but this doesn't explain your problem in enough detail. First, what exactly do you mean by "scroll up the code"? which Emacs commands did you use to scroll? At least some ways of scrolling don't move point. And when you say "point moves across the window", do you mean that point moves with the text or that the text moves, but point stays at the same screen coordinates? Depending on how you scroll, it could be one or the other. Next, what do you mean by "highlighting get recomputed as the point moves across the window"? What happens with highlighting as you "scroll" that you don't like? And finally, what would you like to happen instead in this case? ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-26 11:09 ` Eli Zaretskii @ 2022-10-26 17:05 ` Heime 2022-10-26 17:37 ` Eli Zaretskii 2022-10-26 17:50 ` Emanuel Berg 0 siblings, 2 replies; 20+ messages in thread From: Heime @ 2022-10-26 17:05 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs ------- Original Message ------- On Wednesday, October 26th, 2022 at 11:09 AM, Eli Zaretskii <eliz@gnu.org> wrote: > > Date: Tue, 25 Oct 2022 22:41:33 +0000 > > From: Heime heimeborgia@protonmail.com > > Cc: help-gnu-emacs@gnu.org > > > > Have spent some serious time scrutinising show-paren-style. > > > > I will explain the problem. Suppose your function is longer than your emacs window. > > Use "expression" as "show-paren-style", then go just after the last closing parenthesis. > > You get the associated region highlighted. BUT, try to scroll up the code, the highlighting > > get recomputed as the point moves across the window. Thus highlighting capability becomes > > useless when the part does not fit in the emacs window pane. > > > I'm sorry, but this doesn't explain your problem in enough detail. > > First, what exactly do you mean by "scroll up the code"? which Emacs > commands did you use to scroll? At least some ways of scrolling don't > move point. I use the arrow keys do a mouse scroll up. With mouse scroll up, the position of the cursor moves as the window gets updated. > And when you say "point moves across the window", do you mean that > point moves with the text or that the text moves, but point stays at > the same screen coordinates? Depending on how you scroll, it could be > one or the other. If the point stays at same screen coordinates, or moves with the text; the point still moves from its original position (originally positioned after parenthesis of interest). Have noticed that when I scroll, the cursor point always shown up in the window. > Next, what do you mean by "highlighting get recomputed as the point > moves across the window"? What happens with highlighting as you > "scroll" that you don't like? Let there be a long function, and you put the cursor at the point following the last parenthesis. With "show-paren-style" being expression, the function code get highlighted. Suppose I want to go to the beginning of the function which resides outside the window pane. The highlighting is disabled as I go to the beginning of the function. > And finally, what would you like to happen instead in this case? I would like the possibility of freezing the highlighting (not only when using 'expression put also for 'parenthesis). Currently I loose all the parenthesis or expression highlighting when I need to move through the code. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-26 17:05 ` Heime @ 2022-10-26 17:37 ` Eli Zaretskii 2022-10-26 17:48 ` Heime 2022-10-26 17:50 ` Emanuel Berg 1 sibling, 1 reply; 20+ messages in thread From: Eli Zaretskii @ 2022-10-26 17:37 UTC (permalink / raw) To: help-gnu-emacs > Date: Wed, 26 Oct 2022 17:05:35 +0000 > From: Heime <heimeborgia@protonmail.com> > Cc: help-gnu-emacs@gnu.org > > I would like the possibility of freezing the highlighting (not only when using > 'expression put also for 'parenthesis). Currently I loose all the parenthesis > or expression highlighting when I need to move through the code. "Freezing" until what happens? what would cause the highlight to be turned off? Anyway, if this is what you want, then show-paren-mode is not the solution. show-paren-mode is explicitly programmed to show you the parenthesized/braced construct before/after point, so if you move point, you cannot expect the highlight to remain "frozen". ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-26 17:37 ` Eli Zaretskii @ 2022-10-26 17:48 ` Heime 2022-10-26 17:58 ` Eli Zaretskii 0 siblings, 1 reply; 20+ messages in thread From: Heime @ 2022-10-26 17:48 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs ------- Original Message ------- On Wednesday, October 26th, 2022 at 5:37 PM, Eli Zaretskii <eliz@gnu.org> wrote: > > Date: Wed, 26 Oct 2022 17:05:35 +0000 > > From: Heime heimeborgia@protonmail.com > > Cc: help-gnu-emacs@gnu.org > > > > I would like the possibility of freezing the highlighting (not only when using > > 'expression put also for 'parenthesis). Currently I loose all the parenthesis > > or expression highlighting when I need to move through the code. > > > "Freezing" until what happens? what would cause the highlight to be > turned off? > > Anyway, if this is what you want, then show-paren-mode is not the > solution. show-paren-mode is explicitly programmed to show you the > parenthesized/braced construct before/after point, so if you move > point, you cannot expect the highlight to remain "frozen". Been thinking of a toggle at user request. Once you get the highlighting call a hold-highlighting function. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-26 17:48 ` Heime @ 2022-10-26 17:58 ` Eli Zaretskii 2022-10-26 18:03 ` Heime 2022-10-26 18:23 ` Heime 0 siblings, 2 replies; 20+ messages in thread From: Eli Zaretskii @ 2022-10-26 17:58 UTC (permalink / raw) To: help-gnu-emacs > Date: Wed, 26 Oct 2022 17:48:05 +0000 > From: Heime <heimeborgia@protonmail.com> > Cc: help-gnu-emacs@gnu.org > > > "Freezing" until what happens? what would cause the highlight to be > > turned off? > > > > Anyway, if this is what you want, then show-paren-mode is not the > > solution. show-paren-mode is explicitly programmed to show you the > > parenthesized/braced construct before/after point, so if you move > > point, you cannot expect the highlight to remain "frozen". > > Been thinking of a toggle at user request. Once you get the highlighting > call a hold-highlighting function. That's not what show-paren-mode is supposed to do. There are many packages out there which highlight parenthesized expressions, I'm sure you will find one that suits your needs. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-26 17:58 ` Eli Zaretskii @ 2022-10-26 18:03 ` Heime 2022-10-26 18:23 ` Heime 1 sibling, 0 replies; 20+ messages in thread From: Heime @ 2022-10-26 18:03 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs ------- Original Message ------- On Wednesday, October 26th, 2022 at 5:58 PM, Eli Zaretskii <eliz@gnu.org> wrote: > > Date: Wed, 26 Oct 2022 17:48:05 +0000 > > From: Heime heimeborgia@protonmail.com > > Cc: help-gnu-emacs@gnu.org > > > > > "Freezing" until what happens? what would cause the highlight to be > > > turned off? > > > > > > Anyway, if this is what you want, then show-paren-mode is not the > > > solution. show-paren-mode is explicitly programmed to show you the > > > parenthesized/braced construct before/after point, so if you move > > > point, you cannot expect the highlight to remain "frozen". > > > > Been thinking of a toggle at user request. Once you get the highlighting > > call a hold-highlighting function. > > > That's not what show-paren-mode is supposed to do. There are many > packages out there which highlight parenthesized expressions, I'm sure > you will find one that suits your needs. Any good ones? ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-26 17:58 ` Eli Zaretskii 2022-10-26 18:03 ` Heime @ 2022-10-26 18:23 ` Heime 2022-10-26 18:39 ` Eli Zaretskii 1 sibling, 1 reply; 20+ messages in thread From: Heime @ 2022-10-26 18:23 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs ------- Original Message ------- On Wednesday, October 26th, 2022 at 5:58 PM, Eli Zaretskii <eliz@gnu.org> wrote: > > Date: Wed, 26 Oct 2022 17:48:05 +0000 > > From: Heime heimeborgia@protonmail.com > > Cc: help-gnu-emacs@gnu.org > > > > > "Freezing" until what happens? what would cause the highlight to be > > > turned off? > > > > > > Anyway, if this is what you want, then show-paren-mode is not the > > > solution. show-paren-mode is explicitly programmed to show you the > > > parenthesized/braced construct before/after point, so if you move > > > point, you cannot expect the highlight to remain "frozen". > > > > Been thinking of a toggle at user request. Once you get the highlighting > > call a hold-highlighting function. > > > That's not what show-paren-mode is supposed to do. There are many > packages out there which highlight parenthesized expressions, I'm sure > you will find one that suits your needs. All the highlighting functionality is there. Is it not possible to add a toggle function to keep the highlighting once some function is called, then call it again to have show-paren-mode work normally again. Or some other solution you think might work? The show-paren-mode tools work well until the highlighting goes outside the current window pane. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-26 18:23 ` Heime @ 2022-10-26 18:39 ` Eli Zaretskii 2022-10-26 19:14 ` Heime 0 siblings, 1 reply; 20+ messages in thread From: Eli Zaretskii @ 2022-10-26 18:39 UTC (permalink / raw) To: help-gnu-emacs > Date: Wed, 26 Oct 2022 18:23:20 +0000 > From: Heime <heimeborgia@protonmail.com> > Cc: help-gnu-emacs@gnu.org > > > That's not what show-paren-mode is supposed to do. There are many > > packages out there which highlight parenthesized expressions, I'm sure > > you will find one that suits your needs. > > All the highlighting functionality is there. Is it not possible to add a toggle > function to keep the highlighting once some function is called, then call it again > to have show-paren-mode work normally again. It would not be show-paren-mode, then. > Or some other solution you think might work? I'm sure people here will point you to other highlighting packages. I'm not familiar with them, but I know that there are quite a few. > The show-paren-mode tools work well until the highlighting goes > outside the current window pane. It's a rarely-needed functionality, for the purpose for which show-paren-mode was designed. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-26 18:39 ` Eli Zaretskii @ 2022-10-26 19:14 ` Heime 2022-10-27 5:16 ` Eli Zaretskii 0 siblings, 1 reply; 20+ messages in thread From: Heime @ 2022-10-26 19:14 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs ------- Original Message ------- On Wednesday, October 26th, 2022 at 6:39 PM, Eli Zaretskii <eliz@gnu.org> wrote: > > Date: Wed, 26 Oct 2022 18:23:20 +0000 > > From: Heime heimeborgia@protonmail.com > > Cc: help-gnu-emacs@gnu.org > > > > > That's not what show-paren-mode is supposed to do. There are many > > > packages out there which highlight parenthesized expressions, I'm sure > > > you will find one that suits your needs. > > > > All the highlighting functionality is there. Is it not possible to add a toggle > > function to keep the highlighting once some function is called, then call it again > > to have show-paren-mode work normally again. > > > It would not be show-paren-mode, then. > > > Or some other solution you think might work? > > > I'm sure people here will point you to other highlighting packages. > I'm not familiar with them, but I know that there are quite a few. > > > The show-paren-mode tools work well until the highlighting goes > > outside the current window pane. > > > It's a rarely-needed functionality, for the purpose for which > show-paren-mode was designed. There are many function longer than the height of a normal emacs window. Thusly I fail to conclude that it is a rarely-needed functionality. Because the show-paren-mode functionality fails when the window is small or the function is long, technically it should be considered a bug. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-26 19:14 ` Heime @ 2022-10-27 5:16 ` Eli Zaretskii 2022-10-27 5:46 ` Heime 0 siblings, 1 reply; 20+ messages in thread From: Eli Zaretskii @ 2022-10-27 5:16 UTC (permalink / raw) To: help-gnu-emacs > Date: Wed, 26 Oct 2022 19:14:57 +0000 > From: Heime <heimeborgia@protonmail.com> > Cc: help-gnu-emacs@gnu.org > > > It's a rarely-needed functionality, for the purpose for which > > show-paren-mode was designed. > > There are many function longer than the height of a normal emacs > window. show-paren-mode is not for highlighting functions, as its name and documentation makes clear. > Thusly I fail to conclude that it is a rarely-needed functionality. > Because the show-paren-mode functionality fails when the window is > small or the function is long, technically it should be considered a > bug. It isn't a bug, since show-paren-mode is not supposed to provide what you want. Other packages do, so I suggest that you find one that suits your needs and install it. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-27 5:16 ` Eli Zaretskii @ 2022-10-27 5:46 ` Heime 0 siblings, 0 replies; 20+ messages in thread From: Heime @ 2022-10-27 5:46 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs ------- Original Message ------- On Thursday, October 27th, 2022 at 5:16 AM, Eli Zaretskii <eliz@gnu.org> wrote: > > Date: Wed, 26 Oct 2022 19:14:57 +0000 > > From: Heime heimeborgia@protonmail.com > > Cc: help-gnu-emacs@gnu.org > > > > > It's a rarely-needed functionality, for the purpose for which > > > show-paren-mode was designed. > > > > There are many function longer than the height of a normal emacs > > window. > > > show-paren-mode is not for highlighting functions, as its name and > documentation makes clear. > > > Thusly I fail to conclude that it is a rarely-needed functionality. > > Because the show-paren-mode functionality fails when the window is > > small or the function is long, technically it should be considered a > > bug. Suppose you are using expression style. Suppose you want to see if the last parenthesis matches the one before defun. Or you have long clauses (let, if, when, unless). > It isn't a bug, since show-paren-mode is not supposed to provide what > you want. Other packages do, so I suggest that you find one that > suits your needs and install it. Isn't it supposed to show you the paired parenthesis getting highlighted??? DOCSTING "Toggle visualization of matching parens". How can one visualise a matching parens if the matching parens is not viewable in the window? "show-paren-mode" should be upgraded, so that we would not need to find another one which is not built-in. At any rate, finding another one would make "show-paren-mode" obsolete. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-26 17:05 ` Heime 2022-10-26 17:37 ` Eli Zaretskii @ 2022-10-26 17:50 ` Emanuel Berg 1 sibling, 0 replies; 20+ messages in thread From: Emanuel Berg @ 2022-10-26 17:50 UTC (permalink / raw) To: help-gnu-emacs Heime wrote: > I use the arrow keys do a mouse scroll up. With mouse scroll > up, the position of the cursor moves as the window > gets updated. M-i and M-k one line at a time ... Civilized scrolling! Get up get down get high get no no no where ... https://www.youtube.com/watch?v=61nxcJ32mVg ;;; -*- lexical-binding: t -*- ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/scroll.el (require 'cl-lib) (setq scroll-conservatively 10000) (setq auto-window-vscroll nil) ;; scroll the current window (defun scroll-up-1 () (interactive) (scroll-down 1) ) (defun scroll-down-1 () (interactive) (scroll-up 1) ) ;; automatic scrolling (defun start-automatic-scroll-down () (interactive) (let ((win)) (cl-loop do (setq win (window-end)) (scroll-down-1) (sleep-for 1) ; put speed here in seconds (redisplay) until (= win (window-end)) ))) ;; (start-automatic-scroll-down) ;; ^ test here; abort with C-g ;; scroll up/down the other window (defun scroll-up-other-window () (interactive) (scroll-other-window-down 1) ) (defun scroll-down-other-window () (interactive) (scroll-other-window 1) ) ;; scroll one pane of text (defun get-window-lines () (let*((edges (window-inside-edges)) (top (nth 1 edges)) (bottom (nth 3 edges)) (lines (- bottom top)) ) (if (member major-mode '(Buffer-menu-mode package-menu-mode w3m-mode)) (1- lines) lines) )) (defun scroll-up-pane () (interactive) (scroll-down (get-window-lines) )) (defun scroll-down-pane () (interactive) (scroll-up (get-window-lines)) ) ;; scroll horizontally (put 'scroll-left 'disabled nil) (put 'scroll-right 'disabled nil) (setq hscroll-margin 1) (setq hscroll-step 1) (defun scroll-left-1 () (interactive) (scroll-right 1 0) ) ; yes, "the opposite" here (defun scroll-right-1 () (interactive) (scroll-left 1 0) ) ; ditto (defun set-pane-scroll-keys (map) "Set MAP keys for vertical scrolling in panes." (define-key map "I" #'scroll-up-pane) (define-key map "K" #'scroll-down-pane) ) (defun set-scroll-keys (map &optional horizontally) "Set MAP keys for scrolling, vertically and HORIZONTALLY. Also invoke `set-pane-scroll-keys'." (when horizontally (define-key map "j" #'scroll-left-1) (define-key map "l" #'scroll-right-1) ) (define-key map "i" #'scroll-up-1) (define-key map "\M-i" #'scroll-up-1) (define-key map "k" #'scroll-down-1) (define-key map "\M-k" #'scroll-down-1) (set-pane-scroll-keys map) ) (defun set-vertical-keys (map &optional button n-and-p) (let*((keys (if button (list #'backward-button #'forward-button) (list #'previous-line #'forward-line) )) (up (car keys)) (down (cadr keys)) ) (define-key map "i" up) (define-key map "k" down) (when n-and-p (define-key map "p" up) (define-key map "n" down) ))) (provide 'scroll) -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-25 11:22 Highlighting parentheses when matching parentheses resides outside visible window Heime 2022-10-25 11:40 ` Eli Zaretskii @ 2022-10-25 12:22 ` Jean Louis 2022-10-25 13:10 ` Stefan Monnier via Users list for the GNU Emacs text editor 2022-10-26 10:21 ` Daniel Martín 3 siblings, 0 replies; 20+ messages in thread From: Jean Louis @ 2022-10-25 12:22 UTC (permalink / raw) To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor Use C-M-f and C-M-b to go back and forward of sexp. It is useful. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/ ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-25 11:22 Highlighting parentheses when matching parentheses resides outside visible window Heime 2022-10-25 11:40 ` Eli Zaretskii 2022-10-25 12:22 ` Jean Louis @ 2022-10-25 13:10 ` Stefan Monnier via Users list for the GNU Emacs text editor 2022-10-26 10:21 ` Daniel Martín 3 siblings, 0 replies; 20+ messages in thread From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-10-25 13:10 UTC (permalink / raw) To: help-gnu-emacs > Although Emacs is capable of highlighting parentheses, when the > matching parentheses is located outside the visible window, there is > no chance to see where a closing parenthesis actually matches. > Can there be a solution to this? By default the matching paren's nearby text is displayed in the echo area if it's outside of the visible part of the buffer. Stefan ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Highlighting parentheses when matching parentheses resides outside visible window 2022-10-25 11:22 Highlighting parentheses when matching parentheses resides outside visible window Heime ` (2 preceding siblings ...) 2022-10-25 13:10 ` Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-10-26 10:21 ` Daniel Martín 3 siblings, 0 replies; 20+ messages in thread From: Daniel Martín @ 2022-10-26 10:21 UTC (permalink / raw) To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor Heime <heimeborgia@protonmail.com> writes: > Although emacs is capable of highlighting parentheses, when the matching parentheses > is located outside the visible window, there is no chance to see where a closing > parenthesis actually matches. Can there be a solution to this? There are many ways to achieve that: - C-M-b C-M-f to move backward and forward a balanced expression. - Delete and reinsert the parenthesis. You will see in the echo area the text "Matches ..." that informs you about the matching parenthesis. - In Emacs 29, I introduced a new defcustom for show-paren-mode, show-paren-context-when-offscreen, which will automatically show the matching parenthesis information in the echo area when the point is next to the closing parenthesis, without needing to reinsert it. ^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2022-10-27 5:46 UTC | newest] Thread overview: 20+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-10-25 11:22 Highlighting parentheses when matching parentheses resides outside visible window Heime 2022-10-25 11:40 ` Eli Zaretskii 2022-10-25 12:01 ` Heime 2022-10-25 12:44 ` Eli Zaretskii 2022-10-25 22:41 ` Heime 2022-10-26 11:09 ` Eli Zaretskii 2022-10-26 17:05 ` Heime 2022-10-26 17:37 ` Eli Zaretskii 2022-10-26 17:48 ` Heime 2022-10-26 17:58 ` Eli Zaretskii 2022-10-26 18:03 ` Heime 2022-10-26 18:23 ` Heime 2022-10-26 18:39 ` Eli Zaretskii 2022-10-26 19:14 ` Heime 2022-10-27 5:16 ` Eli Zaretskii 2022-10-27 5:46 ` Heime 2022-10-26 17:50 ` Emanuel Berg 2022-10-25 12:22 ` Jean Louis 2022-10-25 13:10 ` Stefan Monnier via Users list for the GNU Emacs text editor 2022-10-26 10:21 ` Daniel Martín
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).