unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Sam Steingold <sds@gnu.org>
Cc: "'Emacs Developers'" <emacs-devel@gnu.org>
Subject: Re: *Occur in buf*?
Date: 25 Jul 2002 09:42:16 -0400	[thread overview]
Message-ID: <sa08z3zc4av.fsf@glip.premonitia.com> (raw)
In-Reply-To: <FC3DA3DC8D4AD311AB910020352A8FDC1075509A@eagle.midas-kapiti.com>

> * In message <FC3DA3DC8D4AD311AB910020352A8FDC1075509A@eagle.midas-kapiti.com>
> * On the subject of "*Occur in buf*?"
> * Sent on Thu, 25 Jul 2002 11:05:41 +0100
> * Honorable "Marshall, Simon" <simon.marshall@misys.com> writes:
>
> IWBNI M-x occur created an *Occur in buf* buffer so that I wouldn't have
> to do this, rather than *Occur*.

I like your idea.
unless there are objections, I will install the appended patch.

(the key bindings are slightly changed too).

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
A poet who reads his verse in public may have other nasty habits.


--- replace.el.~1.152.~	Fri Jul 19 04:11:46 2002
+++ replace.el	Thu Jul 25 09:40:06 2002
@@ -453,7 +453,8 @@
     (define-key map "\M-n" 'occur-next)
     (define-key map "\M-p" 'occur-prev)
     (define-key map "g" 'revert-buffer)
-    (define-key map "q" 'delete-window)
+    (define-key map "q" 'quit-window)
+    (define-key map "z" 'kill-this-buffer)
     map)
   "Keymap for `occur-mode'.")
 
@@ -633,14 +634,15 @@
 NLINES defaults to `list-matching-lines-default-context-lines'.
 Interactively it is the prefix arg.
 
-The lines are shown in a buffer named `*Occur*'.
+The lines are shown in a buffer named `*Occur:buf-name*'.
 It serves as a menu to find any of the occurrences in this buffer.
 \\<occur-mode-map>\\[describe-mode] in that buffer will explain how.
 
 If REGEXP contains upper case characters (excluding those preceded by `\\'),
 the matching is case-sensitive."
   (interactive (occur-read-primary-args))
-  (occur-1 regexp nlines (list (current-buffer))))
+  (occur-1 regexp nlines (list (current-buffer))
+           (concat "*Occur:" (buffer-name) "*")))
 
 (defun multi-occur (bufs regexp &optional nlines)
   "Show all lines in buffers BUFS containing a match for REGEXP.
@@ -658,7 +660,8 @@
 	(push buf bufs))
       (nreverse (mapcar #'get-buffer bufs)))
     (occur-read-primary-args)))
-  (occur-1 regexp nlines bufs))
+  (occur-1 regexp nlines bufs
+           (concat "*Occur:" (mapconcat #'buffer-name bufs "/") "*")))
 
 (defun multi-occur-by-filename-regexp (bufregexp regexp &optional nlines)
   "Show all lines matching REGEXP in buffers named by BUFREGEXP.
@@ -685,7 +688,8 @@
 					(string-match bufregexp
 						      (buffer-file-name buf)))
 			       buf))
-			   (buffer-list))))))
+			   (buffer-list)))
+             (concat "*Occur:" regexp "*"))))
 
 (defun occur-1 (regexp nlines bufs &optional buf-name)
   (unless buf-name

  reply	other threads:[~2002-07-25 13:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-25 10:05 *Occur in buf*? Marshall, Simon
2002-07-25 13:42 ` Sam Steingold [this message]
2002-07-25 14:37   ` Miles Bader
2002-07-25 15:01     ` Sam Steingold
2002-07-26 15:36       ` Richard Stallman
2002-07-26 19:53         ` Sam Steingold
2002-07-26 15:36 ` Richard Stallman
2002-07-26 17:53   ` Benjamin Rutt
2002-07-28  0:15   ` Kim F. Storm
2002-07-28  1:10     ` Miles Bader
2002-07-29  8:31       ` Kim F. Storm
2002-07-30 14:20         ` Sam Steingold
2002-07-31  1:36           ` Miles Bader
2002-07-31  5:54           ` Richard Stallman
2002-07-31 15:33             ` Sam Steingold
2002-08-09  7:32           ` Stefan Monnier
2002-08-09  7:34       ` Stefan Monnier
2002-07-29  1:42     ` Miles Bader
  -- strict thread matches above, loose matches on Subject: below --
2002-07-25 16:07 Marshall, Simon
2002-07-25 18:46 ` Robert J. Chassell
2002-07-29 13:52 Marshall, Simon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sa08z3zc4av.fsf@glip.premonitia.com \
    --to=sds@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).