all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: how to avoid filling KILL RING with junk
       [not found] <slrnaohrn5.les.ignoramus6776@nospam.invalid>
@ 2002-09-18 22:19 ` Barry Margolin
  2002-09-23 15:33   ` Deepak Dinesh
  2002-09-20  8:35 ` Mac
  1 sibling, 1 reply; 5+ messages in thread
From: Barry Margolin @ 2002-09-18 22:19 UTC (permalink / raw)


In article <slrnaohrn5.les.ignoramus6776@nospam.invalid>,
Igor6776 <ignoramus6776@NOSPAM.6776.invalid> wrote:
>When I delete words and regions in my xemacs 21.4, it puts theninto the
>kill ring.

Most users consider this a good thing.  It makes it easy to get things back
that you delete, although I suppose the advent of unlimited undo's has made
this less important than it was in the old days.

>I would like to NOT do that and only add stuff to the kill ring that I
>select with 
>\C-w or M-w.
>
>
>how can I do it.

I don't think there's a built-in option for this.  You could advise all the
commands that you don't want to save, with something like

(defconst disable-kill-ring-advice
  (ad-make-advice 'disable-kill-ring nil t
		  '(advice lambda ()
			   (let ((kill-ring nil))
			     ad-do-it))))

(defun disable-kill-ring (function)
  (ad-add-advice function disable-kill-ring-advice 'around 'first))

(mapc 'disable-kill-ring '(kill-word backward-kill-word kill-line ...))

-- 
Barry Margolin, barmar@genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

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

* Re: how to avoid filling KILL RING with junk
       [not found] <slrnaohrn5.les.ignoramus6776@nospam.invalid>
  2002-09-18 22:19 ` how to avoid filling KILL RING with junk Barry Margolin
@ 2002-09-20  8:35 ` Mac
  2002-09-30 15:04   ` Joe Casadonte
  1 sibling, 1 reply; 5+ messages in thread
From: Mac @ 2002-09-20  8:35 UTC (permalink / raw)


On 18 Sep 2002, ignoramus6776@NOSPAM.6776.invalid wrote:
> When I delete words and regions in my xemacs 21.4, it puts theninto
> the kill ring.

You did not 'delete' but 'killed' ;-)

See delete-region vs kill-region.

But I'm afraid that there's no built in delete-word in Emacs.

Don't know anything about xemacs.

/mac

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

* Re: how to avoid filling KILL RING with junk
  2002-09-18 22:19 ` how to avoid filling KILL RING with junk Barry Margolin
@ 2002-09-23 15:33   ` Deepak Dinesh
  2002-09-23 23:36     ` Barry Margolin
  0 siblings, 1 reply; 5+ messages in thread
From: Deepak Dinesh @ 2002-09-23 15:33 UTC (permalink / raw)


Barry Margolin <barmar@genuity.net> writes:

> In article <slrnaohrn5.les.ignoramus6776@nospam.invalid>,
> Igor6776 <ignoramus6776@NOSPAM.6776.invalid> wrote:
> >When I delete words and regions in my xemacs 21.4, it puts theninto the
> >kill ring.
> 
> Most users consider this a good thing.  It makes it easy to get things back
> that you delete, although I suppose the advent of unlimited undo's has made
> this less important than it was in the old days.


What about the mini-buffer window?  I don't think anyone wants to use
killed words from that in any of the main buffers.  Is there any way
to turn that off?

DD
-- 
Please reply to the newsgroup. If you are sending direct email,
include 22489775 somewhere in the subject or leave this sig intact.

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

* Re: how to avoid filling KILL RING with junk
  2002-09-23 15:33   ` Deepak Dinesh
@ 2002-09-23 23:36     ` Barry Margolin
  0 siblings, 0 replies; 5+ messages in thread
From: Barry Margolin @ 2002-09-23 23:36 UTC (permalink / raw)


In article <m2sn00vhyn.fsf@localhost.purdue.edu>,
Deepak Dinesh  <sigserv@yahoo.com> wrote:
>Barry Margolin <barmar@genuity.net> writes:
>
>> In article <slrnaohrn5.les.ignoramus6776@nospam.invalid>,
>> Igor6776 <ignoramus6776@NOSPAM.6776.invalid> wrote:
>> >When I delete words and regions in my xemacs 21.4, it puts theninto the
>> >kill ring.
>> 
>> Most users consider this a good thing.  It makes it easy to get things back
>> that you delete, although I suppose the advent of unlimited undo's has made
>> this less important than it was in the old days.
>
>
>What about the mini-buffer window?  I don't think anyone wants to use
>killed words from that in any of the main buffers.  Is there any way
>to turn that off?

Actually, I sometimes do.  For instance, an easy way to get the filename of
the current buffer into the file is with:

C-x C-v C-k C-g C-y

Also, when doing things like query-replace, I'm very likely to do some
kills while typing the old string and yank them into the new string.

-- 
Barry Margolin, barmar@genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

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

* Re: how to avoid filling KILL RING with junk
  2002-09-20  8:35 ` Mac
@ 2002-09-30 15:04   ` Joe Casadonte
  0 siblings, 0 replies; 5+ messages in thread
From: Joe Casadonte @ 2002-09-30 15:04 UTC (permalink / raw)


On Fri, 20 Sep 2002, stray_searcher@hotmail.com wrote:

> On 18 Sep 2002, ignoramus6776@NOSPAM.6776.invalid wrote:
>> When I delete words and regions in my xemacs 21.4, it puts theninto
>> the kill ring.
>
> You did not 'delete' but 'killed' ;-)
>
> See delete-region vs kill-region.
>
> But I'm afraid that there's no built in delete-word in Emacs.

It's not built-in, but this should do the trick:

(defun my-delete-word (arg)
  "Delete characters forward until encountering the end of a word.

With prefix argument ARG, do this that many times."
  (interactive "p")
  (delete-region (point) (progn (forward-word arg) (point))))


(defun my-backwards-delete-word (arg)
  "Delete characters backward until encountering the end of a word.

With prefix argument ARG, do this that many times."
  (interactive "p")
  (my-delete-word (- arg)))

Bind to keys of your choice and have a blast.

--
Regards,

joe
Joe Casadonte
jcasadonte@northbound-train.com

------------------------------------------------------------------------------
         Llama Fresh Farms => http://www.northbound-train.com
   Gay Media Resource List => http://www.northbound-train.com/gaymedia.html
            Perl for Win32 => http://www.northbound-train.com/perlwin32.html
               Emacs Stuff => http://www.northbound-train.com/emacs.html
          Music CD Trading => http://www.northbound-train.com/cdr.html
------------------------------------------------------------------------------
                       Live Free, that's the message!
------------------------------------------------------------------------------

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

end of thread, other threads:[~2002-09-30 15:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <slrnaohrn5.les.ignoramus6776@nospam.invalid>
2002-09-18 22:19 ` how to avoid filling KILL RING with junk Barry Margolin
2002-09-23 15:33   ` Deepak Dinesh
2002-09-23 23:36     ` Barry Margolin
2002-09-20  8:35 ` Mac
2002-09-30 15:04   ` Joe Casadonte

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.