我可以在Emacs中搜索标签的ido-mode风格完成吗?

Jam*_*lak 6 tags emacs

是否可以使用ido-mode完成来查找TAGS文件中的定义?我怀疑ido-completed-read是答案的一部分.这是我的非工作代码,它显示了一个未填充的ido模式迷你缓冲区:

(defun ido-choose-from-tags ()
  "Use ido to select tags "
  (interactive)
    (etags-tags-apropos
     (ido-completing-read "Tags: "  nil t)))
Run Code Online (Sandbox Code Playgroud)

sco*_*zer 3

有点低效,但是怎么样:

(defun my-ido-find-tag ()
  "Find a tag using ido"
  (interactive)
  (tags-completion-table)
  (let (tag-names)
    (mapc (lambda (x)
            (unless (integerp x)
              (push (prin1-to-string x t) tag-names)))
          tags-completion-table)
    (find-tag (ido-completing-read "Tag: " tag-names))))
Run Code Online (Sandbox Code Playgroud)