* How to exclude folders from searching IDs “gid”?
@ 2013-08-01 23:36 Rami A
2013-08-02 5:57 ` Eli Zaretskii
[not found] ` <mailman.2368.1375436508.12400.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 4+ messages in thread
From: Rami A @ 2013-08-01 23:36 UTC (permalink / raw)
To: help-gnu-emacs
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)))))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to exclude folders from searching IDs “gid”?
2013-08-01 23:36 How to exclude folders from searching IDs “gid”? Rami A
@ 2013-08-02 5:57 ` Eli Zaretskii
[not found] ` <mailman.2368.1375436508.12400.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2013-08-02 5:57 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Thu, 1 Aug 2013 16:36:43 -0700 (PDT)
> From: Rami A <rami.ammari@gmail.com>
>
> 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?
Please explain what you mean by "exclude some folders". "M-x gid"
reads file information from the ID database, it doesn't look in any
folders at all.
If you have more than one ID database, then pass a
"-f /path/to/ID" command-line argument to gid-command. (Originally,
"M-x gid" would prompt for arguments, but the code you copied has that
commented out and instead always passes the word at point.)
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <mailman.2368.1375436508.12400.help-gnu-emacs@gnu.org>]
* Re: How to exclude folders from searching IDs “gid”?
[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
0 siblings, 1 reply; 4+ messages in thread
From: Rami A @ 2013-08-02 16:56 UTC (permalink / raw)
To: help-gnu-emacs
Hi Eli,
Thanks for taking a look.
assuming that I have the following directories in my projects folder.
X Y Z
When doing mkid in the main project folder it will make ID file that contains all ids in all of these source files.
I actually found the solution to exclude one or more folders from the ID search.
Simply by:
mkid --prune Z
This will take out any IDs from folder X and only include IDs from X and Y.
So when you do the gid "ID" you wont see matching results from folder Z.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: How to exclude folders from searching IDs “gid”?
2013-08-02 16:56 ` Rami A
@ 2013-08-02 17:51 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2013-08-02 17:51 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Fri, 2 Aug 2013 09:56:28 -0700 (PDT)
> From: Rami A <rami.ammari@gmail.com>
>
> I actually found the solution to exclude one or more folders from the ID search.
> Simply by:
> mkid --prune Z
>
> This will take out any IDs from folder X and only include IDs from X and Y.
> So when you do the gid "ID" you wont see matching results from folder Z.
Exactly. Any omissions must be made at "mkid" time, not at "gid"
time.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-02 17:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-01 23:36 How to exclude folders from searching IDs “gid”? Rami A
2013-08-02 5:57 ` 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
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).