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

  • Home
  • SEARCH
  • 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 4054034
In Process

The Archive Base Latest Questions

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

I am using Mac OS and emacs -nw (the terminal mode). I don’t know

  • 0

I am using Mac OS and emacs -nw (the terminal mode).
I don’t know how can I paste things (having been implemented by M-w in emacs -nw) outside the emacs.

I know that the emacs -ns can do it.

Searching the internet and the command C-h b, i find out that method, but it didn’t work out.

(setq x-select-enable-clipboard t)

(setq interprogram-cut-function 'x-select-text)

I don’t know much about the argument of interprogram-cut-function.
Where does the x-select-text come from and what does it mean?

  • 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-20T14:31:23+00:00Added an answer on May 20, 2026 at 2:31 pm

    x-select-text is only used if you’re running Emacs in a GUI. (Emacs maps the Mac/Windows pasteboard/clipboard APIs to the X11 model, hence the name). You can always use C-h f to find out more about a function like this one and view its definition if it’s written in elisp.

    On the Mac, there is no concept of CLIPBOARD versus PRIMARY selections, so there is no point in setting x-select-enable-clipboard.

    The whole point of running emacs -nw is that it doesn’t interact with the windowing system. Why use Emacs in a terminal when there are plenty of graphical Emacsen that work very nicely on the Mac?

    That said, if you really wanted to hook up terminal Emacs to the Mac pasteboard, you could do something like this:

    (setq interprogram-cut-function
          (lambda (text &optional push)
        (let* ((process-connection-type nil)
               (pbproxy (start-process "pbcopy" "pbcopy" "/usr/bin/pbcopy")))
          (process-send-string pbproxy text)
          (process-send-eof pbproxy))))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I connect to a remote SQL server using Mac OS X? I
How can I detect if another host is using the same MAC address as
I am using Emacs 23 and php-mode.el 1.5.0. When I have this in my
I've been using vi quite a while, and with a Mac, I sometimes use
I'm new to Emacs if you can't tell. Right now I am using Carbon
I am using Mac OSX 10.6 and doing web development on it. I know
using Mac OSX, how can I add a device into J2ME Emulator? I have
I want to create a Java application bundle for Mac without using Mac. According
Today, I ran into this weird problem with a user using Mac OS X.
I'm using a mac and looking to batch convert a large amount of eps

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.