* Re: mic-paren.el 3.10 available
[not found] ` <2b42c9ad-dbde-41ce-90c5-caef9568a18e@googlegroups.com>
@ 2012-07-26 4:19 ` Thien-Thi Nguyen
[not found] ` <mailman.5631.1343276384.855.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 7+ messages in thread
From: Thien-Thi Nguyen @ 2012-07-26 4:19 UTC (permalink / raw)
To: rfflrccrd; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]
[NB: CC updated; we use the "sources" list to post/announce source code.]
() rfflrccrd@gmail.com
() Wed, 25 Jul 2012 14:54:57 -0700 (PDT)
As I use Viper, a Vim-emulation mode, I looked into the customization
group mic-paren-matching, hoping to find a way to emulate the way Vim
uses to highlight parentheses. I found nothing. Do you confirm it
is so?
No, but that's not saying much -- i don't use Vim. FWIW, my mic-paren
usage is very simple:
http://www.gnuvola.org/software/personal-elisp/dist/lisp/low-stress/turn-on-mic-paren.el
Basically, since Vim uses both a bar cursor and a block cursor,
depending on context it highilights sometimes the parenthesis before
the cursor and sometimes the one after the cursor.
Could you please give an example or point to one on the net?
--
Thien-Thi Nguyen GPG key: 4C807502
........... please send technical questions to mailing lists ...........
. .... .
. NB: ttn at glug dot org is not me .
. (and has not been since 2007 or so) .
. ACCEPT NO SUBSTITUTES :-D .
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mic-paren.el 3.10 available
[not found] ` <mailman.5631.1343276384.855.help-gnu-emacs@gnu.org>
@ 2012-07-26 15:22 ` rfflrccrd
2012-07-26 15:38 ` rfflrccrd
[not found] ` <mailman.5668.1343316187.855.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 7+ messages in thread
From: rfflrccrd @ 2012-07-26 15:22 UTC (permalink / raw)
To: gnu.emacs.help; +Cc: help-gnu-emacs
On 07/26/2012 05:19 AM, Thien-Thi Nguyen wrote:> [NB: CC updated; we use the "sources" list to post/announce source code.]
>
> () Wed, 25 Jul 2012 14:54:57 -0700 (PDT)
>
> As I use Viper, a Vim-emulation mode, I looked into the customization
> group mic-paren-matching, hoping to find a way to emulate the way Vim
> uses to highlight parentheses. I found nothing. Do you confirm it
> is so?
>
> No, but that's not saying much -- i don't use Vim. FWIW, my mic-paren
> usage is very simple:
>
> http://www.gnuvola.org/software/personal-elisp/dist/lisp/low-stress/turn-on-mic-paren.el
>
> Basically, since Vim uses both a bar cursor and a block cursor,
> depending on context it highilights sometimes the parenthesis before
> the cursor and sometimes the one after the cursor.
>
> Could you please give an example or point to one on the net?
>
Thank you for your prompt reply.
I thought that firing up Vim and checking out its behaviour first hand would have been worth a hundred words, but asking an Emacs user to use Vim is rude, isn't it? ;-)
Jokes apart, I would have liked to record and link a explanatory video, but I wasn't able to install any desktop recorder on my PC. I'll have to rely on words.
Vim matches brackets in two ways, depending on whether you are typing text or moving around, as typing text and moving around are two different modes in Vim.
When you are moving around, Vim matches the bracket after point. This behaviour is crucial because, while moving around, you can't go beyond the last character on the line: if such character were a bracket, you would not be able to match it.
When you are typing text, Vim matches:
- the bracket after point, if there is one;
- otherwise the bracket before point, if there is one.
Also, Vim always highlights both brackets.
Try it with this snippet (trailing whitespace is intentional):
( (()) )
[ [[]] ]
Vim also instantly highlights all mismatched closing parentheses, while ignoring square brackets and curly brackets, at least while editing Lisp code - which is the only code I edit in Vim - but I think that such behaviour is beyond the goals of mic-paren anyway.
I've noticed that mic-paren ignores curly brackets. This is intentional, I suppose, as mic-paren targets Lisp code, but if it were able to match curly brackets as well, then it would be useful in other programming modes.
Have a nice day.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mic-paren.el 3.10 available
[not found] ` <mailman.5631.1343276384.855.help-gnu-emacs@gnu.org>
2012-07-26 15:22 ` rfflrccrd
@ 2012-07-26 15:38 ` rfflrccrd
[not found] ` <mailman.5668.1343316187.855.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 7+ messages in thread
From: rfflrccrd @ 2012-07-26 15:38 UTC (permalink / raw)
To: gnu.emacs.help; +Cc: help-gnu-emacs
I've also noticed that mic-paren wrongly matches closing parentheses in comment with opening parentheses in code, while still correcly matching closing parentheses in code.
Tested on GNU Emacs 24.1:
- emacs -Q
- (load "mic-paren.el")
- M-x paren-activate
- test snippet:
( ; )
)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mic-paren.el 3.10 available
[not found] ` <mailman.5668.1343316187.855.help-gnu-emacs@gnu.org>
@ 2012-07-26 16:34 ` Raffaele Ricciardi
2012-07-26 16:34 ` Raffaele Ricciardi
2012-07-26 16:35 ` Raffaele Ricciardi
2 siblings, 0 replies; 7+ messages in thread
From: Raffaele Ricciardi @ 2012-07-26 16:34 UTC (permalink / raw)
To: help-gnu-emacs
I've also noticed that mic-paren matches closing parentheses in comments
with opening parentheses in code, while still matching the correct
closing parentheses in code.
Tested on GNU Emacs 24.1:
- emacs -Q
- (load "mic-paren.el")
- M-x paren-activate
- test snippet:
( ; )
)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mic-paren.el 3.10 available
[not found] ` <mailman.5668.1343316187.855.help-gnu-emacs@gnu.org>
2012-07-26 16:34 ` Raffaele Ricciardi
@ 2012-07-26 16:34 ` Raffaele Ricciardi
2012-07-26 16:35 ` Raffaele Ricciardi
2 siblings, 0 replies; 7+ messages in thread
From: Raffaele Ricciardi @ 2012-07-26 16:34 UTC (permalink / raw)
To: help-gnu-emacs
I've also noticed that mic-paren matches closing parentheses in comments
with opening parentheses in code, while still matching the correct
closing parentheses in code.
Tested on GNU Emacs 24.1:
- emacs -Q
- (load "mic-paren.el")
- M-x paren-activate
- test snippet:
( ; )
)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mic-paren.el 3.10 available
[not found] ` <mailman.5668.1343316187.855.help-gnu-emacs@gnu.org>
2012-07-26 16:34 ` Raffaele Ricciardi
2012-07-26 16:34 ` Raffaele Ricciardi
@ 2012-07-26 16:35 ` Raffaele Ricciardi
2 siblings, 0 replies; 7+ messages in thread
From: Raffaele Ricciardi @ 2012-07-26 16:35 UTC (permalink / raw)
To: help-gnu-emacs
I've also noticed that mic-paren matches closing parentheses in comments
with opening parentheses in code, while still matching the correct
closing parentheses in code.
Tested on GNU Emacs 24.1:
- emacs -Q
- (load "mic-paren.el")
- M-x paren-activate
- test snippet:
( ; )
)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mic-paren.el 3.10 available
[not found] ` <m238xov1ah.fsf@gmail.com>
@ 2013-02-21 6:31 ` Thien-Thi Nguyen
0 siblings, 0 replies; 7+ messages in thread
From: Thien-Thi Nguyen @ 2013-02-21 6:31 UTC (permalink / raw)
To: Leo Liu; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]
() Leo Liu <sdl.web@gmail.com>
() Sat, 26 Jan 2013 15:41:42 +0800
On 2013-01-24 17:01 +0800, Leo Liu wrote:
> Seems working from a user's perspective. Would be nice to have
> Stefan's input.
In js-mode with the following contents:
{
// )
}
Move point to be after ) and you can observe { highlighted. So it
seems it needs to check if in a comment.
I see this, too (also in other modes). It indicates a long-standing
weakness in the mic-paren.el design, only tangentially related to the
current issue. (However, i'm glad you brought it up anyway; maybe i can
work up a solution before the next release.)
[cc redirected]
--
Thien-Thi Nguyen ..................................... GPG key: 4C807502
. NB: ttn at glug dot org is not me .
. (and has not been since 2007 or so) .
. ACCEPT NO SUBSTITUTES .
........... please send technical questions to mailing lists ...........
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-02-21 6:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <87d33vc0cq.fsf@zigzag.favinet>
[not found] ` <m2k3reyhl1.fsf@gmail.com>
[not found] ` <87wqvesrq5.fsf@zigzag.favinet>
[not found] ` <m2k3rcmuci.fsf@gmail.com>
[not found] ` <87bocosf6d.fsf@zigzag.favinet>
[not found] ` <m2d2x4mdct.fsf@gmail.com>
[not found] ` <jwv1udjdfqc.fsf-monnier+emacs@gnu.org>
[not found] ` <m1y5frahyj.fsf@gmail.com>
[not found] ` <jwvfw1zbte6.fsf-monnier+emacs@gnu.org>
[not found] ` <87obgipuhu.fsf@zigzag.favinet>
[not found] ` <m28v7j5503.fsf@gmail.com>
[not found] ` <m238xov1ah.fsf@gmail.com>
2013-02-21 6:31 ` mic-paren.el 3.10 available Thien-Thi Nguyen
[not found] <mailman.4875.1342444601.855.gnu-emacs-sources@gnu.org>
[not found] ` <2b42c9ad-dbde-41ce-90c5-caef9568a18e@googlegroups.com>
2012-07-26 4:19 ` Thien-Thi Nguyen
[not found] ` <mailman.5631.1343276384.855.help-gnu-emacs@gnu.org>
2012-07-26 15:22 ` rfflrccrd
2012-07-26 15:38 ` rfflrccrd
[not found] ` <mailman.5668.1343316187.855.help-gnu-emacs@gnu.org>
2012-07-26 16:34 ` Raffaele Ricciardi
2012-07-26 16:34 ` Raffaele Ricciardi
2012-07-26 16:35 ` Raffaele Ricciardi
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).