Reputation: 13779
I am using Emacs 23.4 on OS X (from http://emacsformacosx.com/). My ~/.emacs
file contains:
(load "/path/to/haskell-site-file")
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
(require 'speedbar)
(speedbar-add-supported-extension ".hs")
(add-to-list 'load-path "/usr/local/share/ghc-mod-1.10.15")
(setq exec-path (append exec-path '("/usr/local/bin")))
(autoload 'ghc-init "ghc" nil t)
(add-hook 'haskell-mode-hook (lambda () (ghc-init) (flymake-mode)))
When I invoke Speedbar with M-x speedbar
I do get a speedbar frame which shows Variables, Imports, Instances and Datatypes for the Haskell file. But when I edit the Haskell file, the speedbar frame does not refresh to reflect the edits to the file. I tried invoking the Speedbar > Update
menu, but that did not do the trick. How do I update the speedbar frame?
Upvotes: 4
Views: 834
Reputation: 3949
Speedbar uses imenu by default to fetch tags from your buffer, and imenu is very lazy about reparsing your buffer. In addition, once speedbar has a list of tags, it keeps using that list until you 'close' the file. Next time you open the file like to see the tags, it will refetch tags from imenu (or whichever tool you are using for tags.)
Since imenu is even lazier than speedbar, you can use a speedbar shift-click to re-open a file, and speedbar will force imenu to reparse.
Upvotes: 2