[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug-report, parsing file error in GNU Emacs
From: |
Shigio YAMAGUCHI |
Subject: |
Re: bug-report, parsing file error in GNU Emacs |
Date: |
Tue, 23 Oct 2012 13:02:48 +0900 |
Hello,
I have committed your fix.
Thank you.
> What is your environment (OS)?
> Linux debian 3.2.0-3-686-pae #1 SMP Mon Jul 23 03:50:34 UTC 2012 i686
> GNU/Linux
>
> Which version of GLOBAL are you using?
> global - GNU GLOBAL 6.2.4
>
> What did you do? (command line)
> I use GNU global in GNU emacs and did the followings:
> 1.visit the C source file which is in HOME directory.
> 2.Enable 'gtags-mode' and use 'gtags-parse-file' in GNU emacs.
>
> What did you expect from it?
> I wanted to parse the C source file.
>
> What was occurred? (as is)
> It didn't work, and gave errors like this:
> "Searching ~/src/dwm-6.0/dwm.c ...
> '~/src/dwm-6.0/dwm.c' not found in GPATH.
> global: file not found."
>
> I found that it is because GNU GLOBAL can't accept the tilde character,
> so I fixed the 'gtags-parse-file' function in 'gtags.el' file by expanding
> the file name.
>
>
> (defun gtags-parse-file ()
> "Input file name and show the list of tags in it."
> (interactive)
> (let (tagname prompt input)
> (setq prompt "Parse file: ")
> (setq input (read-file-name prompt (gtags-buffer-file-name)
> (gtags-buffer-file-name) t))
> (if (or (equal "" input) (not (file-regular-p input)))
> (message "Please specify an existing source file.")
> (setq tagname input)
> (gtags-push-context)
> ;; expand the file name
> (setq tagname (expand-file-name tagname))
> (gtags-goto-tag tagname "f"))))
--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3