From: martin rudalics <rudalics@gmx.at>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 10805@debbugs.gnu.org
Subject: bug#10805: 24.0.93; edebug-trace t may cause stuff being inserted into current buffer
Date: Wed, 15 Feb 2012 10:56:29 +0100 [thread overview]
Message-ID: <4F3B814D.3060607@gmx.at> (raw)
In-Reply-To: <87vcn97z07.fsf@web.de>
> Maybe. But please keep in mind that `edebug-trace-display' is about
> _displaying_ a buffer. We don't want the user to edit the trace buffer,
> so calling `select-window' is in fact not necessary in this case. The
> former window is instantly re-selected by `edebug-trace-display'.
IIUC edebug conflates the concepts of displaying and popping to buffers.
Take `edebug-bounce-point':
(save-excursion
;; If the buffer's currently displayed, avoid set-window-configuration.
---> Since `save-window-excursion' calls `set-window-configuration'
we don't "avoid" anything here.
(save-window-excursion
(edebug-pop-to-buffer edebug-outside-buffer)
---> Here the `select-window' problem might strike as well. But
why should the window be selected? To make `goto-char',
`current-buffer' and `point' work?
(goto-char edebug-outside-point)
(message "Current buffer: %s Point: %s Mark: %s"
(current-buffer) (point)
(if (marker-buffer (edebug-mark-marker))
(marker-position (edebug-mark-marker)) "<not set>"))
(edebug-sit-for arg)
---> Popping back to the original window as the _last_ action of
a `save-window-excursion' doesn't make any sense.
(edebug-pop-to-buffer edebug-buffer (car edebug-window-data)))))
This may select a window up to three times for the apparent single
purpose to display the context of a position in some buffer.
> Please also note (another issue, but related) that if the trace buffer
> is already visible in another (visible) frame, a new window pops up in
> the current frame nevertheless, which is kind of annoying if source
> files are spread over multiple frames.
Probably because `edebug-get-buffer-window' (aliased to
`get-buffer-window') is called with a nil ALL-FRAMES argument. Try to
use another argument (you probably have to raise frames to make this
useful).
martin
next prev parent reply other threads:[~2012-02-15 9:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-13 22:29 bug#10805: 24.0.93; edebug-trace t may cause stuff being inserted into current buffer Michael Heerdegen
2012-02-14 10:53 ` martin rudalics
2012-02-14 23:53 ` Michael Heerdegen
2012-02-15 9:56 ` martin rudalics [this message]
2012-02-17 2:18 ` Michael Heerdegen
2012-02-17 9:58 ` martin rudalics
2012-02-17 15:12 ` Stefan Monnier
2012-02-18 17:04 ` martin rudalics
2012-10-04 13:17 ` martin rudalics
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F3B814D.3060607@gmx.at \
--to=rudalics@gmx.at \
--cc=10805@debbugs.gnu.org \
--cc=michael_heerdegen@web.de \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.