all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* pasting many times
@ 2006-10-23 14:32 Baurzhan Ismagulov
  0 siblings, 0 replies; 33+ messages in thread
From: Baurzhan Ismagulov @ 2006-10-23 14:32 UTC (permalink / raw)


Hello all,

I'm looking for an Emacs equivalent of vi's 59p.

I was able to C-x ( C-y C-x ) M-5 M-9 C-x e; is there a simpler way?

I'm using emacs-snapshot 20061003-1 on Debian unstable.

Thanks in advance,
Baurzhan.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
       [not found] <mailman.157.1161613927.27805.help-gnu-emacs@gnu.org>
@ 2006-10-23 15:31 ` Holger Sparr
  2006-10-23 16:14   ` Baurzhan Ismagulov
  0 siblings, 1 reply; 33+ messages in thread
From: Holger Sparr @ 2006-10-23 15:31 UTC (permalink / raw)


On Mon, 23 Oct 2006, Baurzhan Ismagulov wrote:

> Hello all,
> 
> I'm looking for an Emacs equivalent of vi's 59p.
> 
> I was able to C-x ( C-y C-x ) M-5 M-9 C-x e; is there a simpler way?
> 
> I'm using emacs-snapshot 20061003-1 on Debian unstable.

You might want to use `toggle-viper-mode´ and bind this to a key
(key combination).


Then you can do:

<your-key-to-toggle-viper> 59p <your-key-to-toggle-viper>



Holger

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-23 15:31 ` pasting many times Holger Sparr
@ 2006-10-23 16:14   ` Baurzhan Ismagulov
  2006-10-23 19:55     ` Dieter Wilhelm
       [not found]     ` <mailman.171.1161633348.27805.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 33+ messages in thread
From: Baurzhan Ismagulov @ 2006-10-23 16:14 UTC (permalink / raw)


Hello Holger,

On Mon, Oct 23, 2006 at 05:31:59PM +0200, Holger Sparr wrote:
> You might want to use `toggle-viper-mode? and bind this to a key
> (key combination).
> 
> 
> Then you can do:
> 
> <your-key-to-toggle-viper> 59p <your-key-to-toggle-viper>

Thanks, good to know! Five keystrokes instead of nine. However, IIRC,
there was a combination like M-5 M-9 ?-? C-y.

With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-23 16:14   ` Baurzhan Ismagulov
@ 2006-10-23 19:55     ` Dieter Wilhelm
  2006-10-23 20:52       ` Baurzhan Ismagulov
       [not found]       ` <mailman.179.1161636720.27805.help-gnu-emacs@gnu.org>
       [not found]     ` <mailman.171.1161633348.27805.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 33+ messages in thread
From: Dieter Wilhelm @ 2006-10-23 19:55 UTC (permalink / raw)
  Cc: help-gnu-emacs

Baurzhan Ismagulov <ibr@radix50.net> writes:

> Hello Holger,
>
> On Mon, Oct 23, 2006 at 05:31:59PM +0200, Holger Sparr wrote:
>> You might want to use `toggle-viper-mode? and bind this to a key
>> (key combination).
>> 
>> 
>> Then you can do:
>> 

I think it's not fair to the other editors to claim that you only need
3 keystrokes in vi, you often have to change the modes in your
session, that represents only in the best case.

>> <your-key-to-toggle-viper> 59p <your-key-to-toggle-viper>

> Thanks, good to know! Five keystrokes instead of nine. However, IIRC,

We would need some modifier keys as well and this would result in at
least 7 keystrokes unfortunately.

> there was a combination like M-5 M-9 ?-? C-y.

I can't imagine this.  But I've another idea assuming you wan't to
have 59 additional lines with some text!

Instead of copying the text (to the kill ring) mark it with C-x . as a
fill prefix, place the cursor to a line beginning at your choosing and
type M-5 9 C-o.  Here we are with 5 keystrokes.

Do you intend to modify the 59 fold copied text afterwards?

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-23 19:55     ` Dieter Wilhelm
@ 2006-10-23 20:52       ` Baurzhan Ismagulov
  2006-10-23 21:15         ` Dieter Wilhelm
       [not found]       ` <mailman.179.1161636720.27805.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 33+ messages in thread
From: Baurzhan Ismagulov @ 2006-10-23 20:52 UTC (permalink / raw)


Hello Dieter,

On Mon, Oct 23, 2006 at 09:55:02PM +0200, Dieter Wilhelm wrote:
> I think it's not fair to the other editors to claim that you only need
> 3 keystrokes in vi, you often have to change the modes in your
> session, that represents only in the best case.

I see :) , let me rephrase: My problem isn't much the number of
keystrokes, but an ability to repeat a simple command a certain number
of times, just like C-x RET c <charset> RET <command>. Defining a macro
for such a thing just seems to be an overkill.


> We would need some modifier keys as well and this would result in at
> least 7 keystrokes unfortunately.

Not if I bind it to F12, and Viper seems to deserve that ;) .


> > there was a combination like M-5 M-9 ?-? C-y.
> 
> I can't imagine this.

Ah, perhaps that was MultiEdit. BTW, is the argument of C-y ignored?


> But I've another idea assuming you wan't to have 59 additional lines
> with some text!
> 
> Instead of copying the text (to the kill ring) mark it with C-x . as a
> fill prefix, place the cursor to a line beginning at your choosing and
> type M-5 9 C-o.  Here we are with 5 keystrokes.

Thanks, this works for one line. However, I needed several lines.


> Do you intend to modify the 59 fold copied text afterwards?

Yes, why?


With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-23 20:52       ` Baurzhan Ismagulov
@ 2006-10-23 21:15         ` Dieter Wilhelm
  2006-10-24 19:36           ` Baurzhan Ismagulov
  0 siblings, 1 reply; 33+ messages in thread
From: Dieter Wilhelm @ 2006-10-23 21:15 UTC (permalink / raw)
  Cc: help-gnu-emacs

Baurzhan Ismagulov <ibr@radix50.net> writes:

> Hello Dieter,

Hi Baurzhan, 8-)

>
> On Mon, Oct 23, 2006 at 09:55:02PM +0200, Dieter Wilhelm wrote:
>> I think it's not fair to the other editors to claim that you only need
>> 3 keystrokes in vi, you often have to change the modes in your
>> session, that represents only in the best case.
>
> I see :) , let me rephrase: My problem isn't much the number of
> keystrokes, but an ability to repeat a simple command a certain number
> of times, just like C-x RET c <charset> RET <command>. Defining a macro
> for such a thing just seems to be an overkill.

C-x z (repeat) and then just zzzzzz (assuming Emacs 22.0.50).

>
>
>> We would need some modifier keys as well and this would result in at
>> least 7 keystrokes unfortunately.
>
> Not if I bind it to F12, and Viper seems to deserve that ;) .
>

Yes, totally right!  Sorry, I'm a touch typist and forgot that some
guys are able to leave the home position of the keypad ;-).

>
>> > there was a combination like M-5 M-9 ?-? C-y.
>> 
>> I can't imagine this.
>
> Ah, perhaps that was MultiEdit. BTW, is the argument of C-y ignored?
>

No it isn't, M-5 9 C-y means that the command returns the 59th
previous entry of the kill-ring list.

(length kill-ring)60
M-100 C-y seems to circle through the kill-ring.

>
>> But I've another idea assuming you wan't to have 59 additional lines
>> with some text!
>> 
>> Instead of copying the text (to the kill ring) mark it with C-x . as a
>> fill prefix, place the cursor to a line beginning at your choosing and
>> type M-5 9 C-o.  Here we are with 5 keystrokes.
>
> Thanks, this works for one line. However, I needed several lines.
>

Why on earth do you need to paste the same paragraph 59 fold?

>
>> Do you intend to modify the 59 fold copied text afterwards?
>
> Yes, why?

maybe there is a better solution for the complete problem, maybe we
could change something with C-M-% automagically?

Maybe it makes more sense to copy and edit the paragraphs more
incrementally?

>
>

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
       [not found]     ` <mailman.171.1161633348.27805.help-gnu-emacs@gnu.org>
@ 2006-10-24  6:03       ` Holger Sparr
  0 siblings, 0 replies; 33+ messages in thread
From: Holger Sparr @ 2006-10-24  6:03 UTC (permalink / raw)


On Mon, 23 Oct 2006, Dieter Wilhelm wrote:
>>> <your-key-to-toggle-viper> 59p <your-key-to-toggle-viper>
> 
>> Thanks, good to know! Five keystrokes instead of nine. However, IIRC,
> 
> We would need some modifier keys as well and this would result in at
> least 7 keystrokes unfortunately.
> 

I'd suggest a function key for this.

Holger

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
       [not found]       ` <mailman.179.1161636720.27805.help-gnu-emacs@gnu.org>
@ 2006-10-24  8:54         ` Mathias Dahl
  2006-10-24 13:46           ` Drew Adams
  0 siblings, 1 reply; 33+ messages in thread
From: Mathias Dahl @ 2006-10-24  8:54 UTC (permalink / raw)


Baurzhan Ismagulov <ibr@radix50.net> writes:

> I see :) , let me rephrase: My problem isn't much the number of
> keystrokes, but an ability to repeat a simple command a certain
> number of times, just like C-x RET c <charset> RET
> <command>. Defining a macro for such a thing just seems to be an
> overkill.

I have to agree with this. Some years ago, when I was quite green with
Emacs and had just learnt how to use C-u together with different
commands, I naturally tried to use it together with yank to yank the
same text X number of times. To my surprise it did not work as I
expected. Of course I know why now, and the reason is that the yank
command interprets a numeric prefix command in a different way.
Personally I don't think I ever used that functionality in yank, that
is, being able to yank an older kill (I don't see how people can keep
track of the number of the kill they want, I rather use M-y after
doing C-y), although I am sure there are many who love this feature.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* RE: pasting many times
  2006-10-24  8:54         ` Mathias Dahl
@ 2006-10-24 13:46           ` Drew Adams
  2006-10-24 20:13             ` Dieter Wilhelm
  0 siblings, 1 reply; 33+ messages in thread
From: Drew Adams @ 2006-10-24 13:46 UTC (permalink / raw)


    > I see :) , let me rephrase: My problem isn't much the number of
    > keystrokes, but an ability to repeat a simple command a certain
    > number of times, just like C-x RET c <charset> RET
    > <command>. Defining a macro for such a thing just seems to be an
    > overkill.

    I have to agree with this. Some years ago, when I was quite green with
    Emacs and had just learnt how to use C-u together with different
    commands, I naturally tried to use it together with yank to yank the
    same text X number of times. To my surprise it did not work as I
    expected. Of course I know why now, and the reason is that the yank
    command interprets a numeric prefix command in a different way.
    Personally I don't think I ever used that functionality in yank, that
    is, being able to yank an older kill (I don't see how people can keep
    track of the number of the kill they want, I rather use M-y after
    doing C-y), although I am sure there are many who love this feature.

FWIW, I happen to agree with Mathias. If I want an earlier kill, I use C-y
M-y.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-23 21:15         ` Dieter Wilhelm
@ 2006-10-24 19:36           ` Baurzhan Ismagulov
  0 siblings, 0 replies; 33+ messages in thread
From: Baurzhan Ismagulov @ 2006-10-24 19:36 UTC (permalink / raw)


On Mon, Oct 23, 2006 at 11:15:20PM +0200, Dieter Wilhelm wrote:
> > I see :) , let me rephrase: My problem isn't much the number of
> > keystrokes, but an ability to repeat a simple command a certain number
> > of times, just like C-x RET c <charset> RET <command>. Defining a macro
> > for such a thing just seems to be an overkill.
> 
> C-x z (repeat) and then just zzzzzz (assuming Emacs 22.0.50).

Rephrasing again: the number of keystrokes is still important at the
second priority :) .


> No it isn't, M-5 9 C-y means that the command returns the 59th
> previous entry of the kill-ring list.
> 
> (length kill-ring)60
> M-100 C-y seems to circle through the kill-ring.

Uh. Does anyone actually use this? I personally don't remember the
previous entry, let alone the 59th previous. Once I killed a block and
forgot to yank it; then, I was able to recover it from the clipboard
buffer.


> Why on earth do you need to paste the same paragraph 59 fold?

Glossary markup in a DocBook document.


> maybe there is a better solution for the complete problem, maybe we
> could change something with C-M-% automagically?
> 
> Maybe it makes more sense to copy and edit the paragraphs more
> incrementally?

Couldn't think of anything like that, open to suggestions.


With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-24 13:46           ` Drew Adams
@ 2006-10-24 20:13             ` Dieter Wilhelm
  2006-10-24 20:22               ` Drew Adams
       [not found]               ` <mailman.210.1161721351.27805.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 33+ messages in thread
From: Dieter Wilhelm @ 2006-10-24 20:13 UTC (permalink / raw)
  Cc: help-gnu-emacs

"Drew Adams" <drew.adams@oracle.com> writes:
>
>     I have to agree with this. Some years ago, when I was quite green with
>     Emacs and had just learnt how to use C-u together with different
>     commands, I naturally tried to use it together with yank to yank the
>     same text X number of times. To my surprise it did not work as I
>     expected. Of course I know why now, and the reason is that the yank
>     command interprets a numeric prefix command in a different way.
>     Personally I don't think I ever used that functionality in yank, that
>     is, being able to yank an older kill (I don't see how people can keep
>     track of the number of the kill they want, I rather use M-y after
>     doing C-y), although I am sure there are many who love this feature.
>
> FWIW, I happen to agree with Mathias. If I want an earlier kill, I use C-y
> M-y.

FWIW, I agree with Drew C-y M-yyy... is the way to go for me since I
usually don't memorise the kill-ring by heart.

And when we are at it.  I do not understand why M-y depends on C-y at
all, lets just take the second entry of kill-ring by default and third
and fourth and so on?

Now we are already 4 forgetful people, could this be made into an
official feature request (for after the release ;-)?

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 33+ messages in thread

* RE: pasting many times
  2006-10-24 20:13             ` Dieter Wilhelm
@ 2006-10-24 20:22               ` Drew Adams
  2006-10-24 21:22                 ` Dieter Wilhelm
       [not found]               ` <mailman.210.1161721351.27805.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 33+ messages in thread
From: Drew Adams @ 2006-10-24 20:22 UTC (permalink / raw)


    > FWIW, I happen to agree with Mathias. If I want an earlier
    > kill, I use C-y M-y.

    FWIW, I agree with Drew C-y M-yyy... is the way to go for me since I
    usually don't memorise the kill-ring by heart.

    And when we are at it.  I do not understand why M-y depends on C-y at
    all, lets just take the second entry of kill-ring by default and third
    and fourth and so on?

    Now we are already 4 forgetful people, could this be made into an
    official feature request (for after the release ;-)?

There are no official feature requests. Bring it up at emacs-devel, to
possibly  discover good counter arguments and see what others think.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-24 20:22               ` Drew Adams
@ 2006-10-24 21:22                 ` Dieter Wilhelm
  0 siblings, 0 replies; 33+ messages in thread
From: Dieter Wilhelm @ 2006-10-24 21:22 UTC (permalink / raw)
  Cc: help-gnu-emacs

"Drew Adams" <drew.adams@oracle.com> writes:
>
>     Now we are already 4 forgetful people, could this be made into an
>     official feature request (for after the release ;-)?
>
> There are no official feature requests. Bring it up at emacs-devel, to
> possibly  discover good counter arguments and see what others think.

OK, I'm really curious, I'll let it brew some days here and then ask
emacs-devel.

Bye
-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 33+ messages in thread

* RE: pasting many times
@ 2006-10-25  7:45 Bourgneuf Francois
  2006-10-25 19:57 ` Eli Zaretskii
  0 siblings, 1 reply; 33+ messages in thread
From: Bourgneuf Francois @ 2006-10-25  7:45 UTC (permalink / raw)


 
I have downloaded browse-kill-ring (http://www.todesschaf.org/projects/bkr.html).
It allows you to browse all the kills you did and choose the one you want to yank.

After you installed it, you'll have to add the following lines in your .emacs :

(require 'browse-kill-ring)
(browse-kill-ring-default-keybindings)

Bour9



-----Message d'origine-----
De : help-gnu-emacs-bounces+francois.bourgneuf=groupe-mma.fr@gnu.org [mailto:help-gnu-emacs-bounces+francois.bourgneuf=groupe-mma.fr@gnu.org] De la part de Drew Adams
Envoyé : mardi 24 octobre 2006 22:22
À : help-gnu-emacs@gnu.org
Objet : RE: pasting many times

    > FWIW, I happen to agree with Mathias. If I want an earlier
    > kill, I use C-y M-y.

    FWIW, I agree with Drew C-y M-yyy... is the way to go for me since I
    usually don't memorise the kill-ring by heart.

    And when we are at it.  I do not understand why M-y depends on C-y at
    all, lets just take the second entry of kill-ring by default and third
    and fourth and so on?

    Now we are already 4 forgetful people, could this be made into an
    official feature request (for after the release ;-)?

There are no official feature requests. Bring it up at emacs-devel, to
possibly  discover good counter arguments and see what others think.



_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
       [not found] <mailman.227.1161762333.27805.help-gnu-emacs@gnu.org>
@ 2006-10-25  8:20 ` spamfilteraccount
  2006-10-25  9:13   ` Sam Peterson
  2006-10-25 15:22   ` Drew Adams
  2006-10-25 12:18 ` Florian Kaufmann
  1 sibling, 2 replies; 33+ messages in thread
From: spamfilteraccount @ 2006-10-25  8:20 UTC (permalink / raw)



Bourgneuf Francois wrote:
> I have downloaded browse-kill-ring (http://www.todesschaf.org/projects/bkr.html).
> It allows you to browse all the kills you did and choose the one you want to yank.
>
> After you installed it, you'll have to add the following lines in your .emacs :
>
> (require 'browse-kill-ring)
> (browse-kill-ring-default-keybindings)

browse-kill-ring is great, I use it myself. The only problem is it puts
the focus in the wrong window after yanking something into the
minibuffer.

Otherwise it works very well.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-25  8:20 ` spamfilteraccount
@ 2006-10-25  9:13   ` Sam Peterson
  2006-10-25 15:22   ` Drew Adams
  1 sibling, 0 replies; 33+ messages in thread
From: Sam Peterson @ 2006-10-25  9:13 UTC (permalink / raw)


>>>>> "spamfilteraccount" == spamfilteraccount writes:

    > Bourgneuf Francois wrote:
    >> I have downloaded browse-kill-ring
    >> (http://www.todesschaf.org/projects/bkr.html).  It allows you
    >> to browse all the kills you did and choose the one you want to
    >> yank.
    >> 
    >> After you installed it, you'll have to add the following lines
    >> in your .emacs :
    >> 
    >> (require 'browse-kill-ring)
    >> (browse-kill-ring-default-keybindings)

    > browse-kill-ring is great, I use it myself. The only problem is
    > it puts the focus in the wrong window after yanking something
    > into the minibuffer.

    > Otherwise it works very well.

It's an interesting package.  I've looked at it.  I think I still
prefer the simplicity of C-h v kill-ring RET.  Different strokes...

-- 
Sam Peterson
skpeterson At nospam ucdavis.edu
"if programmers were paid to remove code instead of adding it,
software would be much better" -- unknown

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
       [not found] <mailman.227.1161762333.27805.help-gnu-emacs@gnu.org>
  2006-10-25  8:20 ` spamfilteraccount
@ 2006-10-25 12:18 ` Florian Kaufmann
  2006-10-25 12:49   ` Holger Sparr
  1 sibling, 1 reply; 33+ messages in thread
From: Florian Kaufmann @ 2006-10-25 12:18 UTC (permalink / raw)


> I have downloaded browse-kill-ring (http://www.todesschaf.org/projects/bkr.html).
> It allows you to browse all the kills you did and choose the one you want to yank.

I still miss however a mode or feature or whatever that gives me about
the following functionality: I'd like to see the kill ring in a window.
Pretty much how browse-kill-ring does it. However automatically always
up to date and the entries of the ring enumerated. Then I could just
visually look at this window, easily see that the thing I want to yank
is say the 9th item in the ring, and then just use yank with an
argument of 9. I think this is still much faster and more convenient
than to browse through the kill ring, either with (yank-pop) M-y or
with browse-kill-ring-next.

Flo

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-25 12:18 ` Florian Kaufmann
@ 2006-10-25 12:49   ` Holger Sparr
  2006-10-25 14:21     ` Florian Kaufmann
  0 siblings, 1 reply; 33+ messages in thread
From: Holger Sparr @ 2006-10-25 12:49 UTC (permalink / raw)


On 25 Oct 2006, Florian Kaufmann wrote:

>> I have downloaded browse-kill-ring
>> (http://www.todesschaf.org/projects/bkr.html).  
>> It allows you to browse all the kills you did and choose the one you
>> want to yank.
> 
> I still miss however a mode or feature or whatever that gives me about
> the following functionality: I'd like to see the kill ring in a window.
> Pretty much how browse-kill-ring does it. However automatically always
> up to date and the entries of the ring enumerated. Then I could just
> visually look at this window, easily see that the thing I want to yank
> is say the 9th item in the ring, and then just use yank with an
> argument of 9. I think this is still much faster and more convenient
> than to browse through the kill ring, either with (yank-pop) M-y or
> with browse-kill-ring-next.
> 
> Flo

(I don't know if this works in any case. But it works as quick solution.)


You could redefine `browse-kill-ring-insert-as-separated' as follows:

(defun browse-kill-ring-insert-as-separated (items)
  (let ((count 0))
    (while (cdr items)
      (setq count (+ count 1))
      (insert (format "-- %s --" count) "\n")
      (browse-kill-ring-insert-as-separated-1 (car items) t)
      (setq items (cdr items))))
  (when items
    (browse-kill-ring-insert-as-separated-1 (car items) nil)))


Why keep the window all the time when you can easily bury it with one
key stroke - `q'? 

When calling `browse-kill-ring' again the "*Kill Ring*" buffer gets
updated already.


Holger

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-25 12:49   ` Holger Sparr
@ 2006-10-25 14:21     ` Florian Kaufmann
  2006-10-25 15:18       ` Holger Sparr
  0 siblings, 1 reply; 33+ messages in thread
From: Florian Kaufmann @ 2006-10-25 14:21 UTC (permalink / raw)


Thank you for the lisp code. I'll try it out.

> Why keep the window all the time when you can easily bury it with one
> key stroke - `q'?

I guess that's just my taste. When I have a task where I have to
kill/yank a lot of text I like to have the kill ring displayed all the
time. If it isn't displayed all the time, and I want to yank something
I killed earlier, I first have to display the buffer, then visually
search the item i want to yank. If its diplayed all the time, I
visually find the item I want much faster.

Flo

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-25 14:21     ` Florian Kaufmann
@ 2006-10-25 15:18       ` Holger Sparr
  2006-10-25 18:54         ` Colin S. Miller
  0 siblings, 1 reply; 33+ messages in thread
From: Holger Sparr @ 2006-10-25 15:18 UTC (permalink / raw)


On 25 Oct 2006, Florian Kaufmann wrote:

> Thank you for the lisp code. I'll try it out.
> 
>> Why keep the window all the time when you can easily bury it with one
>> key stroke - `q'?
> 
> I guess that's just my taste. When I have a task where I have to
> kill/yank a lot of text I like to have the kill ring displayed all the
> time. If it isn't displayed all the time, and I want to yank something
> I killed earlier, I first have to display the buffer, then visually
> search the item i want to yank. If its diplayed all the time, I
> visually find the item I want much faster.

Right.

One idea:

(add-hook '<appropriate-hook>   (lambda () (with-current-buffer "*Kill Ring*"
                                        (browse-kill-ring-update))))

but I have no clue which hook would serve you best. There does not seem
to be a hook like e.g. `post-kill-hook', or does it?


Holger

^ permalink raw reply	[flat|nested] 33+ messages in thread

* RE: pasting many times
  2006-10-25  8:20 ` spamfilteraccount
  2006-10-25  9:13   ` Sam Peterson
@ 2006-10-25 15:22   ` Drew Adams
  1 sibling, 0 replies; 33+ messages in thread
From: Drew Adams @ 2006-10-25 15:22 UTC (permalink / raw)


    > I have downloaded browse-kill-ring
    >(http://www.todesschaf.org/projects/bkr.html).
    > It allows you to browse all the kills you did and choose the
    > one you want to yank.
    >
    > After you installed it, you'll have to add the following
    > lines in your .emacs :
    >
    > (require 'browse-kill-ring)
    > (browse-kill-ring-default-keybindings)

browse-kill-ring+.el is a tiny extension to browse-kill-ring that defines a
toggle command and binds it to `t' in `browse-kill-ring-mode-map'. Lets you
toggle the display style between `separated' and `one-line'.

http://www.emacswiki.org/cgi-bin/wiki/browse-kill-ring%2b.el. You can also
get browse-kill-ring.el here:
http://www.emacswiki.org/cgi-bin/wiki/browse-kill-ring.el.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
       [not found]               ` <mailman.210.1161721351.27805.help-gnu-emacs@gnu.org>
@ 2006-10-25 18:09                 ` rgb
  2006-10-26 17:02                   ` Shanks N
       [not found]                   ` <mailman.281.1161883844.27805.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 33+ messages in thread
From: rgb @ 2006-10-25 18:09 UTC (permalink / raw)


Drew Adams wrote:
> > FWIW, I happen to agree with Mathias. If I want an earlier
>     > kill, I use C-y M-y.
>
>     FWIW, I agree with Drew C-y M-yyy... is the way to go for me since I
>     usually don't memorise the kill-ring by heart.

I too agree.  But for those who can remember such things...
Positive args can yank multiple times.
Negative args can retrieve prior kills.
Even if you *can* remember X number of kills you're not likely
to ever find it more convenient to yank the (kill-ring-max - n)th
entry (which isn't even documented to work anyway).

Yank can be changed like this:
;  (insert-for-yank (current-kill (cond
;        			  ((listp arg) 0)
;        			  ((eq arg '-) -2)
;        			  (t (1- arg)))))
  (cond
   ((listp arg) (insert-for-yank (current-kill 0)))
   ((eq arg '-) (insert-for-yank (current-kill -2)))
   ((> arg 0)   (dotimes (x arg) (insert-for-yank (current-kill 0))))
   (t (insert-for-yank (current-kill (- arg)))))

>
>     And when we are at it.  I do not understand why M-y depends on C-y at
>     all, lets just take the second entry of kill-ring by default and third
>     and fourth and so on?

Here here.

>     Now we are already 4 forgetful people, could this be made into an
>     official feature request (for after the release ;-)?

Make that 5.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-25 15:18       ` Holger Sparr
@ 2006-10-25 18:54         ` Colin S. Miller
  2006-10-26  7:49           ` Holger Sparr
  0 siblings, 1 reply; 33+ messages in thread
From: Colin S. Miller @ 2006-10-25 18:54 UTC (permalink / raw)


Holger Sparr wrote:
> On 25 Oct 2006, Florian Kaufmann wrote:
> 
>> Thank you for the lisp code. I'll try it out.
>>
>>> Why keep the window all the time when you can easily bury it with one
>>> key stroke - `q'?
>> I guess that's just my taste. When I have a task where I have to
>> kill/yank a lot of text I like to have the kill ring displayed all the
>> time. If it isn't displayed all the time, and I want to yank something
>> I killed earlier, I first have to display the buffer, then visually
>> search the item i want to yank. If its diplayed all the time, I
>> visually find the item I want much faster.
> 
> Right.
> 
> One idea:
> 
> (add-hook '<appropriate-hook>   (lambda () (with-current-buffer "*Kill Ring*"
>                                         (browse-kill-ring-update))))
> 
> but I have no clue which hook would serve you best. There does not seem
> to be a hook like e.g. `post-kill-hook', or does it?
> 
> 
> Holger
> 

Nasty hack -
use defadvice on kill-region et all
the advice function will use add-timer
to call browse-kill-ring-update
after a suitable delay (10 to 100ms)

HTH,
Colin S. Miller


-- 
Replace the obvious in my email address with the first three letters of the hostname to reply.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-25  7:45 Bourgneuf Francois
@ 2006-10-25 19:57 ` Eli Zaretskii
  0 siblings, 0 replies; 33+ messages in thread
From: Eli Zaretskii @ 2006-10-25 19:57 UTC (permalink / raw)


> Date: Wed, 25 Oct 2006 09:45:24 +0200
> From: "Bourgneuf Francois" <francois.bourgneuf@groupe-mma.fr>
>  
> I have downloaded browse-kill-ring (http://www.todesschaf.org/projects/bkr.html).
> It allows you to browse all the kills you did and choose the one you want to yank.

I presume you know about the "Edit->Select and Paste" menu item that's
available from the standard Emacs menu bar?  It allows you to do the
same.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-25 18:54         ` Colin S. Miller
@ 2006-10-26  7:49           ` Holger Sparr
  2006-10-26 18:24             ` Colin S. Miller
  0 siblings, 1 reply; 33+ messages in thread
From: Holger Sparr @ 2006-10-26  7:49 UTC (permalink / raw)


"Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk> writes:

> Holger Sparr wrote:
>> On 25 Oct 2006, Florian Kaufmann wrote:

[...]

>>> I guess that's just my taste. When I have a task where I have to
>>> kill/yank a lot of text I like to have the kill ring displayed all the
>>> time. If it isn't displayed all the time, and I want to yank something
>>> I killed earlier, I first have to display the buffer, then visually
>>> search the item i want to yank. If its diplayed all the time, I
>>> visually find the item I want much faster.
>>
>> Right.
>>
>> One idea:
>>
>> (add-hook '<appropriate-hook> (lambda () (with-current-buffer "*Kill Ring*"
>>                                         (browse-kill-ring-update))))
>>
>> but I have no clue which hook would serve you best. There does not seem
>> to be a hook like e.g. `post-kill-hook', or does it?

[...]

> Nasty hack -
> use defadvice on kill-region et all
> the advice function will use add-timer
> to call browse-kill-ring-update
> after a suitable delay (10 to 100ms)

Does `kill-region' change the the `kill-ring' exclusively?

Holger

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-25 18:09                 ` rgb
@ 2006-10-26 17:02                   ` Shanks N
       [not found]                   ` <mailman.281.1161883844.27805.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 33+ messages in thread
From: Shanks N @ 2006-10-26 17:02 UTC (permalink / raw)


"rgb" <rbielaws@i1.net> writes:

> Drew Adams wrote:
>> > FWIW, I happen to agree with Mathias. If I want an earlier
>>     > kill, I use C-y M-y.
>>

[...]

>>     And when we are at it.  I do not understand why M-y depends on C-y at
>>     all, lets just take the second entry of kill-ring by default and third
>>     and fourth and so on?
>
> Here here.
>

I'm curious to know why too.


>>     Now we are already 4 forgetful people, could this be made into an
>>     official feature request (for after the release ;-)?
>
> Make that 5.

Add another here.

shanks

--

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
       [not found]                   ` <mailman.281.1161883844.27805.help-gnu-emacs@gnu.org>
@ 2006-10-26 17:49                     ` David Kastrup
  2006-10-27 17:39                       ` Dieter Wilhelm
  2006-10-27 19:09                       ` Sam Peterson
  0 siblings, 2 replies; 33+ messages in thread
From: David Kastrup @ 2006-10-26 17:49 UTC (permalink / raw)


Shanks N <shanks.n@gmail.com> writes:

> "rgb" <rbielaws@i1.net> writes:
>
>> Drew Adams wrote:
>>> > FWIW, I happen to agree with Mathias. If I want an earlier
>>>     > kill, I use C-y M-y.
>>>
>
> [...]
>
>>>     And when we are at it.  I do not understand why M-y depends on C-y at
>>>     all, lets just take the second entry of kill-ring by default and third
>>>     and fourth and so on?
>>
>> Here here.
>>
>
> I'm curious to know why too.

I'd start M-y with the first entry of the kill-ring.  It would
probably make M-y more popular than C-y, but people might learn to
live with that.  It would probably also make sense to have C-y accept
a multiplier argument (probably more expected) while letting M-y
accept a stack pointer argument.

So if you were certain to need only the most recent kill, you'd use
C-y, and if you _might_ want a different kill, you'd use M-y.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-26  7:49           ` Holger Sparr
@ 2006-10-26 18:24             ` Colin S. Miller
  2006-10-27  7:42               ` Holger Sparr
  0 siblings, 1 reply; 33+ messages in thread
From: Colin S. Miller @ 2006-10-26 18:24 UTC (permalink / raw)


Holger Sparr wrote:
> "Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk> writes:
> 
>> Nasty hack -
>> use defadvice on kill-region et all
>> the advice function will use add-timer
>> to call browse-kill-ring-update
>> after a suitable delay (10 to 100ms)
> 
> Does `kill-region' change the the `kill-ring' exclusively?
> 
> Holger
Holger,

There are other functions that will, including

copy-region-as-kill
(backwords-(or-forwards)?)?-kill-(word|line|paragraph|sexp|region)
kill-(append|comment|kill-entire-line|forwards-chars|new|rectangle|region|sentence|sexp|word)
x-mouse-kill

and probably some others.

HTH,
Colin S. Miller




-- 
Replace the obvious in my email address with the first three letters of the hostname to reply.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-26 18:24             ` Colin S. Miller
@ 2006-10-27  7:42               ` Holger Sparr
  2006-10-28  5:17                 ` don provan
  0 siblings, 1 reply; 33+ messages in thread
From: Holger Sparr @ 2006-10-27  7:42 UTC (permalink / raw)


On Thu, 26 Oct 2006, "Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk> wrote:

> Holger Sparr wrote:
>> "Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk> writes:
>>
>>> Nasty hack -
>>> use defadvice on kill-region et all
>>> the advice function will use add-timer
>>> to call browse-kill-ring-update
>>> after a suitable delay (10 to 100ms)
>>
>> Does `kill-region' change the the `kill-ring' exclusively?
>
> There are other functions that will, including
>
> copy-region-as-kill
> (backwords-(or-forwards)?)?-kill-(word|line|paragraph|sexp|region)
> kill-(append|comment|kill-entire-line|forwards-chars|new|rectangle|region|sentence|sexp|word)
> x-mouse-kill
>
> and probably some others.

That's my point. Then a defadvice on kill-region is not sufficient.

Holger

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-26 17:49                     ` David Kastrup
@ 2006-10-27 17:39                       ` Dieter Wilhelm
  2006-10-27 19:09                       ` Sam Peterson
  1 sibling, 0 replies; 33+ messages in thread
From: Dieter Wilhelm @ 2006-10-27 17:39 UTC (permalink / raw)
  Cc: help-gnu-emacs

David Kastrup <dak@gnu.org> writes:

...

>>>>     And when we are at it.  I do not understand why M-y depends on C-y at
>>>>     all, lets just take the second entry of kill-ring by default and third
>>>>     and fourth and so on?
>>>
> I'd start M-y with the first entry of the kill-ring.  It would
> probably make M-y more popular than C-y, but people might learn to
> live with that.  It would probably also make sense to have C-y accept
> a multiplier argument (probably more expected) while letting M-y
> accept a stack pointer argument.

It might be more consistent with Emacs conventions but I suggest this
because we are getting more functionality and yet the users is getting
a smoother transition from the previous definition.

Are you concerned because of the default interactive argument which is
1?  Hmm, couldn't we apply the c counting convention for the kill
ring: 0 is the current kill (the first entry) 1 the previous one and
so on?  It is just a matter of the proper documentation, isn't it?

>
> So if you were certain to need only the most recent kill, you'd use
> C-y, and if you _might_ want a different kill, you'd use M-y.

Exactly, so far I can only discern an extension of functionality and
no disadvantages compared to the current handling of C-y and M-y.

Let's see what happens now in Baurzhan's case:

You press the C-key for the interactive arguments (they work with C-
as well with M-) then 59 and then y.  This means 4 key presses
compared to vim's 5 (ESC 59p i).  (OK, this is the worst case for vim
but I guess statistically it'd be a draw between the two editors 8-)

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-26 17:49                     ` David Kastrup
  2006-10-27 17:39                       ` Dieter Wilhelm
@ 2006-10-27 19:09                       ` Sam Peterson
  1 sibling, 0 replies; 33+ messages in thread
From: Sam Peterson @ 2006-10-27 19:09 UTC (permalink / raw)



David Kastrup wrote:

> I'd start M-y with the first entry of the kill-ring.  It would
> probably make M-y more popular than C-y, but people might learn to
> live with that.  It would probably also make sense to have C-y
> accept a multiplier argument (probably more expected) while letting
> M-y accept a stack pointer argument.
> 
> So if you were certain to need only the most recent kill, you'd use
> C-y, and if you _might_ want a different kill, you'd use M-y.

I completely agree with this.  It's intuitive, it makes sense.  What
would it take to implement it?

-- 
Sam Peterson
skpeterson At nospam ucdavis.edu
"if programmers were paid to remove code instead of adding it,
software would be much better" -- unknown

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-27  7:42               ` Holger Sparr
@ 2006-10-28  5:17                 ` don provan
  2006-10-28 10:13                   ` Colin S. Miller
  0 siblings, 1 reply; 33+ messages in thread
From: don provan @ 2006-10-28  5:17 UTC (permalink / raw)


Holger Sparr <sparr+usenet@mfk.tu-dresden.de> writes:

> On Thu, 26 Oct 2006, "Colin S. Miller"
>  <no-spam-thank-you@csmiller.demon.co.uk> wrote:
>
>> Holger Sparr wrote:
>>>
>>> Does `kill-region' change the the `kill-ring' exclusively?
>>
>> There are other functions that will, including
>>...
>
> That's my point. Then a defadvice on kill-region is not sufficient.

I feel like I'm missing something, but are you guys looking for
kill-new? It's the only function that adds to the kill ring:
everything else calls it.
-don

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: pasting many times
  2006-10-28  5:17                 ` don provan
@ 2006-10-28 10:13                   ` Colin S. Miller
  0 siblings, 0 replies; 33+ messages in thread
From: Colin S. Miller @ 2006-10-28 10:13 UTC (permalink / raw)


don provan wrote:
> Holger Sparr <sparr+usenet@mfk.tu-dresden.de> writes:
> 
>> On Thu, 26 Oct 2006, "Colin S. Miller"
>>  <no-spam-thank-you@csmiller.demon.co.uk> wrote:
>>
>>> Holger Sparr wrote:
>>>> Does `kill-region' change the the `kill-ring' exclusively?
>>> There are other functions that will, including
>>> ...
>> That's my point. Then a defadvice on kill-region is not sufficient.
> 
> I feel like I'm missing something, but are you guys looking for
> kill-new? It's the only function that adds to the kill ring:
> everything else calls it.
> -don
Don,

Sweet. It even has a hook, kill-hook, which we can use to refresh
the kill history buffer.

Colin.



-- 
Replace the obvious in my email address with the first three letters of the hostname to reply.

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2006-10-28 10:13 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.157.1161613927.27805.help-gnu-emacs@gnu.org>
2006-10-23 15:31 ` pasting many times Holger Sparr
2006-10-23 16:14   ` Baurzhan Ismagulov
2006-10-23 19:55     ` Dieter Wilhelm
2006-10-23 20:52       ` Baurzhan Ismagulov
2006-10-23 21:15         ` Dieter Wilhelm
2006-10-24 19:36           ` Baurzhan Ismagulov
     [not found]       ` <mailman.179.1161636720.27805.help-gnu-emacs@gnu.org>
2006-10-24  8:54         ` Mathias Dahl
2006-10-24 13:46           ` Drew Adams
2006-10-24 20:13             ` Dieter Wilhelm
2006-10-24 20:22               ` Drew Adams
2006-10-24 21:22                 ` Dieter Wilhelm
     [not found]               ` <mailman.210.1161721351.27805.help-gnu-emacs@gnu.org>
2006-10-25 18:09                 ` rgb
2006-10-26 17:02                   ` Shanks N
     [not found]                   ` <mailman.281.1161883844.27805.help-gnu-emacs@gnu.org>
2006-10-26 17:49                     ` David Kastrup
2006-10-27 17:39                       ` Dieter Wilhelm
2006-10-27 19:09                       ` Sam Peterson
     [not found]     ` <mailman.171.1161633348.27805.help-gnu-emacs@gnu.org>
2006-10-24  6:03       ` Holger Sparr
     [not found] <mailman.227.1161762333.27805.help-gnu-emacs@gnu.org>
2006-10-25  8:20 ` spamfilteraccount
2006-10-25  9:13   ` Sam Peterson
2006-10-25 15:22   ` Drew Adams
2006-10-25 12:18 ` Florian Kaufmann
2006-10-25 12:49   ` Holger Sparr
2006-10-25 14:21     ` Florian Kaufmann
2006-10-25 15:18       ` Holger Sparr
2006-10-25 18:54         ` Colin S. Miller
2006-10-26  7:49           ` Holger Sparr
2006-10-26 18:24             ` Colin S. Miller
2006-10-27  7:42               ` Holger Sparr
2006-10-28  5:17                 ` don provan
2006-10-28 10:13                   ` Colin S. Miller
2006-10-25  7:45 Bourgneuf Francois
2006-10-25 19:57 ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2006-10-23 14:32 Baurzhan Ismagulov

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.