unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: yynyygy@gmail.com, 16822@debbugs.gnu.org
Subject: bug#16822: 24.3.50; show-paren-mode adds confusion to active region
Date: Thu, 15 Jul 2021 09:53:08 +0300	[thread overview]
Message-ID: <83eec06pbf.fsf@gnu.org> (raw)
In-Reply-To: <87tukwqija.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu,  15 Jul 2021 06:59:21 +0200)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Thu, 15 Jul 2021 06:59:21 +0200
> Cc: 16822@debbugs.gnu.org
> 
> yynyygy@gmail.com writes:
> 
> > When show-paren-mode is on, it adds confusion to the active
> > region. Suppose I have some text which is (hello),
> >
> > 1. I set the region to (hello and place the cursor on the left paren.
> > 2. I set the region to (hello) and place the cursor on the left paren.
> >
> > Note that in Case 1, the right paren is not part of the region while in
> > Case 2 it is. In the two cases above, I get exactly the same color on
> > the screen, then how can I distinguish between these two different
> > cases?
> 
> This is still the case in Emacs 28.  Whether I put the mark after the
> "o" or after the ")", and then go to the start of the line (in
> *scratch*), I get this displayed:
> [...]
> Perhaps the solution here is just to introduce a new face for parens
> that are part of the region?  Any opinions?

I admit that I don't understand the problem.  Why should the display
be different in these two cases?  It sounds like the (unspelled-out)
assumption is that showing the region is more important than showing
the (mis)matched parens?  But if this is the assumption, then I don't
think I agree: show-paren-mode is for _temporary_ display of the
parens, so if it temporarily obscures the region, it's perfectly okay.

Adding a new face would bump into the problem of making sure the
colors of this new face are always visible and distinguishable from
the other two colors.  I don't see how that could work reliably.





  reply	other threads:[~2021-07-15  6:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-20  7:40 bug#16822: 24.3.50; show-paren-mode adds confusion to active region yynyygy
2014-02-20 17:44 ` Drew Adams
2014-02-20 21:43   ` Stefan Monnier
2021-07-15  4:54 ` Lars Ingebrigtsen
2021-07-15  4:59 ` Lars Ingebrigtsen
2021-07-15  6:53   ` Eli Zaretskii [this message]
2021-07-15  8:45     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83eec06pbf.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=16822@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=yynyygy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).