* doing an Occur in an Occur buffer
@ 2004-01-12 1:58 Dan Jacobson
0 siblings, 0 replies; 3+ messages in thread
From: Dan Jacobson @ 2004-01-12 1:58 UTC (permalink / raw)
There should be some protection from doing an Occur in an Occur
buffer, trying to whittle down matches, instead blowing it away.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: doing an Occur in an Occur buffer
[not found] <mailman.724.1074202514.928.bug-gnu-emacs@gnu.org>
@ 2004-01-15 22:53 ` Kevin Rodgers
[not found] ` <mailman.734.1074210562.928.bug-gnu-emacs@gnu.org>
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2004-01-15 22:53 UTC (permalink / raw)
Dan Jacobson wrote:
> There should be some protection from doing an Occur in an Occur
> buffer, trying to whittle down matches, instead blowing it away.
(defadvice occur (around occur-buffer-warning activate)
(if (and (interactive-p)
(equal (buffer-name) "*Occur*")
(yes-or-no-p "Running `occur' in the *Occur* buffer will lose \
its contents; proceed anyway?" ))
ad-do-it))
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: doing an Occur in an Occur buffer
[not found] ` <mailman.734.1074210562.928.bug-gnu-emacs@gnu.org>
@ 2004-01-16 16:44 ` Kevin Rodgers
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2004-01-16 16:44 UTC (permalink / raw)
Kevin Rodgers wrote:
> Dan Jacobson wrote:
>
>> There should be some protection from doing an Occur in an Occur
>> buffer, trying to whittle down matches, instead blowing it away.
>
> (defadvice occur (around occur-buffer-warning activate)
> (if (and (interactive-p)
> (equal (buffer-name) "*Occur*")
> (yes-or-no-p "Running `occur' in the *Occur* buffer will lose \
> its contents; proceed anyway?" ))
> ad-do-it))
Oops, that should be
(if (or (not (interactive-p))
(not (equal (buffer-name) "*Occur*"))
(yes-or-no-p "Running `occur' in the *Occur* buffer will lose \
its contents; proceed anyway?" ))
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-01-16 16:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-12 1:58 doing an Occur in an Occur buffer Dan Jacobson
[not found] <mailman.724.1074202514.928.bug-gnu-emacs@gnu.org>
2004-01-15 22:53 ` Kevin Rodgers
[not found] ` <mailman.734.1074210562.928.bug-gnu-emacs@gnu.org>
2004-01-16 16:44 ` Kevin Rodgers
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.