From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 51700@debbugs.gnu.org
Subject: bug#51700: 29.0.50; [PATCH]: Fix earlier changes in xwidget.el
Date: Tue, 09 Nov 2021 13:36:49 +0800 [thread overview]
Message-ID: <87k0hhnb4e.fsf@yahoo.com> (raw)
In-Reply-To: 87k0hhnb4e.fsf.ref@yahoo.com
[-- Attachment #1: Type: text/plain, Size: 232 bytes --]
The test suite I was working on have already proved their utility, nice.
Unfortunately I haven't been able to get some of the tests to work
reliably, and as such don't wish to publish them right now. Please bear
with me, thanks.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Make-xwidget-tests-pass-again.patch --]
[-- Type: text/x-patch, Size: 2615 bytes --]
From 40ea895cbf15849757abc445791b891112064eda Mon Sep 17 00:00:00 2001
From: Po Lu <luangruo@yahoo.com>
Date: Tue, 9 Nov 2021 13:33:49 +0800
Subject: [PATCH] Make xwidget-tests pass again
* lisp/xwidget.el (xwidget-webkit-buffer-name-prefix): Remove extra
space.
(xwidget-webkit-callback): Add trailing "*" to buffer name.
(xwidget-webkit-new-session, xwidget-webkit-import-widget): Always use
existing buffer name.
---
lisp/xwidget.el | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/lisp/xwidget.el b/lisp/xwidget.el
index 91d02e8fce..c2b3826733 100644
--- a/lisp/xwidget.el
+++ b/lisp/xwidget.el
@@ -95,7 +95,7 @@ xwidget-webkit
:group 'web
:prefix "xwidget-webkit-")
-(defcustom xwidget-webkit-buffer-name-prefix "* xwidget-webkit: "
+(defcustom xwidget-webkit-buffer-name-prefix "*xwidget-webkit: "
"Buffer name prefix used by `xwidget-webkit' buffers."
:type 'string
:version "29.1")
@@ -370,7 +370,7 @@ xwidget-webkit-callback
;; selected window can be the mini-buffer window
;; unwantedly.
(rename-buffer (concat xwidget-webkit-buffer-name-prefix
- title)
+ title "*")
t)))))
((eq xwidget-event-type 'decide-policy)
(let ((strarg (nth 3 last-input-event)))
@@ -705,8 +705,7 @@ xwidget-webkit-new-session
;; will be renamed by `xwidget-webkit-callback' in the
;; future. This approach can limit flicker of buffer-name in
;; mode-line.
- (concat xwidget-webkit-buffer-name-prefix
- (generate-new-buffer-name (buffer-name))))
+ (generate-new-buffer-name (buffer-name)))
(callback (or callback #'xwidget-webkit-callback))
(current-session (xwidget-webkit-current-session))
xw)
@@ -735,11 +734,7 @@ xwidget-webkit-import-widget
;; will be renamed by `xwidget-webkit-callback' in the
;; future. This approach can limit flicker of buffer-name in
;; mode-line.
- (if (string-prefix-p xwidget-webkit-buffer-name-prefix
- (buffer-name))
- (generate-new-buffer-name (buffer-name))
- (concat xwidget-webkit-buffer-name-prefix
- (generate-new-buffer-name (buffer-name)))))
+ (generate-new-buffer-name (buffer-name)))
(callback #'xwidget-webkit-callback)
(buffer (get-buffer-create bufname)))
(with-current-buffer buffer
--
2.31.1
next parent reply other threads:[~2021-11-09 5:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87k0hhnb4e.fsf.ref@yahoo.com>
2021-11-09 5:36 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-11-09 5:49 ` bug#51700: 29.0.50; [PATCH]: Fix earlier changes in xwidget.el 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0hhnb4e.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=51700@debbugs.gnu.org \
--cc=luangruo@yahoo.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 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.