0

タグ テーブル リストで定義されているファイルからすべてのタグを取得する方法はありますか? タグファイルを次のように設定しました。

(setq tags-table-list '("~/project/TAGS"))

を試しまし(tags-completion-table)たが、すべてのタグが含まれていません。

4

2 に答える 2

1

TAGS ファイルが 1 つしかない場合、M-x visit-tags-table ~/project/TAGSまたは(visit-tags-table "~/project/TAGS")TAGS テーブルをバッファーにロードする必要がある場合は、M-x tags-search.

プロジェクトにさらに TAGS ファイルを追加するか、複数のプロジェクトがある場合は、リストの最後まで、呼び出されるたびに次のテーブルにアクセスする必要があります(setq tags-table-list '("~/project1/TAGS" "~/Project2/TAGS" ...))(visit-tags-table-buffer t)

編集:

(defvar buffer-in-string)
(defvar string-list)
(defun write-buffer-to-string ()
  (interactive)
  (setq buffer-in-string (buffer-substring (point-min) (point-max)))
  (kill-buffer) ;; If the buffer is big, it makes sense to kill it,
                ;; since its contents are copied into the string anyway
  (setq string-list (split-string buffer-in-string " "))
)

これにより、バッファが文字列になります。もっとエレガントな方法があるはずですが、現時点では、非常に限られた elisp の流暢さで書くことができるのはこれだけです。

于 2011-03-16T09:19:03.760 に答える
0

関数tags-completion-tableは、使用する補完テーブルを提供します。ドキュメント文字列から:

Build 'tags-completion-table' on demand. The tags included in the completion table are those in the current tags table and its (recursively) included tags tables.

そしてtags-lazy-completion-table、使用する補完機能を提供します。を使用していますtags-completion-table

于 2012-01-01T09:07:53.727 に答える