all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: calc: putting the top of the stack in the kill ring
Date: Thu, 12 Mar 2015 00:09:12 +0100	[thread overview]
Message-ID: <87ioe7b087.fsf@debian.uxu> (raw)
In-Reply-To: mailman.1839.1426079711.31049.help-gnu-emacs@gnu.org

Rainer Thiel <r.thiel@uni-jena.de> writes:

> ... the problem is that M-w
> (calc-copy-region-as-kill) always copies the whole
> line.
>
> So when I say
>
>    2 3+
>
> I get
>
>    5
>
> but what is copied to the kill-ring with M-w is `1:
> 5'.

Indeed, that's strange. The `C-x * y' proposed is
probably what you need in most (all?) cases, but
nevertheless it goes against instinct that M-w should
ever kill anything that isn't in the region.

So, if you still want what you first asked for, you
can use the ordinary, all-Emacs `kill-ring-save' just
the same with the Calculator. You must use it
(kill-ring-save) interactively either with

    M-x kill-ring-save RET

or, if you put it in an Elisp wrapper (a defun), like
this:

    (call-interactively 'kill-ring-save)

That way, you don't have to fiddle with the
beginning/end of the region manually.

Then bind it to a shortcut. If you find you never use
`calc-copy-region-as-kill' you might even put your it
as M-w, plain and simple.

-- 
underground experts united


  parent reply	other threads:[~2015-03-11 23:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1839.1426079711.31049.help-gnu-emacs@gnu.org>
2015-03-11 13:42 ` calc: putting the top of the stack in the kill ring Marco Wahl
2015-03-11 20:23   ` Rainer Thiel
2015-03-11 23:09 ` Emanuel Berg [this message]
2015-03-11 13:07 Rainer Thiel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ioe7b087.fsf@debian.uxu \
    --to=embe8573@student.uu.se \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.