all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Kill ring question
@ 2007-11-27 13:30 Ke Lu
  2007-11-27 14:15 ` Peter Dyballa
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ke Lu @ 2007-11-27 13:30 UTC (permalink / raw)
  To: help-gnu-emacs

Is there any way to switch kill ring/delete?
In some case, I just want delete text, not kill.

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

* Re: Kill ring question
  2007-11-27 13:30 Kill ring question Ke Lu
@ 2007-11-27 14:15 ` Peter Dyballa
       [not found] ` <mailman.4177.1196173021.18990.help-gnu-emacs@gnu.org>
  2007-11-27 14:57 ` Bastien
  2 siblings, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2007-11-27 14:15 UTC (permalink / raw)
  To: Ke Lu; +Cc: help-gnu-emacs


Am 27.11.2007 um 14:30 schrieb Ke Lu:

> In some case, I just want delete text, not kill.


	M-x delete-region

or

	C-u <number> BS

--
Greetings

   Pete

"I love deadlines. I love the whooshing noise they make as they go by."
                                            (Douglas Adams)

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

* Re: Kill ring question
       [not found] ` <mailman.4177.1196173021.18990.help-gnu-emacs@gnu.org>
@ 2007-11-27 14:25   ` David Kastrup
  2007-11-27 15:18     ` Peter Dyballa
       [not found]     ` <mailman.4181.1196176718.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: David Kastrup @ 2007-11-27 14:25 UTC (permalink / raw)
  To: help-gnu-emacs

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Am 27.11.2007 um 14:30 schrieb Ke Lu:
>
>> In some case, I just want delete text, not kill.
>
>
> 	M-x delete-region
>
> or
>
> 	C-u <number> BS

The latter does not help:

DEL (translated from <backspace>) runs the command delete-backward-char
  which is an interactive built-in function in `C source code'.
It is bound to DEL.
(delete-backward-char N &optional KILLFLAG)

Delete the previous N characters (following if N is negative).
Optional second arg KILLFLAG non-nil means kill instead (save in kill ring).
Interactively, N is the prefix arg, and KILLFLAG is set if
N was explicitly specified.


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: Kill ring question
  2007-11-27 13:30 Kill ring question Ke Lu
  2007-11-27 14:15 ` Peter Dyballa
       [not found] ` <mailman.4177.1196173021.18990.help-gnu-emacs@gnu.org>
@ 2007-11-27 14:57 ` Bastien
  2 siblings, 0 replies; 9+ messages in thread
From: Bastien @ 2007-11-27 14:57 UTC (permalink / raw)
  To: help-gnu-emacs

Ke Lu <lu@luxdo.jp> writes:

> Is there any way to switch kill ring/delete?
> In some case, I just want delete text, not kill.

I would rather add a key for this, not toggling delete/kill:

  (global-set-key (kbd "C-S-w") 'delete-region)

-- 
Bastien

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

* Re: Kill ring question
  2007-11-27 14:25   ` David Kastrup
@ 2007-11-27 15:18     ` Peter Dyballa
       [not found]     ` <mailman.4181.1196176718.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2007-11-27 15:18 UTC (permalink / raw)
  To: David Kastrup; +Cc: help-gnu-emacs


Am 27.11.2007 um 15:25 schrieb David Kastrup:

> Delete the previous N characters (following if N is negative).
> Optional second arg KILLFLAG non-nil means kill instead (save in  
> kill ring).
> Interactively, N is the prefix arg, and KILLFLAG is set if
> N was explicitly specified.

Indeed ... Strange behaviour, anyway. Does it come from a time when  
GNU Emacs did not have undo?

--
Mit friedvollen Grüßen

   Pete     === -Q
              ==<__/% >>
_____________(_)____@_____________________________

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

* Re: Kill ring question
       [not found]     ` <mailman.4181.1196176718.18990.help-gnu-emacs@gnu.org>
@ 2007-11-28  0:07       ` Ke Lu
  2007-11-28 12:05         ` Ke Lu
  0 siblings, 1 reply; 9+ messages in thread
From: Ke Lu @ 2007-11-28  0:07 UTC (permalink / raw)
  To: help-gnu-emacs

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Am 27.11.2007 um 15:25 schrieb David Kastrup:
>
>> Delete the previous N characters (following if N is negative).
>> Optional second arg KILLFLAG non-nil means kill instead (save in  kill ring).
>> Interactively, N is the prefix arg, and KILLFLAG is set if
>> N was explicitly specified.
>
> Indeed ... Strange behaviour, anyway. Does it come from a time when  GNU Emacs
> did not have undo?
>
> --
> Mit friedvollen Grüßen
>
>   Pete     === -Q
>              ==<__/% >>
> _____________(_)____@_____________________________

Thanks all.
I use viper, and sometimes I don't want de, d%, d$, ce, c%, c$ .etc
killring text, I just want delete text of change text,
Is there any switch to do it?

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

* Re: Kill ring question
  2007-11-28  0:07       ` Ke Lu
@ 2007-11-28 12:05         ` Ke Lu
  2007-11-28 16:32           ` Peter Dyballa
       [not found]           ` <mailman.4260.1196267695.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Ke Lu @ 2007-11-28 12:05 UTC (permalink / raw)
  To: help-gnu-emacs

Ke Lu <lu@luxdo.jp> writes:

> Peter Dyballa <Peter_Dyballa@Web.DE> writes:
>
>> Am 27.11.2007 um 15:25 schrieb David Kastrup:
>>
>>> Delete the previous N characters (following if N is negative).
>>> Optional second arg KILLFLAG non-nil means kill instead (save in  kill ring).
>>> Interactively, N is the prefix arg, and KILLFLAG is set if
>>> N was explicitly specified.
>>
>> Indeed ... Strange behaviour, anyway. Does it come from a time when  GNU Emacs
>> did not have undo?
>>
>> --
>> Mit friedvollen Grüßen
>>
>>   Pete     === -Q
>>              ==<__/% >>
>> _____________(_)____@_____________________________
>
> Thanks all.
> I use viper, and sometimes I don't want de, d%, d$, ce, c%, c$ .etc
> killring text, I just want delete text of change text,
> Is there any switch to do it?

I Can't get any more ideas, So the only thing I can do is

;; Add to .emacs
(global-set-key (kbd "C-S-k")
  (lambda ()
    (interactive)
    (if mark-active
        (progn
          (delete-region (region-beginning) (region-end))
          )
      (call-interactively 'mark-word)
      (delete-region (region-beginning) (region-end))
      )))

;; add to .viper     
(define-key viper-vi-global-user-map "K"
  (lambda ()
    (interactive)
    (if mark-active
        (progn
          (delete-region (region-beginning) (region-end))
          )
      (call-interactively 'mark-word)
      (delete-region (region-beginning) (region-end))
      )))

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

* Re: Kill ring question
  2007-11-28 12:05         ` Ke Lu
@ 2007-11-28 16:32           ` Peter Dyballa
       [not found]           ` <mailman.4260.1196267695.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2007-11-28 16:32 UTC (permalink / raw)
  To: Ke Lu; +Cc: help-gnu-emacs


Am 28.11.2007 um 13:05 schrieb Ke Lu:

> I Can't get any more ideas, So the only thing I can do is


Why not define your clean function once and use only its name when  
binding it to keys?

--
Greetings

   Pete       (:
         _    / __    -    -
       _/ \__/_/        -     -
      (´`)      (´`)   -    -
       `´        `´

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

* Re: Kill ring question
       [not found]           ` <mailman.4260.1196267695.18990.help-gnu-emacs@gnu.org>
@ 2007-11-28 23:52             ` Ke Lu
  0 siblings, 0 replies; 9+ messages in thread
From: Ke Lu @ 2007-11-28 23:52 UTC (permalink / raw)
  To: help-gnu-emacs

It's quite right, I forgot it.
Thank you.

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Am 28.11.2007 um 13:05 schrieb Ke Lu:
>
>> I Can't get any more ideas, So the only thing I can do is
>
>
> Why not define your clean function once and use only its name when  binding it
> to keys?
>
> --
> Greetings
>
>   Pete       (:
>         _    / __    -    -
>       _/ \__/_/        -     -
>      (´`)      (´`)   -    -
>       `´        `´

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

end of thread, other threads:[~2007-11-28 23:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-27 13:30 Kill ring question Ke Lu
2007-11-27 14:15 ` Peter Dyballa
     [not found] ` <mailman.4177.1196173021.18990.help-gnu-emacs@gnu.org>
2007-11-27 14:25   ` David Kastrup
2007-11-27 15:18     ` Peter Dyballa
     [not found]     ` <mailman.4181.1196176718.18990.help-gnu-emacs@gnu.org>
2007-11-28  0:07       ` Ke Lu
2007-11-28 12:05         ` Ke Lu
2007-11-28 16:32           ` Peter Dyballa
     [not found]           ` <mailman.4260.1196267695.18990.help-gnu-emacs@gnu.org>
2007-11-28 23:52             ` Ke Lu
2007-11-27 14:57 ` Bastien

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.