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 8295041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:26:40+00:00 2026-06-08T14:26:40+00:00

I want to perform the same action that one does by hitting C-Space +

  • 0

I want to perform the same action that one does by hitting C-Space + moving the arrow keys, but in elisp.

Failing to find the right function (if they just were logically grouped in namespaces or somehow tagged…). Which one is it?

  • 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-06-08T14:26:42+00:00Added an answer on June 8, 2026 at 2:26 pm

    You can translate keystrokes to elisp using C-h k key.

    You’ll notice the elisp function for setting the mark set-mark-command, takes one non-optional argument. Emacs uses the special interactive function to allow elisp functions to be written naturally with arguments. This allows them to be generic and easy to reuse in other elisp programs, while still possible to invoke directly from a keystroke. It also has some of the C-u prefix logic built-in.

    In the case of set-mark-command, its first function is (interactive "P"), which means the prefix is passed in as an argument when called from the keyboard. You can simulate this directly in elisp with:

    (set-mark-command nil)
    

    For example, to select the current line in elisp:

    (defun my-select-current-line ()
      (interactive)
      (move-beginning-of-line nil)
      (set-mark-command nil)
      (move-end-of-line nil)
      (setq deactivate-mark nil))
    

    Note you have to tell emacs to leave the mark active at the end or else the region won’t remain highlighted (although the point and mark will be where you left them).

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

Sidebar

Related Questions

I have a standard textbox that I want to perform an action on a
I want to perform action on change in count of rows of an HTML
I want to perform rubyf action in VIM when I press F5 if the
I have a Rails 3 app that is trying to perform some controller action
I want to perfom the same action for 2 different events firing. The problem
I want to access cookies and then perform the same operation regardless of the
I've got a custom Button class, that always performs the same action when it
I want perform a easy task in android, which when receiving a call the
I want to perform an jquery request to php and then I want php
I want to perform calculations for each company number in the column PERMNO of

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.