From unknown Thu Jun 19 12:38:19 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#24992 <24992@debbugs.gnu.org> To: bug#24992 <24992@debbugs.gnu.org> Subject: Status: 25.1; Using mouse, can put empty keyboard macro in macro ring Reply-To: bug#24992 <24992@debbugs.gnu.org> Date: Thu, 19 Jun 2025 19:38:19 +0000 retitle 24992 25.1; Using mouse, can put empty keyboard macro in macro ring reassign 24992 emacs submitter 24992 Gemini Lasswell severity 24992 minor tag 24992 patch fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 17:32:49 2016 Received: (at submit) by debbugs.gnu.org; 22 Nov 2016 22:32:49 +0000 Received: from localhost ([127.0.0.1]:38686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9JcP-0003Xx-3w for submit@debbugs.gnu.org; Tue, 22 Nov 2016 17:32:49 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9JcM-0003Xj-Bt for submit@debbugs.gnu.org; Tue, 22 Nov 2016 17:32:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9JcF-0006cI-VT for submit@debbugs.gnu.org; Tue, 22 Nov 2016 17:32:41 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52142) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c9JcF-0006c9-SK for submit@debbugs.gnu.org; Tue, 22 Nov 2016 17:32:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9JcE-00030N-Dr for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2016 17:32:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9Jc9-0006Yo-CK for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2016 17:32:38 -0500 Received: from aibo.runbox.com ([91.220.196.211]:44390) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c9Jc9-0006Y7-5E for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2016 17:32:33 -0500 Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1c9Jc7-0007nT-SQ for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2016 23:32:31 +0100 Received: from c-24-22-244-161.hsd1.wa.comcast.net ([24.22.244.161] helo=rainbow.local) by mailfront12.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1c9Jbw-0004nQ-PO for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2016 23:32:21 +0100 From: Gemini Lasswell To: bug-gnu-emacs@gnu.org Subject: 25.1; Using mouse, can put empty keyboard macro in macro ring Date: Tue, 22 Nov 2016 14:32:18 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) --=-=-= Content-Type: text/plain The commentary in lisp/kmacro.el says "Note: an empty macro is never added to the macro ring.", but here is a way to add an empty macro to the ring using kmacro-end-call-mouse, which is by default bound to S-mouse-3. I am not aware of any serious side effects of there being an empty macro in the ring. To reproduce, with emacs -Q and the mouse pointer positioned over your Emacs window: C-x ( aaa S-mouse-3 C-x ( S-mouse-3 C-x ( bbb S-mouse-3 C-x C-k C-n C-n C-n This defines three macros, one which inserts "aaa", an empty one, and one which inserts "bbb". Then the repeated C-n's of the last step cycle through the macros in the ring and display them in the echo area. I'm attaching a patch which makes kmacro-end-call-mouse do the same thing that kmacro-end-and-call-macro does in this case, which is to end the definition of the empty macro, pop the empty macro off the ring, and then run the macro which becomes current. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0001-Don-t-add-empty-keyboard-macro-to-macro-ring.patch >From 2e5a84b47b72519aabe8e4aa392e2b53858aa8cf Mon Sep 17 00:00:00 2001 From: gazally Date: Sun, 20 Nov 2016 14:24:51 -0800 Subject: [PATCH] Don't add empty keyboard macro to macro ring * lisp/kmacro.el (kmacro-end-call-mouse): Don't save a newly defined macro if it is empty. --- lisp/kmacro.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/kmacro.el b/lisp/kmacro.el index 2e743b4..49787f5 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -744,7 +744,13 @@ kmacro-end-call-mouse If kbd macro currently being defined end it before activating it." (interactive "e") (when defining-kbd-macro - (end-kbd-macro)) + (end-kbd-macro) + (when (and last-kbd-macro (= (length last-kbd-macro) 0)) + (setq last-kbd-macro nil) + (message "Ignore empty macro") + ;; Don't call `kmacro-ring-empty-p' to avoid its messages. + (while (and (null last-kbd-macro) kmacro-ring) + (kmacro-pop-ring1)))) (mouse-set-point event) (kmacro-call-macro nil t)) -- 2.10.1 --=-=-= Content-Type: text/plain GNU Emacs 25.1.1 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G1004)) of 2016-10-09 built on rainbow.local Windowing system distributor 'Apple', version 10.3.1404 Configured using: 'configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs/25.1/share/info/emacs --prefix=/usr/local/Cellar/emacs/25.1 --without-x --with-xml2 --without-dbus --with-gnutls --with-imagemagick --with-rsvg --with-ns --disable-ns-self-contained' Configured features: JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Defining kbd macro... Keyboard macro defined Defining kbd macro... Keyboard macro defined Macro: aaa Macro: Macro: bbb Macro: aaa Macro: Macro: bbb Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils cl-seq cl-extra help-mode easymenu edmacro cl-loaddefs pcase cl-lib kmacro time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 197854 6343) (symbols 48 19937 0) (miscs 40 49 173) (strings 32 15610 5377) (string-bytes 1 449702) (vectors 16 33190) (vector-slots 8 656305 5396) (floats 8 159 206) (intervals 56 215 0) (buffers 976 17)) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 07 22:01:39 2017 Received: (at 24992) by debbugs.gnu.org; 8 Dec 2017 03:01:39 +0000 Received: from localhost ([127.0.0.1]:51233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eN8uw-0005es-Or for submit@debbugs.gnu.org; Thu, 07 Dec 2017 22:01:38 -0500 Received: from mail-it0-f48.google.com ([209.85.214.48]:35966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eN8uu-0005eZ-5u; Thu, 07 Dec 2017 22:01:36 -0500 Received: by mail-it0-f48.google.com with SMTP id d16so1884585itj.1; Thu, 07 Dec 2017 19:01:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=TmB/v+Phf2HZcW0qBXpAsLmVifoVtp7nLh/LUyaR6CE=; b=jYeMOvZtkt2RxzwEhq/aoP2+r08mEX5Wqz6C0jDAqWOAmHdu8Swgj0OjkpyrVYXDF6 DR9DquY38LB5Qk4il8zz1z5u+OFR7LlL0/aZdnGeXLrG6dpw1CvY0A10eZ5KuHIEJTMr I6Dyr3gQ9tSQPIFPce0RagNucI1dVxOIpy8lAE4h/YlN77Q15EQdpkDWgKZWs7ZrOGRG jMDRmdjPCs1lXif3iTHbCR/YWDwSFKYtzdVJ4Rv5wfSl5CqCG96pqAFYTYvIwviai+CS dnUn6URkLnx8us8RH3n39u9EW4pSbJ7z3eDHwh/vHuyyskrbKD1Sm6JXXF8a/x9OqBga neuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=TmB/v+Phf2HZcW0qBXpAsLmVifoVtp7nLh/LUyaR6CE=; b=Esyh2FQ3wAnf077A7tRm66jSqf0mRl1rowQHcO/aVhM9aVlutmkNs3BLCagnqIOgGS Z2dmcdDXKGeL9329y0QIeaIB9NvTLyWAQJLtUEGcy+I1zFltqPt+mUWIk0XvKfqFfVmU hDgbxk+g95RCY+sDqmodilmrVCVXLFA/aCh5hf2a/yn5PFvM8WR0kVtCb6pULHX0b+SN AbxCdjqsX9wsAdenJZJZvMRPHDt5uh+Fhc2lEQsy5qEfzlFhEX+4E6Fe4fylTS/ekt+x w3aVjC0cUWED7EAfGj8ecHECN9suSHUnCXYNM42cHE0Th2Wrofg4Bay+pYcalSAyS0zC 3aYw== X-Gm-Message-State: AJaThX7SNH77elinJHVkSuHIeutms2U27NNmPRpw87apWhlddrbj7JjV /odbKf+NnWV3206LX9E0OPJMOw== X-Google-Smtp-Source: AGs4zMbjfG0iT/Ez/+szmHYsnsjgKW6QTddCWDkS2az7wEU+T9lP9CW3G4f4OaMKw1+7394eMD7Gpg== X-Received: by 10.107.53.138 with SMTP id k10mr42115383ioo.59.1512702090392; Thu, 07 Dec 2017 19:01:30 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id p3sm312334itc.39.2017.12.07.19.01.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Dec 2017 19:01:29 -0800 (PST) From: Noam Postavsky To: Gemini Lasswell Subject: Re: bug#24992: 25.1; Using mouse, can put empty keyboard macro in macro ring References: Date: Thu, 07 Dec 2017 22:01:28 -0500 In-Reply-To: (Gemini Lasswell's message of "Tue, 22 Nov 2016 14:32:18 -0800") Message-ID: <877etxgbxz.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 24992 Cc: 24992@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) severity 24992 minor tags 24992 + patch quit Gemini Lasswell writes: > The commentary in lisp/kmacro.el says "Note: an empty macro is never > added to the macro ring.", but here is a way to add an empty macro to > the ring using kmacro-end-call-mouse, which is by default bound to > S-mouse-3. I am not aware of any serious side effects of there being an > empty macro in the ring. > > To reproduce, with emacs -Q and the mouse pointer positioned over your > Emacs window: > > C-x ( aaa S-mouse-3 > C-x ( S-mouse-3 > C-x ( bbb S-mouse-3 > C-x C-k C-n C-n C-n > > This defines three macros, one which inserts "aaa", an empty one, and one > which inserts "bbb". Then the repeated C-n's of the last step cycle > through the macros in the ring and display them in the echo area. > > I'm attaching a patch which makes kmacro-end-call-mouse do the same > thing that kmacro-end-and-call-macro does in this case, which is to end > the definition of the empty macro, pop the empty macro off the ring, and > then run the macro which becomes current. I guess this could be applied now? From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 31 14:34:33 2017 Received: (at 24992) by debbugs.gnu.org; 31 Dec 2017 19:34:33 +0000 Received: from localhost ([127.0.0.1]:59033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVjNR-0007wz-Au for submit@debbugs.gnu.org; Sun, 31 Dec 2017 14:34:33 -0500 Received: from aibo.runbox.com ([91.220.196.211]:50100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVjNQ-0007ws-26 for 24992@debbugs.gnu.org; Sun, 31 Dec 2017 14:34:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=rbselector1; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From; bh=AFdgZdrTowzZNM0SSgRl1J6BR1WR+fmmiOijms0aNcw=; b=AvEk3p8mNoYJVc6TVwHtqFSk1j r9dIcNPLzkqsR/feUyzs+rDMkubqkBS80G62cz3+J+QuppZl2YsNly1fkxP+PrsRN/FBciv2GJG/9 Ypyk8rln53/4c7ZMMkU8z/x8VGjcNuRILfBQ+nCWheXux/WJHJ8UHnL0JTGEsto5ZeYzzdckZ5icK /6YgsOU2DR8Ni2Erk857wGeITulL/+kDDvogrtnk8acj+VusfkDEpTmfNW73OdO4NV0XDl/0T/mBT sSqmWJZlOrz+salwUnxOSJslOjDsCndf4J/zYtSMFmZ1P98ZADiGimY2pqHsj16pX0GVnZM5/jxiv qnggb0ZQ==; Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1eVjNO-00051q-Oh; Sun, 31 Dec 2017 20:34:30 +0100 Received: from c-24-22-244-161.hsd1.wa.comcast.net ([24.22.244.161] helo=chinook) by mailfront12.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1eVjN5-0005fl-7F; Sun, 31 Dec 2017 20:34:11 +0100 From: Gemini Lasswell To: Noam Postavsky Subject: Re: bug#24992: 25.1; Using mouse, can put empty keyboard macro in macro ring References: <877etxgbxz.fsf@users.sourceforge.net> Date: Sun, 31 Dec 2017 11:34:00 -0800 In-Reply-To: <877etxgbxz.fsf@users.sourceforge.net> (Noam Postavsky's message of "Thu, 07 Dec 2017 22:01:28 -0500") Message-ID: <87608my9nb.fsf@runbox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24992 Cc: 24992@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Noam Postavsky writes: > I guess this could be applied now? I've pushed it to emacs-26. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 31 14:35:05 2017 Received: (at control) by debbugs.gnu.org; 31 Dec 2017 19:35:05 +0000 Received: from localhost ([127.0.0.1]:59038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVjNx-0007yB-HV for submit@debbugs.gnu.org; Sun, 31 Dec 2017 14:35:05 -0500 Received: from aibo.runbox.com ([91.220.196.211]:35546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVjNv-0007y4-Tu for control@debbugs.gnu.org; Sun, 31 Dec 2017 14:35:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=rbselector1; h=Subject:From:To:Message-Id:Date; bh=7K7snSq6y/9YCBFENj0GPNoyB/YSyom8aJb4ZOswjb8=; b=aMPYOhXhtN6uO52QNJA1Q7U587 t+Fip9aVBQYNbClIW19csdZtSq8dm3LdLH3qLkICQjDUKc9X9vaAkYw8unQaLyPjvsDaSR1If2IIA KT+BuKa2q7x4VJvaMGF2Rz+m/7sl+YdA8KA8jpNiDbp/KXyor4uPXuMZoOXIXhfR99SVEDDd4uVVr bqR1UXTWvMn7HjUUYVkVM6ZMqcKTKr5J+j/CzD4jdDpNExkhnYsvOnzPWHTA56jhzMggFQfjNgzOr 8amiz7XM7KL0ZvIS5UlzMap6LzeodljN2bblD+eGIR0ZRn3fU1zy8G0R19pygTcv72TSU7Zhy6bSH 0RBsdN3w==; Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1eVjNv-0008QF-3L for control@debbugs.gnu.org; Sun, 31 Dec 2017 20:35:03 +0100 Received: from c-24-22-244-161.hsd1.wa.comcast.net ([24.22.244.161] helo=chinook) by mailfront10.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1eVjNi-0004Yo-7H for control@debbugs.gnu.org; Sun, 31 Dec 2017 20:34:50 +0100 Date: Sun, 31 Dec 2017 11:34:48 -0800 Message-Id: <874lo6y9lz.fsf@runbox.com> To: control@debbugs.gnu.org From: Gemini Lasswell Subject: control message for bug #24992 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 24992 fixed close 24992 26.1 From unknown Thu Jun 19 12:38:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 29 Jan 2018 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator