From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Siyuan Chen Newsgroups: gmane.emacs.devel Subject: Re: A possible CUA-mode bug about `cua-prefix-override-inhibit-delay` and its workaround Date: Tue, 28 May 2024 01:38:52 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000046bb14061972fea2" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15049"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Kangas , eliz@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 27 19:39:41 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sBeJv-0003eR-J0 for ged-emacs-devel@m.gmane-mx.org; Mon, 27 May 2024 19:39:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBeJW-0006Qz-34; Mon, 27 May 2024 13:39:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBeJR-0006PA-FH for emacs-devel@gnu.org; Mon, 27 May 2024 13:39:11 -0400 Original-Received: from mail-yb1-xb32.google.com ([2607:f8b0:4864:20::b32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sBeJO-0008DI-Ig; Mon, 27 May 2024 13:39:08 -0400 Original-Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-df4f05e5901so14327276.0; Mon, 27 May 2024 10:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716831543; x=1717436343; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pKOBE/CM27g26a0J159yXdK1FDAyuYftqGtJt6htYyc=; b=hGp8By1dAhXfF45VtjHfK6beB1pT/lbOTj/PfcuIY2Zp9MyHa6XbVriC66J72QQ1Hf ZnC9Q39JxU/AvfA2FaCGE7g7vuqlJIkHEc/ln2WUXgSWWegue4B5UsT6NKZDqAeHegC5 ApUP+hluHOsu00zDeykfR0OIOPtaeVYJRwRletDXebvw7S64bQwybxwB6SxyC99mIBx1 wfdwgwGgIa8Rv9m+DY81WUFKhTW4Uxvco6XK49P+QmB4umxwH2jdothjRp7vu1SEXGII 7U5sXKJBZFi9OMnBVKBIoKchp9DQMrEKLUYnlLKaMWPAQwS/gHEMuV2HvFAc/sMWsyf4 owgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716831543; x=1717436343; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pKOBE/CM27g26a0J159yXdK1FDAyuYftqGtJt6htYyc=; b=vFEIi7n9XdMZBFso2gxMbXct+Vs9GR20q7ciRxG8e5JsvnX4mCtlcJrCLv8SI63Cg/ vuMcDS+Tl2sZVZxbPxzbG+il8+u6fpHfjZyjPmAW2/i9iJYi+s/jZNU8QJAXFXFAdcr6 EiVw/+GMrkC50kN0va512ugJcbuGUO8LqRETpaPRmnR41jRW4cqZdhTaEWJmjnZ0TShY mpOg6IxQOIigPvxhr/19z6/aCnI9FWVEMe0/RNyrYMqlnDAnzj45veRJqTJpqXhx63TS dq506J3fTaEOtDkE7O4iB69ASbFbXbbc36G8+b2/Wsg4HssJDd57kaqRsTEmuG9wnFIc zIzA== X-Forwarded-Encrypted: i=1; AJvYcCUawlKG9YA9/xiJYXw6nut2m4xJaiOHvLd6My9E3GeBVmyQWfleqVSk/l3RxtF2wxirjXbHd4B2m2slCTI= X-Gm-Message-State: AOJu0YzZqSuTiGT0Jr29KS9+Q019g6t98HIOutZ0bhLicJAFfwlrxfsX 70ed9p+VosY8Kw3zAxMMzKB1jKmuqis+yJGVUGx5f+4dqW73KodnA655+9ujc7XVeLQPB8b8oPZ T9YRpFF+BDaRSxFumgLH4MCWtsU6k8z6kdys= X-Google-Smtp-Source: AGHT+IHm7CpBP3/kZHWRHSjOZ4EBdj5Yt2OeFMdor2+QpzzCzRIS1L73Ayyw24LU67fVhX+eIYyr4m5rbsDp9jGFuMw= X-Received: by 2002:a25:918c:0:b0:df4:d6ca:fece with SMTP id 3f1490d57ef6-df772169aa0mr9232785276.3.1716831543275; Mon, 27 May 2024 10:39:03 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b32; envelope-from=chansey97@gmail.com; helo=mail-yb1-xb32.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:319619 Archived-At: --00000000000046bb14061972fea2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable OK. I have received the mail bug#71230. On Tue, May 28, 2024 at 1:33=E2=80=AFAM Siyuan Chen w= rote: > > but please send this patch to the bug-gnu-emacs list instead so > > that we don't lose track of it. > > I have sent the patch to bug-gnu-emacs@gnu.org but I can't receive any > response which should be something like bug#xxx. I have subscribed to > bug-gnu-emacs and can receive other people's bug mail. > > To make tracking easier (e.g. other people may use archive to search in > the future), I repeated the email title: "[PATCH] Fix C-x C-c do not work > in CUA-mode when cua-prefix-override-handler is ni" and added the patch > attachment here. This patch > (0001-Fix-the-issue-when-cua-prefix-override-handler-is-ni.patch) works i= n > Emacs 29.3. > > Note that the patch I provided previously on May 24, 2024 only works in > Emacs 28.2 (newer cua-base.el has some changes). Also, there is a typo in > the previous patch that I forgot to call `call-interactively` to ` > kill-region` and `copy-region-as-kill`. > > So if someone uses Emacs 29.3 or newer build, please use this patch I > just attached or the patch I sent to bug-gnu-emacs in which the typo has > been also fixed. > > Best regards, > Siyuan Chen > > On Mon, May 27, 2024 at 6:20=E2=80=AFPM Siyuan Chen = wrote: > >> Dear Eli, >> >> > I think this is a documentation issue. >> > >> > When cua-prefix-override-inhibit-delay is nil, the prefix is never >> > overridden, i.e. "C-x" will never delete the marked text. >> >> The real problem is that if we have to set >> `cua-prefix-override-inhibit-delay` non-nil, or setting >> `cua-prefix-override-inhibit-delay` nil means "C-x" never delete the mar= ked >> text, then the CUA-mode will not be able to support fast copy/cut & past= e >> as I said in the original post. >> >> > I added Kim to the discussion, in the hope that he could shed some >> light on the intended behavior. >> >> That's great. >> >> Dear Stefan, >> >> > but please send this patch to the bug-gnu-emacs list instead so >> that we don't lose track of it. >> >> OK. I will send it later. >> >> >> On Sun, May 26, 2024 at 1:35=E2=80=AFAM Stefan Kangas >> wrote: >> >>> Siyuan Chen writes: >>> >>> > Use the following patch instead >>> >>> Thanks, but please send this patch to the bug-gnu-emacs list instead so >>> that we don't lose track of it. >>> >>> It would be best if you could send your patch as an attachment, as the >>> result of running the command `git format-patch -1`. >>> >> --00000000000046bb14061972fea2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
OK. I have received the mail bug#71230.

On Tue, May 28, 2024 at 1:33=E2=80=AFAM Siyuan Chen <chansey97@gmail.com> wrote:
>=20 but please send this patch to the bug-gnu-emacs list instead so
>=20 that we don't lose track of it.

I = have sent the patch to bug-gnu-emacs@gnu.org but I can't receive any response which should be something like bug#xx= x. I have subscribed to bug-gnu-emacs and can receive other people's bu= g mail.=C2=A0

To make tracking easier (e.g. other people may use archive to search in the futur= e), I repeated the email title: "[PATCH] Fix C-x = C-c do not work in CUA-mode when cua-prefix-override-handler is ni" an= d added the patch attachment here. This patch (0001-Fix-the-issue-when-cua-= prefix-override-handler-is-ni.patch) works in Emacs 29.3.

Note that the patch I provided previo= usly on May 24, 2024 only works in Emacs 28.2 (newer c= ua-base.el has some changes). Also, there is = a typo in the previous patch that I forgot to call `ca= ll-interactively` to `ki= ll-region` and `copy-reg= ion-as-kill`.

So if someone uses = Emacs 29.3 or newer buil= d, please use this patch I just attached or the patch I sent to bug-gnu-emacs in wh= ich the typo has been also fixed.

Best regards,
Siyuan Chen

= On Mon, May 27, 2024 at 6:20=E2=80=AFPM Siyuan Chen <chansey97@gmail.com> wrote:
<= div>Dear Eli,

>=20 I think this is a documentation issue.
>
&g= t;=20 When cua-prefix-override-inhibit-delay is nil, the prefix is never
> = overridden, i.e. "C-x" will never delete the marked text.

The real problem is that if we have to set `cua-pref= ix-override-inhibit-delay` non-nil, or setting `cua-prefix-override-inhibit= -delay` nil means "C-x" never delete the marked text, then the CU= A-mode will not be able to support fast copy/cut & paste as I said in t= he original post.

>=20 I added Kim to the discussion, in the hope that he could shed some
light on the intended behavior.

That's gr= eat.

Dear Stefan,

>=20 but please send this patch to the bug-gnu-emacs list instead so
that we don't lose track of it.

OK. I will sen= d it later.


On Sun, May 26, 2024 at 1:35=E2=80=AFAM Stefan K= angas <stefa= nkangas@gmail.com> wrote:
Siyuan Chen <chansey97@gmail.com> writes:

> Use the following patch instead

Thanks, but please send this patch to the bug-gnu-emacs list instead so
that we don't lose track of it.

It would be best if you could send your patch as an attachment, as the
result of running the command `git format-patch -1`.
--00000000000046bb14061972fea2--