From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Allen Li Newsgroups: gmane.emacs.bugs Subject: bug#28008: 25.2; Resume kmacro definition errors C-u C-u Date: Sun, 13 Aug 2017 14:13:07 -0700 Message-ID: References: <87d1867hpd.fsf@calancha-pc> <87d182p97t.fsf@calancha-pc> <83shgyqmwn.fsf@gnu.org> <8760dt32su.fsf@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1502658860 24378 195.159.176.226 (13 Aug 2017 21:14:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 13 Aug 2017 21:14:20 +0000 (UTC) Cc: 28008@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 13 23:14:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dh0D4-0005qp-4B for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Aug 2017 23:14:10 +0200 Original-Received: from localhost ([::1]:35325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dh0DA-0004IR-GM for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Aug 2017 17:14:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dh0Cz-0004FM-Do for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2017 17:14:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dh0Cw-0001IF-6m for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2017 17:14:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52404) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dh0Cw-0001Hx-34 for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2017 17:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dh0Cv-0000U2-Qo for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2017 17:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Allen Li Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Aug 2017 21:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28008 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28008-submit@debbugs.gnu.org id=B28008.15026587951837 (code B ref 28008); Sun, 13 Aug 2017 21:14:01 +0000 Original-Received: (at 28008) by debbugs.gnu.org; 13 Aug 2017 21:13:15 +0000 Original-Received: from localhost ([127.0.0.1]:32849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dh0CB-0000TZ-DF for submit@debbugs.gnu.org; Sun, 13 Aug 2017 17:13:15 -0400 Original-Received: from mail-qk0-f180.google.com ([209.85.220.180]:37897) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dh0C9-0000TR-Dg for 28008@debbugs.gnu.org; Sun, 13 Aug 2017 17:13:14 -0400 Original-Received: by mail-qk0-f180.google.com with SMTP id x191so42211157qka.5 for <28008@debbugs.gnu.org>; Sun, 13 Aug 2017 14:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=I4HiI9upRiVM8KjDS/0OfOwF6X1v+95xzzO7S1EXkCM=; b=tB4VGjCM4DnhwWzFxrOTW//Hv1n/QFAqYShqe84PuHdV5/G+3z5jjRJa7dd1VIBRUC Baoab7cWrWEUwuIwote5caOmA0zXi4r3qvvEufgDu+hz0HFRS3mbD+/09GUrsEf2Eybh p5JqinSFj4rnFJ8SqSzmRZ43nCN2jstlDsZdauhYS/YT9kefc6KTOtoKe/MyOak5L8HA cYmiKPvkR9u2KALU37snXEBoa/j6uHkQ7UIbpWqSCJXIW2k7RPxM0CvChimiYmYHl5Aq /5/Cxs5PWHG04A77F0uXqR936bX1WQVUQHRnhgS50RLzIZlwBOciBbXao5QSJOHyYEds 7k6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=I4HiI9upRiVM8KjDS/0OfOwF6X1v+95xzzO7S1EXkCM=; b=IKiozQKV01OGvKHWNYmlf1APVd2JlY7k+3yjKo8F/wdt21MZxT5tCTKmQloFk02yfH XR15wld5bnXKbKnLmbG8NUQSaDALNBilOSR+9tnh+274zD+bJfcL+G4yI9SBj8zSJrqu xstXRfh4cGuMPgFK5G3JKK5sYde6EVciAeStdDUpocaS6wzJqtTus3zZV4bpnb0b1qaS QQlTFdP27KR6GrjIkcyHItcRu5EV1FenqVZewgVFJdRV3LFqxYw3VIDuAjt0CbYxDLIP AFKEWVi7FJSnzxIBLF+vJGvD7+kY0DzDdsIFZImXIDhJUuZo/vOaz0IhsIYaC2V7+CIq uZ2Q== X-Gm-Message-State: AHYfb5g45AG5XR0ZV+tcvBVkvEB8CRLCA3ko95ozExal47rc2Emn0W3U rZakVw8DqqzJE0v/YJUpB2+HQ28olg== X-Received: by 10.55.3.130 with SMTP id 124mr1568233qkd.78.1502658788041; Sun, 13 Aug 2017 14:13:08 -0700 (PDT) Original-Received: by 10.200.52.237 with HTTP; Sun, 13 Aug 2017 14:13:07 -0700 (PDT) In-Reply-To: <8760dt32su.fsf@calancha-pc> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135734 Archived-At: On Fri, Aug 11, 2017 at 5:41 AM, Tino Calancha wrote: > ** Patch 1 always save the macro in `last-kbd-macro' after an error or 'C-g'. > Then, A. B. and D.2 behaves similarly. > > ** Patch 2 adds a new variable `last-aborted-kbd-macro': it saves the partial > macro there after an error or 'C-g'. Called `start-kbd-macro' with > APPEND non-nil offers to append on `last-aborted-kbd-macro'; possible answers > are 'yes', 'no' or 'del' (i.e., append on `last-aborted-kbd-macro' after delete > its last character). > > This is not backward compatible; for instance, the snippets A, B above won't be > saved in `last-kbd-macro' (currently they do). > It's more tidy; it separates 'good macros', i.e. those ended after > 'F4' or 'C-x )', from 'partial macros', i.e., those ended after an error or 'C-g'. I'm not the best qualified to comment on the patches themselves, but 2 sounds like the best solution except that it breaks backward compatibility. However, I hypothesize that no one is relying on the old behavior (that non-quit errors stop the macro recording and yet save it). On Fri, Aug 11, 2017 at 6:00 AM, Eli Zaretskii wrote: > All these low-level changes just to support an obscure use case? Is > really worth the risk to break macros to cater to that? I suspect that this bug is one of the reasons that this is an obscure use case, i.e. that people don't use kmacros as often as they would like to. Humans make mistakes, and when they make mistakes that translates to either an error or a C-g stopping the kmacro definition, which makes it impractical to use kmacros in the current form. If it were easy to recover from an error during kmacro definition, I know I would use them more.