* Re: calc: putting the top of the stack in the kill ring
[not found] <mailman.1839.1426079711.31049.help-gnu-emacs@gnu.org>
@ 2015-03-11 13:42 ` Marco Wahl
2015-03-11 20:23 ` Rainer Thiel
2015-03-11 23:09 ` Emanuel Berg
1 sibling, 1 reply; 4+ messages in thread
From: Marco Wahl @ 2015-03-11 13:42 UTC (permalink / raw)
To: help-gnu-emacs
Rainer Thiel <r.thiel@uni-jena.de> writes:
> I am sorry if I am missing something very basic here, but I cannot seem
> to find a way to put the result on top of the stack in the kill ring. I
> am aware of the `Kill and Yank' section of the calc manual, but 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'.
>
> Is there any easy way of copying only the number on stack (`5', in this
> case) into the kill-ring?
I don't know if there is already a possibility to get just the value
(opposed to the whole line) into the kill-ring.
But there is C-x * y. You can use it typically in a buffer to get the
top of the stack into that buffer.
You might also consider to use 'y' from within the calc buffer.
Bye,
Marco
--
http://www.wahlzone.de
GPG: 0x49010A040A3AE6F2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: calc: putting the top of the stack in the kill ring
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
0 siblings, 0 replies; 4+ messages in thread
From: Rainer Thiel @ 2015-03-11 20:23 UTC (permalink / raw)
To: help-gnu-emacs
On 2015-03-11, 14:42 +0100, Marco Wahl <marcowahlsoft@gmail.com> wrote:
> But there is C-x * y. You can use it typically in a buffer to get the
> top of the stack into that buffer.
>
> You might also consider to use 'y' from within the calc buffer.
Thank you! That is even better than what I thought should be possible.
Many thanks again
Rainer
--
Prof. Dr. Rainer Thiel
Institut für Altertumswissenschaften
07737 Jena, Germany (EU)
r.thiel@uni-jena.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: calc: putting the top of the stack in the kill ring
[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 23:09 ` Emanuel Berg
1 sibling, 0 replies; 4+ messages in thread
From: Emanuel Berg @ 2015-03-11 23:09 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* calc: putting the top of the stack in the kill ring
@ 2015-03-11 13:07 Rainer Thiel
0 siblings, 0 replies; 4+ messages in thread
From: Rainer Thiel @ 2015-03-11 13:07 UTC (permalink / raw)
To: help-gnu-emacs
I am sorry if I am missing something very basic here, but I cannot seem
to find a way to put the result on top of the stack in the kill ring. I
am aware of the `Kill and Yank' section of the calc manual, but 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'.
Is there any easy way of copying only the number on stack (`5', in this
case) into the kill-ring?
Many thanks in advance
Rainer
--
Prof. Dr. Rainer Thiel
Institut für Altertumswissenschaften
07737 Jena, Germany (EU)
r.thiel@uni-jena.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-11 23:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
2015-03-11 13:07 Rainer Thiel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).