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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:20:59+00:00 2026-05-31T05:20:59+00:00

I am wondering how is that some interactive commands in emacs present default value

  • 0

I am wondering how is that some interactive commands in emacs present default value while others don’t. For instance when I am in C file and cursor stands on printf, running manual-entry will suggest showing manual page for printf by default. I would like to make my own interactive commands with default value. How?
It seems like thing-at-point is a good direction, but how do I blend thing-at-point and interactive together?

  • 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-31T05:21:00+00:00Added an answer on May 31, 2026 at 5:21 am

    You already have good starting points to research your own solution.

    thing-at-point is probably useful in this context. I recently answered
    a question where I explained how to solve this type of problem by exploring the
    Emacs code base.

    Here is a rough toy function I came up with.

    (defun say-word (word)
      (interactive (list
                    (read-string (format "word (%s): " (thing-at-point 'word))
                                 nil nil (thing-at-point 'word))))
      (message "The word is %s" word))
    

    One key thing here is to understand how the interactive form works. I would
    read the relevant manual section carefully.

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

Sidebar

Related Questions

I was wondering if anyone had some resources that describe the binary protocol used
I'm working with some code that is confusing me and I'm wondering if I'm
I'm working on some code that uses the System.Diagnostics.Trace class and I'm wondering how
I'm wondering if there's some kind of criteria that can be used to determine
Ok, I have some C# code that looks like this and I was wondering
Firstly, I was wondering if there was some kind of built in function that
I have the code below. I'm wondering that does the self.value and _value have
I was wondering if there was any tutorial that introduces 3D Graphics theory while
I am wondering that how Google's Closure Compiler works. Can I, for instance, make
I have a class that outputs a simple report file. It reads some record

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.