help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: calc: putting the top of the stack in the kill ring


From: Emanuel Berg
Subject: Re: calc: putting the top of the stack in the kill ring
Date: Thu, 12 Mar 2015 00:09:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Rainer Thiel <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]