all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Denis Golovan" <d.golovan.ml@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: VTags dynamic tags specification
Date: Sat, 27 Sep 2008 10:40:58 +0300	[thread overview]
Message-ID: <d47623700809270040k6b8f1fe4k348a410b68d02294@mail.gmail.com> (raw)

Hi, all

Does anybody uses VTags?
It works well, but I'd like to automate it's tags file adding.
Unfortunately, I have not managed to do that.
Every time after opening project file, it asks for tags file to enter
manually. In fact tags file lies in ./tmp/tags file relative to dpr.

Here is that .emacs part
;;======================VTAGS======================
(load "vtags")
(defun dsg-tags-add-table (file)
  "add tags table"
  (message "Tags %s" file)

  ;;That's where I try to tell it tags file <<<<<<<<<<<<<<
  ;(add-to-list 'tags-table-list file)
  ;(add-to-list 'tags-table-list (quote (file)))
  ;(setq tags-table-computed-list (tags-compute-list (get-tagfileinfo file)))
  ;(custom-set-variables
  ;  '(tags-table-list (quote (file)))
  ;)
  ;;No way works actually :( <<<<<<<<<<<<<<
  (vtags-mode)
  (message "Tags %s" file)
)

(defun dsg-tags-add ()
  "add tags table"
  (if (string-match "\\.dpr$" (buffer-file-name))
      (dsg-tags-add-table
         (concat (file-name-directory (buffer-file-name)) "tmp/tags")
      )
  )
)

(defun dsg-tags ()
  "add tags table"
  (interactive)
  (dsg-tags-add)
)


(add-hook 'find-file-hooks
  (function
    (lambda ()
       (dsg-tags-add)
    )
  )
)
;;======================VTAGS======================

I'm not a elisp guru, as you see :). So, please help

Thanks.

-- 
Best regards,
Denis Golovan




             reply	other threads:[~2008-09-27  7:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-27  7:40 Denis Golovan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-09-27  8:35 VTags dynamic tags specification Denis Golovan

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=d47623700809270040k6b8f1fe4k348a410b68d02294@mail.gmail.com \
    --to=d.golovan.ml@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.