Skip to content

Add action to copy email addresses to kill ring. #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

slackorama
Copy link

Admittedly, this scratches my own itch but I think it's handy.

Also fixes an issue I had with the formatting of contacts with commas in their names.

If a contact is named "Foo, Bar", it needs quotes around it.
Sometimes I need to add a whole slew of email addresses to a reply to a
different email.
@tmalsburg
Copy link
Member

Contributions that scratch someone's own itch are usually the best.

One question about terminology: You use "clipboard" in the name of the action but "kill ring" in the comments. My understanding is that "clipboard" is typically used to refer to the system-wide copy-and-paste facility but "kill ring" for Emacs-internal facilities. Is that correct?

Your code does not affect the system-wide clipboard AFAICT. Wouldn't it be more useful if the email address was also available for pasting in apps other than Emacs?

@slackorama
Copy link
Author

You are correct. I swap kill-ring and clipboard too much.

Using emacs 24 so it should go to the clipboard on a kill: https://www.gnu.org/software/emacs/manual/html_node/emacs/Clipboard.html Unless I'm misunderstanding something.

I think it can be done with gui-set-selection in older versions. I'll try and get it rigged up and submit a new PR with changes for both.

@tmalsburg
Copy link
Member

Just checked: With a recent development Emacs and emacs -Q, (kill-new "XYZ") does give me "XYZ" when I paste in another application. My non-Q Emacs was configured to leave the system-wide clipboard untouched.

@Ambrevar
Copy link
Member

Ambrevar commented Aug 1, 2017

Isn't this PR obsolete? I have a Copy to clipboard action in helm-mu-contacts.

@tmalsburg
Copy link
Member

Yes, seems outdated.

@tmalsburg tmalsburg closed this Aug 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants