unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#349: show-paren-mode overlay extending onto new text
@ 2008-06-02  1:46 ` Kevin Ryde
  2008-06-02  6:23   ` martin rudalics
  2008-06-10 16:25   ` bug#349: marked as done (show-paren-mode overlay extending onto new text) Emacs bug Tracking System
  0 siblings, 2 replies; 5+ messages in thread
From: Kevin Ryde @ 2008-06-02  1:46 UTC (permalink / raw)
  To: bug-gnu-emacs

In show-paren-mode, when point is after a closing paren so it and the
opener are highlighted, sometimes newly inserted text is covered with
the paren colour too, for a little while.

This doesn't happen all the time, but I've noticed in particular in
program output from M-x compile.  So from "emacs -Q",

    M-x show-paren-mode
    M-x compile
    echo -n '(hello)'; sleep 6; yes
    C-x o    # to *compilation* buffer
    M->      # go to end of buffer

    => the (hello) parens are highlighted

    => but then the output of "yes" is highlighted too

The "sleep 6" gives you a chance to switch to the compilation buffer,
the "echo -n" is so there's no trailing newline in the buffer yet.

An "echo" like this is of course a contrivance, but I've struck the
effect in real program output when switching to the buffer at a random
point or when a close paren is a genuine last bit of its output so far.

I guess for most insertions the timer or whatever gets a chance to reset
or hide the overlay, but for heavy running compile output maybe that
doesn't happen.  I wondered if the make-overlay in show-paren-function
might have the "rear-advance" arg nil, unless there's ever a time it
ought to extend.



In GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.9)
 of 2008-04-27 on raven, modified by Debian
configured using `configure  '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_AU
  locale-coding-system: iso-8859-1
  default-enable-multibyte-characters: t

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  gnus-undo-mode: t
  show-paren-mode: t
  encoded-kbd-mode: t
  file-name-shadow-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t







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

* bug#349: show-paren-mode overlay extending onto new text
  2008-06-02  1:46 ` bug#349: show-paren-mode overlay extending onto new text Kevin Ryde
@ 2008-06-02  6:23   ` martin rudalics
  2008-06-02 13:47     ` Stefan Monnier
  2008-06-03  1:00     ` Kevin Ryde
  2008-06-10 16:25   ` bug#349: marked as done (show-paren-mode overlay extending onto new text) Emacs bug Tracking System
  1 sibling, 2 replies; 5+ messages in thread
From: martin rudalics @ 2008-06-02  6:23 UTC (permalink / raw)
  To: Kevin Ryde, 349; +Cc: bug-gnu-emacs

 > I wondered if the make-overlay in show-paren-function
 > might have the "rear-advance" arg nil, unless there's ever a time it
 > ought to extend.
 >
 > In GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.9)
[...]
 >   show-paren-mode: t
[...]

Version 1.75 of paren.el has

		(setq show-paren-overlay-1 (make-overlay from to nil t)))

and

	      (setq show-paren-overlay (make-overlay from to nil t))))

hence both overlays seem to have "rear-advance" nil.








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

* bug#349: show-paren-mode overlay extending onto new text
  2008-06-02  6:23   ` martin rudalics
@ 2008-06-02 13:47     ` Stefan Monnier
  2008-06-03  1:00     ` Kevin Ryde
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2008-06-02 13:47 UTC (permalink / raw)
  To: martin rudalics; +Cc: 349, bug-gnu-emacs, Kevin Ryde

>> I wondered if the make-overlay in show-paren-function
>> might have the "rear-advance" arg nil, unless there's ever a time it
>> ought to extend.
>> 
>> In GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.9)
> [...]
>> show-paren-mode: t
> [...]

> Version 1.75 of paren.el has
> 		(setq show-paren-overlay-1 (make-overlay from to nil t)))
> and
> 	      (setq show-paren-overlay (make-overlay from to nil t))))
> hence both overlays seem to have "rear-advance" nil.

Indeed, the problem is that compile.el uses insert-before-markers.
So no amount of rear-advance will help.

I have been using a simple patch which adds a buffer-local variable
which I called `window-marker-insertion-type' (but I realize now it
should rather be `window-point-insertion-type'), so major modes can set
this variable if they want `window-point' to be "move after insertion".

This way, compile.el (and other similar packages) might not need to use
insert-before-markers.


        Stefan






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

* bug#349: show-paren-mode overlay extending onto new text
  2008-06-02  6:23   ` martin rudalics
  2008-06-02 13:47     ` Stefan Monnier
@ 2008-06-03  1:00     ` Kevin Ryde
  1 sibling, 0 replies; 5+ messages in thread
From: Kevin Ryde @ 2008-06-03  1:00 UTC (permalink / raw)
  To: martin rudalics; +Cc: 349, bug-gnu-emacs

martin rudalics <rudalics@gmx.at> writes:
>
> hence both overlays seem to have "rear-advance" nil.

Oops, yep, I got myself completely confused about nil, t, front and
rear!






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

* bug#349: marked as done (show-paren-mode overlay extending onto  new text)
  2008-06-02  1:46 ` bug#349: show-paren-mode overlay extending onto new text Kevin Ryde
  2008-06-02  6:23   ` martin rudalics
@ 2008-06-10 16:25   ` Emacs bug Tracking System
  1 sibling, 0 replies; 5+ messages in thread
From: Emacs bug Tracking System @ 2008-06-10 16:25 UTC (permalink / raw)
  To: Stefan Monnier

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


Your message dated Tue, 10 Jun 2008 12:20:19 -0400
with message-id <jwvskvltgb2.fsf-monnier+emacsbugreports@gnu.org>
and subject line Re: show-paren-mode overlay extending onto new text
has caused the Emacs bug report #349,
regarding show-paren-mode overlay extending onto new text
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
349: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=349
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 4787 bytes --]

From: Kevin Ryde <user42@zip.com.au>
To: bug-gnu-emacs@gnu.org
Subject: show-paren-mode overlay extending onto new text
Date: Mon, 02 Jun 2008 11:46:20 +1000
Message-ID: <87k5h8vcb7.fsf@blah.blah>

In show-paren-mode, when point is after a closing paren so it and the
opener are highlighted, sometimes newly inserted text is covered with
the paren colour too, for a little while.

This doesn't happen all the time, but I've noticed in particular in
program output from M-x compile.  So from "emacs -Q",

    M-x show-paren-mode
    M-x compile
    echo -n '(hello)'; sleep 6; yes
    C-x o    # to *compilation* buffer
    M->      # go to end of buffer

    => the (hello) parens are highlighted

    => but then the output of "yes" is highlighted too

The "sleep 6" gives you a chance to switch to the compilation buffer,
the "echo -n" is so there's no trailing newline in the buffer yet.

An "echo" like this is of course a contrivance, but I've struck the
effect in real program output when switching to the buffer at a random
point or when a close paren is a genuine last bit of its output so far.

I guess for most insertions the timer or whatever gets a chance to reset
or hide the overlay, but for heavy running compile output maybe that
doesn't happen.  I wondered if the make-overlay in show-paren-function
might have the "rear-advance" arg nil, unless there's ever a time it
ought to extend.



In GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.9)
 of 2008-04-27 on raven, modified by Debian
configured using `configure  '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_AU
  locale-coding-system: iso-8859-1
  default-enable-multibyte-characters: t

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  gnus-undo-mode: t
  show-paren-mode: t
  encoded-kbd-mode: t
  file-name-shadow-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t




[-- Attachment #3: Type: message/rfc822, Size: 1889 bytes --]

From: Stefan Monnier <monnier@iro.umontreal.ca>
To: 349-done@emacsbugs.donarmstrong.com
Subject: Re: show-paren-mode overlay extending onto new text
Date: Tue, 10 Jun 2008 12:20:19 -0400
Message-ID: <jwvskvltgb2.fsf-monnier+emacsbugreports@gnu.org>


I've installed a change which fixes this problem for `compile' buffers
as well as a few others (e.g. comint).  The underlying problem is still
present and currently unavoidable, so it may show up anywhere where
insert-before-markers is used, but the new window-point-insertion-type
should reduce the need for insert-before-markers.


        Stefan


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

end of thread, other threads:[~2008-06-10 16:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <jwvskvltgb2.fsf-monnier+emacsbugreports@gnu.org>
2008-06-02  1:46 ` bug#349: show-paren-mode overlay extending onto new text Kevin Ryde
2008-06-02  6:23   ` martin rudalics
2008-06-02 13:47     ` Stefan Monnier
2008-06-03  1:00     ` Kevin Ryde
2008-06-10 16:25   ` bug#349: marked as done (show-paren-mode overlay extending onto new text) Emacs bug Tracking System

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