From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.ciao.gmane.org!not-for-mail From: Skip Montanaro Newsgroups: gmane.emacs.help Subject: Re: Saving macros defined on-the-fly (F3, F4) Date: Tue, 22 Jan 2019 16:31:03 -0600 Message-ID: References: <20190122162749.34f1ba3c@mevla> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.org; posting-host="ciao.gmane.org:195.159.176.228"; logging-data="160188"; mail-complaints-to="usenet@ciao.gmane.org" Cc: Help GNU Emacs To: jonetsu Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 22 23:33:00 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gm4bH-000fSj-T3 for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Jan 2019 23:32:56 +0100 Original-Received: from localhost ([127.0.0.1]:51607 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gm4bG-0006t2-Dw for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Jan 2019 17:32:54 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gm4aD-0006Yk-Cv for help-gnu-emacs@gnu.org; Tue, 22 Jan 2019 17:31:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gm4a8-0003TU-85 for help-gnu-emacs@gnu.org; Tue, 22 Jan 2019 17:31:46 -0500 Original-Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:33380) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gm4a8-0003Lw-0n for help-gnu-emacs@gnu.org; Tue, 22 Jan 2019 17:31:44 -0500 Original-Received: by mail-pg1-x52c.google.com with SMTP id z11so91851pgu.0 for ; Tue, 22 Jan 2019 14:31:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TKD0tLv4TlxU8GyQ623xbBql1Qvi5kKb0UhmDuUogX8=; b=VrJx2YcDtXWuqJvVfMQldVaMuihfKp0GHX9DJpkEHUoxERID8xlfeVU6YdGAdl2c4h Ai9wqC7qEAe1U5F0z/G8PhSWwYc11O7WyqBDln74EOZSga4fvf8dMshPMFUNdTVoXGVf sA9mHlpugw+uLqCG59nuDMfowh99WCcSJEoQH2Z1aUPVKb+mZFEow0fsVysJrUM3rkuy BMQLUY22mGliF/TBxsURtf0quoQ+yCi6l0S0ixJeY6YcNAJcQ+6n94wo1bcvKgqRvT2M WUvsXZG/ysGzZkV1tINcArRQ07rn3LrT0y98zuvcrIcEa3IXgSvw64lzwFN33vYsVGyr 0V4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TKD0tLv4TlxU8GyQ623xbBql1Qvi5kKb0UhmDuUogX8=; b=DN0scERkT9O625h6Sb1wMpdsQl0IiIS7W6I4EjpHLsql0gKf8/GdNXQ8s8ky/LfEkd Em/GiqZQeKhshk1Hx75DmjKIkmucy1JoVPI3XoCygpSJbouc9KLOVg/Kf34xg7znN2I2 ikwkBBAxqY54+nNtvVA6Qs/zOphe7/LSI23ROQNnJo+jTMB+SYnYdggBB4YyVpsYaOtF 7E9CNclLgEY6zG3RtugUyk7nnCHlP4KbkqFPZZqEiJV+nMoia7LH4Be7eDa+zAtpbr+p sWYaHR2MZlqwrJ9QzWrLWU6CCM8s2EzpYUeBN6RPhdbBWoAjipqRNGUobFQ6TKPe41Tu F9/A== X-Gm-Message-State: AJcUukcKKUEw+7otrLpwDMPTo04s2sdAe+vTLQt0hus3/rqw5xi4lLiy kAO/7DVuKZh5xEgElIXG99qoX86+RKt/VbICHcEK6tb/UTn7 X-Google-Smtp-Source: ALg8bN70fxqeJKzdXJX8TX763JhsK9ipxIJS4UsiaW6zt74tGe+ROTskhO/SQXIsqsKpVjss9F9GbYGH8o2OSOwUn8k= X-Received: by 2002:a63:7b06:: with SMTP id w6mr33562734pgc.288.1548196289628; Tue, 22 Jan 2019 14:31:29 -0800 (PST) In-Reply-To: <20190122162749.34f1ba3c@mevla> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::52c X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119138 Archived-At: > On Linux systems, is it possible to save a macro quickly defined using > F3 and F4 and have it recalled at a later time and run by pressing > F4 ? Been awhile since I wanted to save (or even name) a keyboard macro, but try C-x C-k n to give it a name, or C-x C-k b to bind it to a key sequence. Once named, you can save its definition across sessions with M-x insert-kbd-macro RET to insert it in the current buffer (typically one visiting ~/.emacs). Not sure about the F3/F4 business. Those two keys have nothing to do with macros in my world. I still use C-x ( and C-X ) (old habits die hard). I presume somewhere in your setup you bound F3 and F4 to commands which start and end macro definitions. At any rate, you can read all about messing with macros here: http://www.gnu.org/software/emacs/manual/html_node/emacs/Keyboard-Macros.html#Keyboard-Macros Skip