unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Highlighting parentheses
@ 2009-02-02 16:43 Richard M Stallman
  2009-02-02 17:59 ` Óscar Fuentes
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Richard M Stallman @ 2009-02-02 16:43 UTC (permalink / raw)
  To: emacs-devel

http://nschum.de/src/emacs/highlight-parentheses/highlight-parentheses-0.9.1.el

That program seems to implement the feature that was suggested,
so maybe it would be a good thing to add to Emacs.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Highlighting parentheses
  2009-02-02 16:43 Highlighting parentheses Richard M Stallman
@ 2009-02-02 17:59 ` Óscar Fuentes
  2009-02-02 19:03   ` Stefan Monnier
  2009-02-02 18:06 ` Drew Adams
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Óscar Fuentes @ 2009-02-02 17:59 UTC (permalink / raw)
  To: emacs-devel

Richard M Stallman <rms@gnu.org> writes:

> http://nschum.de/src/emacs/highlight-parentheses/highlight-parentheses-0.9.1.el
>
> That program seems to implement the feature that was suggested,
> so maybe it would be a good thing to add to Emacs.

I like the feature but there is one caveat: parentheses are narrow and
colorizing is not the most effective way of making them highly
visible. I was experimenting a bit and setting on the bold attribute for
the colorized parentheses makes things a bit better, imho, although a
better solution would be desirable.

-- 
Oscar





^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: Highlighting parentheses
  2009-02-02 16:43 Highlighting parentheses Richard M Stallman
  2009-02-02 17:59 ` Óscar Fuentes
@ 2009-02-02 18:06 ` Drew Adams
  2009-02-02 19:25 ` Will Farrington
  2009-02-02 19:54 ` Dan Nicolaescu
  3 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2009-02-02 18:06 UTC (permalink / raw)
  To: rms, emacs-devel

>
http://nschum.de/src/emacs/highlight-parentheses/highlight-parentheses-0.9.1.el
> 
> That program seems to implement the feature that was suggested,
> so maybe it would be a good thing to add to Emacs.

Some minor suggestions for the defcustom of `hl-paren-colors':

* It would be better to use faces, not just (foreground) colors.

* The default value should provide for both light and dark backgrounds.

* The default value should have more colors (faces). Five or six would be good.

* The default colors should be brighter (very different from black). They should
stand out from both the default background (white) and the default foreground
(black).

* Adjacent default colors in the list should be of very different hue, not
almost indistinguishable.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Highlighting parentheses
  2009-02-02 17:59 ` Óscar Fuentes
@ 2009-02-02 19:03   ` Stefan Monnier
  2009-02-02 21:13     ` Óscar Fuentes
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2009-02-02 19:03 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: emacs-devel

> I like the feature but there is one caveat: parentheses are narrow and
> colorizing is not the most effective way of making them
> highly visible.

Which makes me wonder: in which context is this coloring
useful/desirable?  In Lisp at least, we usually don't want to make
parentheses highly visible: learning Lisp is (to a large extent)
teaching your eyes to ignore parentheses.


        Stefan




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Highlighting parentheses
  2009-02-02 16:43 Highlighting parentheses Richard M Stallman
  2009-02-02 17:59 ` Óscar Fuentes
  2009-02-02 18:06 ` Drew Adams
@ 2009-02-02 19:25 ` Will Farrington
  2009-02-03  9:58   ` Richard M Stallman
  2009-02-02 19:54 ` Dan Nicolaescu
  3 siblings, 1 reply; 9+ messages in thread
From: Will Farrington @ 2009-02-02 19:25 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]


On Feb 2, 2009, at 11:43 AM, Richard M Stallman wrote:

> http://nschum.de/src/emacs/highlight-parentheses/highlight-parentheses-0.9.1.el
>
> That program seems to implement the feature that was suggested,
> so maybe it would be a good thing to add to Emacs.


Would it perhaps be better to just add this feature to paren.el rather  
than including two packages which do fairly similar things?

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2427 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Highlighting parentheses
  2009-02-02 16:43 Highlighting parentheses Richard M Stallman
                   ` (2 preceding siblings ...)
  2009-02-02 19:25 ` Will Farrington
@ 2009-02-02 19:54 ` Dan Nicolaescu
  2009-02-02 19:57   ` Will Farrington
  3 siblings, 1 reply; 9+ messages in thread
From: Dan Nicolaescu @ 2009-02-02 19:54 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

Richard M Stallman <rms@gnu.org> writes:

  > http://nschum.de/src/emacs/highlight-parentheses/highlight-parentheses-0.9.1.el
  > 
  > That program seems to implement the feature that was suggested,
  > so maybe it would be a good thing to add to Emacs.

M-x show-paren-mode is not as fancy, but it highlights parentheses well
enough, IMHO we should have it turned on by default.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Highlighting parentheses
  2009-02-02 19:54 ` Dan Nicolaescu
@ 2009-02-02 19:57   ` Will Farrington
  0 siblings, 0 replies; 9+ messages in thread
From: Will Farrington @ 2009-02-02 19:57 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: rms, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 896 bytes --]


On Feb 2, 2009, at 2:54 PM, Dan Nicolaescu wrote:

> Richard M Stallman <rms@gnu.org> writes:
>
>> http://nschum.de/src/emacs/highlight-parentheses/highlight-parentheses-0.9.1.el
>>
>> That program seems to implement the feature that was suggested,
>> so maybe it would be a good thing to add to Emacs.
>
> M-x show-paren-mode is not as fancy, but it highlights parentheses  
> well
> enough, IMHO we should have it turned on by default.

Unless I am mistaken, M-x show-paren-mode only highlights the sexp at  
hand when the mark is after a paren (it highlights the preceding  
sexp), whereas the highlight-parentheses package above currently shows  
the user all the various matching parentheses for the s expressions  
around where the mark is (whether or not it is next to a paren).

I would still support adding this functionality to M-x show-paren-mode  
though, and enabling it by default.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2427 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Highlighting parentheses
  2009-02-02 19:03   ` Stefan Monnier
@ 2009-02-02 21:13     ` Óscar Fuentes
  0 siblings, 0 replies; 9+ messages in thread
From: Óscar Fuentes @ 2009-02-02 21:13 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I like the feature but there is one caveat: parentheses are narrow and
>> colorizing is not the most effective way of making them
>> highly visible.
>
> Which makes me wonder: in which context is this coloring
> useful/desirable?

On some contexts where people use show-paren-mode. It is better because
you don't need to put the cursor on a parentheses to see the matching
delimiter.

> In Lisp at least, we usually don't want to make
> parentheses highly visible: learning Lisp is (to a large extent)
> teaching your eyes to ignore parentheses.

We need to see *some* parentheses: indentation level is not enough when
you put a non-trivial expression on a single line (which is a similar
scenario as for other languages, like C).

Finally, highlighting matching parentheses is something that adds to
indentation level when perceiving code structure.

IMO, this is not a killer feature, just nice.

-- 
Oscar





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Highlighting parentheses
  2009-02-02 19:25 ` Will Farrington
@ 2009-02-03  9:58   ` Richard M Stallman
  0 siblings, 0 replies; 9+ messages in thread
From: Richard M Stallman @ 2009-02-03  9:58 UTC (permalink / raw)
  To: Will Farrington; +Cc: emacs-devel

    > That program seems to implement the feature that was suggested,
    > so maybe it would be a good thing to add to Emacs.


    Would it perhaps be better to just add this feature to paren.el rather  
    than including two packages which do fairly similar things?

That might be a good idea.




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-02-03  9:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-02 16:43 Highlighting parentheses Richard M Stallman
2009-02-02 17:59 ` Óscar Fuentes
2009-02-02 19:03   ` Stefan Monnier
2009-02-02 21:13     ` Óscar Fuentes
2009-02-02 18:06 ` Drew Adams
2009-02-02 19:25 ` Will Farrington
2009-02-03  9:58   ` Richard M Stallman
2009-02-02 19:54 ` Dan Nicolaescu
2009-02-02 19:57   ` Will Farrington

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).