Questions tagged [parentheses]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
22 views

rainbow-delimiters does not properly highlight unmatched parenthesis

Would it be possible to highlight unmatched parenthesis if they are at the beginning of a function like func((((()? Related: How can I find missing or mismatched braces / parens in emacs? minimal.el ...
0
votes
1answer
25 views

How to match a single ')' with replace-regex?

I want to replace a list in the form of 1) 2) 3) 4) with * * * I've tried using the regex [0-9]*\), but it gives Invalid regexp: "Unmatched ) or \\)" and [0-9]*\\) replaces 0 matches. in ...
1
vote
2answers
61 views

Text editing with parentheses

I have a text like Code1. I want to convert from Code1 to Code2, including parentheses and removing some texts. How do I edit this efficiently? Code 1 AAA & 0.076 & 0.053 & 0.053\\ AAA &...
0
votes
1answer
49 views

Why I can't use `let` in this example?

I am learning Emacs lisp and wrote a function which takes as input a list of file name, and returns a list of numbers of each defun in a file (introduced in this tutorial) (lengths-list-file "/...
0
votes
1answer
163 views

Blinking Paren Mode

I'm trying to get Paren Mode to be a little more clear, cause I can hardly see the other matching pair of parenthesis. Is there any way I could make this blinking yellow?;) I'm in gnome-terminal. Here ...
2
votes
0answers
119 views

How to highlight matching brackets when the cursor is behind or in front of starting or ending brackets?

I am using Emacs: Highlight Brackets ()[]{}. I want to highlight matching brackets when the cursor is behind and front of starting and ending brackets. How can I accomplish this? foo ( "hello&...
2
votes
1answer
63 views

Background color of matching parentheses overlays the region background color

I have set lime as a background color for my region, and I also have enabled to highlight matching parens using (show-paren-mode 1). The issue I have is that when I exactly select the contents ...
0
votes
1answer
45 views

Expand parentheses with smartparens

I want to expand else {|} (second parentheses generated by smartparens) into else { | } which is the best sequence of keys or options?
1
vote
1answer
93 views

Check if a buffer's name ends with `.org`

I want to write a function to check if a buffer is an Org buffer. Here is my attempt. (defun org_bufferp (buffer) (if (bufferp buffer) ((setq buffer_name (buffer-file-name buffer)) ...
1
vote
1answer
35 views

show-paren-mode or similar to highlight multi-character parentheses

In latex, "parentheses" such as \(\), $$ and \[\] are constantly used. Is there a way to customize show-paren-mode or is there some other mode to highlight these multi-character parentheses in latex-...
3
votes
3answers
329 views

Move point inwards while counting number of nested parentheses without throwing an error

I would like to write a function that counts the number of nested parentheses while moving the cursor to the innermost bracket without throwing an error. (defun count-and-move () (interactive) ...
1
vote
4answers
688 views

How to delete surrounding brackets?

I'd like to be able delete the innermost brackets around the current point. What's a good way to do this? While the evil-surround package can do this, it needs to take a bracket type as input, so ...
4
votes
3answers
395 views

show-paren-mode only highlights when cursor is one character after closing parenthesis

Problem I have show-paren-mode enabled, but the highlighting behavior unintuitive. In particular, the matching parentheses are only highlighted in two situations as shown below (the second of which ...
1
vote
1answer
115 views

Accessing next/previous parenthesis instead of just the outermost one? (as with `syntax-ppss`)

syntax-ppss gives the surrounding parenthesis. Is it possible to get the next/previous parenthesis using this API? (which has the advantage of caching the syntax tree and working with multiple ...
5
votes
4answers
695 views

org-mode code block parentheses mismatch

Here's some emacs-lisp code in a babel block: #+begin_src emacs-lisp (defun factor (number) (labels ((*factor (divisor number) (if (> (* divisor divisor) number) (list ...
4
votes
2answers
221 views

How to highlight the current scope with C family languages?

While it's possible to highlight a block using the character under the cursor, is there a way to highlight the scope of the current cursor? I'm interested in something like QtCreator's block-...
2
votes
2answers
940 views

Spacemacs: How can I customize the highlight style of a matching parenthesis?

How do I change, in my .spacemacs, the style used to highlight the matching parenthesis?
1
vote
1answer
598 views

emacs regex to match balanced parenthesis

How can emacs lisp match balanced parenthesis? for example: "foo(bar(),hee()) out()" should be match "foo(bar(),hee())". I try below statement but it doesn't work: #!/usr/bin/env emacs --script (...
0
votes
1answer
117 views

init.el file loads, but not evaluating all of the expressions

for example (show-paren-mode t) not getting evaluated, I have to run this function every time even though it is in my init.el file and other
1
vote
1answer
1k views

How can I change the parentheses highlight style?

When the cursor in next to a parenthesis, bracket, or brace, it highlights it and the matching one (if any). This is expected. But by "highlights", I mean it entirely hides the things under a small ...
3
votes
1answer
363 views

Stop highlighting parentheses when I start typing

I use (show-paren-mode 1) to get help seeing where parentheses are. I have (setq show-paren-delay 2) to prevent intrusive highlighting when I don't need it. This is how it works now: Put cursor on a ...