From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#25860: 25.1; Double macro execution Date: Sat, 25 Feb 2017 14:41:36 +0900 Message-ID: <8760jyx1wv.fsf@calancha-pc> References: <87zihbbrxr.fsf@linux-m68k.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1488001332 31897 195.159.176.226 (25 Feb 2017 05:42:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 25 Feb 2017 05:42:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 25860@debbugs.gnu.org, Marek Twardochlib , tino.calancha@gmail.com To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 25 06:42:06 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 1chV7O-0007ZB-3U for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Feb 2017 06:42:06 +0100 Original-Received: from localhost ([::1]:41410 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chV7T-0000AX-Nt for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Feb 2017 00:42:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chV7N-0008UG-LO for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 00:42:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chV7K-0000eQ-KR for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 00:42:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56896) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1chV7K-0000eL-HE for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 00:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1chV7K-0000cn-5O for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 00:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Feb 2017 05:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25860 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25860-submit@debbugs.gnu.org id=B25860.14880013082381 (code B ref 25860); Sat, 25 Feb 2017 05:42:02 +0000 Original-Received: (at 25860) by debbugs.gnu.org; 25 Feb 2017 05:41:48 +0000 Original-Received: from localhost ([127.0.0.1]:55095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chV76-0000cL-JS for submit@debbugs.gnu.org; Sat, 25 Feb 2017 00:41:48 -0500 Original-Received: from mail-pg0-f67.google.com ([74.125.83.67]:36622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chV74-0000c7-TY for 25860@debbugs.gnu.org; Sat, 25 Feb 2017 00:41:47 -0500 Original-Received: by mail-pg0-f67.google.com with SMTP id z128so5615404pgb.3 for <25860@debbugs.gnu.org>; Fri, 24 Feb 2017 21:41:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=kUcvEYGW4EKcXIiCGKorRLbthLsXeATVQRoPl3Sp21I=; b=uBdegYOuFNy16rC+1FcQMm5iAKBHfUljPDD7R5+P13DEwRdftwBqS1SqR1xWKXjCWz JOuQXsUoU1qdhlm+1gSzmM8EBs4ajQU3nIQWjVdmP2xgFJ9Z7VeUw+8QNAnPHRxrQ1RQ rysvLdGV5IMciJ21g6+ApHVteiGDmJ5G4uj46hAr16jiMK9z7U3tS9RmuDqF68Pr1aZP qGGBaeSf7Bt9c7EIBNkqUoYX+nLArLDBlSne3ZqCsqR5s9MTxcmPg3V0iwDaSK9srJIv uewyqtCYwVAhqoSuQsLoCqtcprYVDjEubsNhtLTksKEypNQKu6wRz75eLtlTh6idWp6D FtNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=kUcvEYGW4EKcXIiCGKorRLbthLsXeATVQRoPl3Sp21I=; b=MVC5OvGha86hyYKBBjAwcCC01oRvfk3UO9wpsRwjfx9RD4aV+9+VUMLLfXtPvKoZy1 ekD5Ql8pMf0ozID26/DSIy4VglfbO5gqLPsmryW+Nm+W5KctDiqQozy2JE4vfVjTUp3e MHpjD9ESmwJ41EmqhFufcf5prS4MiywiNrFWpeO7JRN/yQltAFaXKIYMb6B9Dduq1L7z fIczLIoySHi4OaKg+0hcqVAkHaYgw+CcgbBNNfCetRZQXS5G3Ek5Q7CkarPJS5uJx6tZ RxTbVpZZb8/lff9KPCusqHzhw37WbCoPJesP5gIhAatjKkDzb36sd5zIm+4zZFspaAnV MqyQ== X-Gm-Message-State: AMke39mMxC0QKqWeeoufrzjeGoVuE2HD/PYfgkVeD60baYRVnEoVUBaYM7rORUXc51EMbw== X-Received: by 10.84.176.131 with SMTP id v3mr8937417plb.7.1488001300770; Fri, 24 Feb 2017 21:41:40 -0800 (PST) Original-Received: from calancha-pc (104.81.147.124.dy.bbexcite.jp. [124.147.81.104]) by smtp.gmail.com with ESMTPSA id z27sm18029865pfg.38.2017.02.24.21.41.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Feb 2017 21:41:40 -0800 (PST) In-Reply-To: <87zihbbrxr.fsf@linux-m68k.org> (Andreas Schwab's message of "Fri, 24 Feb 2017 15:10:24 +0100") 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:129760 Archived-At: Andreas Schwab writes: > On Feb 24 2017, Marek Twardochlib wrote: > >> Then I define another macro that simply call the previous macro >> insert-a. > > How did you do that? DUNNO how to solve the problem, but i guess th OP means the following: (defun insert-a-fn (&optional arg) (interactive "p") (insert "a\n")) F3 a RET F4 C-x C-k n insert-a RET (symbol-function 'insert-a) => (lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ([97 return] 0 "%d")) arg)) I) ;;; Using `insert-a-fn' we insert "a" _once_: F3 M-x insert-a-fn RET F4 ;; Keyboard Macro Editor. Press C-c C-c to finish; press C-x k RET to cancel. ;; Original keys: <> Command: last-kbd-macro Key: none Macro: <> ;; insert-a-fn II) ;;; Using macro `insert-a' we insert "a" _twice_; so you need to remove ;;; <> line by hand: F3 M-x insert-a RET F4 C-x C-k e RET ;; Keyboard Macro Editor. Press C-c C-c to finish; press C-x k RET to cancel. ;; Original keys: <> a RET Command: last-kbd-macro Key: none Macro: <> ;; insert-a a ;; self-insert-command RET ;; newline