[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-idutils] idutils.el and Emacs 22
From: |
Tom Tromey |
Subject: |
Re: [bug-idutils] idutils.el and Emacs 22 |
Date: |
Fri, 22 Jun 2007 15:50:44 -0600 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (gnu/linux) |
>>>>> "Jim" == Jim Meyering <address@hidden> writes:
>> Anybody considered trying to get this code into Emacs rather than
>> shipping it in idutils?
Jim> I haven't, but if you're inclined, please do!
I'll think about it :)
Jim> Thanks, Tom.
Jim> Welcome to idutils :-)
Thanks!
Jim> I like all of your changes except for the part that suppresses creation
Jim> of a per-invocation *gid-FOO* buffer in favor of a single "*gid*" buffer.
Jim> Believe it or not, having *gid-FOO*, *gid-BAR*, *gid-BAZ*, etc. buffers
Jim> simultaneously is a feature :-)
I tried it a while but didn't like it. How about making it an option?
The appended does that, having it default to the per-invocation
buffer-name behavior.
Tom
;;; idutils.el -- emacs interface to `lid -R grep', a.k.a. `gid'
;;; Copyright (C) 1995, 1996, 2006, 2007 Free Software Foundation, Inc.
;;; Greg McGary <address@hidden>.
;; This file is part of GNU idutils.
;; GNU idutils is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; GNU idutils is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
;; MA 02111-1307, USA.
;;; This package provides the tools meant to help editing PO files,
;;; as documented in the GNU idutils user's manual. See this manual
;;; for user documentation, which is not repeated here.
;;; To install, merely put this file somewhere GNU Emacs will find it,
;;; then add the following lines to your .emacs file:
;;;
;;; (autoload 'gid "idutils")
;;;
;;; You may also adjust some customizations variables, below, by defining
;;; them in your .emacs file.
(require 'compile)
(require 'thingatpt)
(defvar gid-command "gid" "The command run by the gid function.")
(defvar gid-mode-font-lock-keywords
'(("^\\(Compilation\\|Gid\\) started.*"
(0 '(face nil message nil help-echo nil mouse-face nil) t))))
(defvar gid-use-search-in-buffer-name t
"If non-nil, use the search string in the gid buffer's name.")
(define-compilation-mode gid-mode "Gid"
"Specialization of compilation-mode for use with gid."
nil)
(defun gid (args)
"Run gid, with user-specified ARGS, and collect output in a buffer.
While gid runs asynchronously, you can use the \\[next-error] command to
find the text that gid hits refer to. The command actually run is
defined by the gid-command variable."
(interactive (list (read-input
(concat "Run " gid-command " (with args): ") (thing-at-point 'symbol))))
(let (compile-command
(compilation-error-regexp-alist grep-regexp-alist)
(compilation-directory default-directory)
(gid-full-buffer-name (concat "*gid-" args "*")))
(save-some-buffers (not compilation-ask-about-save) nil)
(compilation-start (concat gid-command " " args) 'gid-mode
(when gid-use-search-in-buffer-name
(function (lambda (ignore)
gid-full-buffer-name)))
(regexp-quote args))))
(provide 'idutils)
- [bug-idutils] idutils.el and Emacs 22, Tom Tromey, 2007/06/20
- Re: [bug-idutils] idutils.el and Emacs 22, Jim Meyering, 2007/06/21
- Re: [bug-idutils] idutils.el and Emacs 22,
Tom Tromey <=
- Re: [bug-idutils] idutils.el and Emacs 22, Jim Meyering, 2007/06/23
- Re: [bug-idutils] idutils.el and Emacs 22, Tom Tromey, 2007/06/26
- Re: [bug-idutils] idutils.el and Emacs 22, Pedro J. Ruiz Lopez, 2007/06/26
- Re: [bug-idutils] idutils.el and Emacs 22, Tom Tromey, 2007/06/27
- Re: [bug-idutils] idutils.el and Emacs 22, Jim Meyering, 2007/06/27
- Re: [bug-idutils] idutils.el and Emacs 22, Tom Tromey, 2007/06/28