From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: dick <dick.r.chiang@gmail.com>
Cc: 59875-done@debbugs.gnu.org
Subject: bug#59875: 30.0.50; [PATCH] fallout c73f99f
Date: Thu, 08 Dec 2022 09:58:08 +0800 [thread overview]
Message-ID: <87lenilkr3.fsf@yahoo.com> (raw)
In-Reply-To: <877cz3yf5q.fsf@dick> (dick's message of "Wed, 07 Dec 2022 00:08:17 -0500")
dick <dick.r.chiang@gmail.com> writes:
> src/xselect.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/src/xselect.c b/src/xselect.c
> index 121b17df1b0..78820cb3a7c 100644
> --- a/src/xselect.c
> +++ b/src/xselect.c
> @@ -624,6 +624,13 @@ x_pop_current_selection_request (void)
> xfree (tem);
> }
>
> +static bool
> +x_selection_for_multiple (struct selection_data *data)
> +{
> + return (Atom *) data->data
> + == &selection_request_stack->conversion_fail_tag;
> +}
> +
> /* Used as an unwind-protect clause so that, if a selection-converter signals
> an error, we tell the requestor that we were unable to do what they wanted
> before we throw to top-level or go into the debugger or whatever. */
> @@ -639,7 +646,7 @@ x_selection_request_lisp_error (void)
> for (cs = frame->converted_selections; cs; cs = next)
> {
> next = cs->next;
> - if (cs->data)
> + if (cs->data && ! x_selection_for_multiple (cs))
> xfree (cs->data);
> xfree (cs);
> }
> @@ -839,8 +846,7 @@ x_start_selection_transfer (struct x_display_info *dpyinfo, Window requestor,
> secs = timeout / 1000;
> nsecs = (timeout % 1000) * 1000000;
>
> - if ((Atom *) data->data
> - == &selection_request_stack->conversion_fail_tag)
> + if (x_selection_for_multiple (data))
> return;
>
> transfer = xzalloc (sizeof *transfer);
No. I will install a better fix and am closing this bug.
Don't you think `x_selection_for_multiple' is a misleading name? Did you
try to understand the code there?
In addition, if you do not write even a real commit message for a patch
you attach, or explain what it fixes, you are simply wasting everyone
else's time. If you see a bug, it's better to just report it rather
than submitting a patch like this.
prev parent reply other threads:[~2022-12-08 1:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 5:08 bug#59875: 30.0.50; [PATCH] fallout c73f99f dick
2022-12-08 0:51 ` Stefan Kangas
2022-12-08 1:58 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
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=87lenilkr3.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=59875-done@debbugs.gnu.org \
--cc=dick.r.chiang@gmail.com \
--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 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).