Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6866545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:11:51+00:00 2026-05-27T03:11:51+00:00

You can assume that I’m in repl using the slime mode. How can I

  • 0

You can assume that I’m in repl using the slime mode.

How can I make a function key (for example, f4), to do this:

  1. kill the last history item (the ones that you get with C-up or C-down);
  2. move to the upper buffer;
  3. yank, Save buffer to file;
  4. move back to the repl.

Please, make it a step by step guide, because I’m a complete beginner to Emacs and Lisp.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:11:52+00:00Added an answer on May 27, 2026 at 3:11 am

    The easiest way to make what you ask would be using emacs macros.

    Why?
    Because you have just said exactly what you want to do.
    And macros save the sequence of keys you typed.
    You can do it in emacs for one time, and save the sequence of pressed keys.

    So, start recording a macro (when you are in the repl buffer) using F3 or C-x (, then make something like M-p C-a C-k C-u - C-x o C-y C-x o(i just translated your request to key sequence), then type F4 or C-x ). To execute macro, press F4 again, or C-x e.

    You can interrupt recording a macro if you made a mess with C-g. The reverse is applied, if you made a mess and error message is send, your macro recording(sometimes frustrating) or evaluating(and this is feature, since you can make macro that will work good by just holding F4) would be interrupted.

    If you want to use this macro later, you can name it with M-x name-last-kbd-macro. This will allow you to use as a command, typing M-x <your macro name> (<your macro name> – name of your macro). This will not save it for future sessions, just name it.

    To save your named macro, use M-x insert-kbd-macro when you are in your .emacs file. This will insert elisp code at current point, executing which you will get your macro binded to your command name(and it will be executed every time you start emacs).

    To bind it to some key, rather start it every time from M-x, insert this in your .emacs file: (global-set-key [f12] '<your-macro-name>). You can read more about setting comands to keys there and there.

    The bad thing about macro is that you will undo every step, not the whole macro in one time(but someone may bring solution here, if he have one). If you want to make something more serious, using conditions or iterations, you have to forward your path to elisp. Just C-h k everything around. Help keys like C-h f, C-h a, C-h b will also come in use.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On OS from win 2000 or later (any language) can I assume that this
Let's assume I'm stuck using Python 2.6, and can't upgrade (even if that would
First, I can assume that all urls that end with jpeg, jpg, bmp, png
Update - for those of a facetious frame of mind, you can assume that
I assume that you can't use a JavaScript code snippet to validate if the
Let's assume that our system can perform actions, and that an action requires some
Let's assume that Stackoverflow offers web services where you can retrieve all the questions
Assume that we have multiple arrays of integers. You can consider each array as
Assume that int array arrayName is a member of class className, How can I
I am currently implementing a method that accepts two bitmap objects. We can assume

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.