all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rami A <rami.ammari@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: How to exclude folders from searching IDs “gid”?
Date: Thu, 1 Aug 2013 16:36:43 -0700 (PDT)	[thread overview]
Message-ID: <0fc45268-ef44-4bc6-95a5-1fcae3e9897d@googlegroups.com> (raw)

I have this snippet of code in my dotemacs file that helps me view IDs. How is it possible to exclude some folders from the ID search?

; gid.el -- run gid using compilation mode.
;(require 'compile)
;(require 'elisp-utils)
;(provide 'gid)

(defvar gid-command "gid" "The command run by the gid function.")
(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): ") ;confirmation
        (word-around-point)))
        ;)
  ;; Preserve the present compile-command
  (let (compile-command
    (gid-buffer  ;; if gid for each symbol use: compilation-buffer-name-function
     (lambda (mode) (concat "*gid " args "*"))))
    ;; For portability between v18 & v19, use compile rather than compile-internal
    (compile (concat gid-command " " args))))

(defun word-around-point ()
  "Return the word around the point as a string."
  (save-excursion
    (if (not (eobp))
(forward-char 1))
    (forward-word -1)
    (forward-word 1)
    (forward-sexp -1)
    (let ((beg (point)))
      (forward-sexp 1)
      (buffer-substring beg (point)))))


             reply	other threads:[~2013-08-01 23:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-01 23:36 Rami A [this message]
2013-08-02  5:57 ` How to exclude folders from searching IDs “gid”? Eli Zaretskii
     [not found] ` <mailman.2368.1375436508.12400.help-gnu-emacs@gnu.org>
2013-08-02 16:56   ` Rami A
2013-08-02 17:51     ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=0fc45268-ef44-4bc6-95a5-1fcae3e9897d@googlegroups.com \
    --to=rami.ammari@gmail.com \
    --cc=help-gnu-emacs@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 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.