viper.el is hardcoded to disable viper in compilation-mode. How can I fix this without modifying the original file?
If you really want to do this, you should be able to customize the variable viper-emacs-state-mode-list and remove compilation-mode.
Have you tried running "M-x viper-mode"? That's what I do when I end up in a buffer in which it has been disabled, or at least not enabled.
Related
I don't want my whitespace colored like in the below screenshot.
I have the default whitespace-mode turned off.
How can I disable this highlighting?
By the name of the face highlight-indent-face, it looks like this is being caused by highlight-indentation-mode or highlight-indentation-current-column-mode, both provided by the same extension.
Check C-x m to see which one is turned on.
Now you can turn it off (more likely stop turning it on automatically in your configuration).
It looks like you've managed to turn on whitespace-mode. Turn it off with M-x whitespace-mode.
It's not turned on by default, so if it's always on when you start Emacs, check your .emacs file to see if the command shows up in there.
I'm using org-mode capture to create small notes and todos. I'm also using evil-mode.
What I'd love to do is to automatically go into insert-mode when I go into a capture. I've tried adding a hook to org-capture-mode-hook and running (evil-insert) in the hook, but that doesn't work. Is there anything else I can try?
Thanks!
Simon
(add-hook 'org-capture-mode-hook 'evil-insert-state)
You can try
(evil-set-initial-state 'org-capture-mode 'insert)
In my .emacs file I have (delete-selection-mode t) to enable the delete-selection-mode globally. Currently I'm working on a TeX file with AUXTeX, so it might be related to AUCTeX, but I don't know.
At first, after visiting a file foo.tex everything works fine, and typing over a marked text replaces the marked text with the one I type. However, after some time, during which I compile the document, add TeX macros, etc. the functionality of the delete-selection-mode doesn't work any more.
I don't know which action of mine is the one which causes the problem - it would be hard to trace it.
Note that although the functionality of the delete-selection-mode fails, when I try to enable it (M-x delete-selection-mode) I get a message that the mode was disabled! That is it was not disabled before - it just didn't work... I I then enable it (M-x delete-selection-mode again), then it is enabled and working again. Till the next fail...
Under the hood, the mode use pre-command-hook, which allows commands to run things right before every command. Emacs is known to clear this variable in the event of an error (just to make sure that Emacs don't hang). This mean that the function used by delete-selection-mode, or any other mode that use this hook, triggered an error.
How to fix it? Find what caused the error, wrap the function in a ignore-errors block, or run a timer re-adding the function every ten seconds or so.
I'm developing a mode for Emacs, and everytime I switch to its buffer, viper gets turned on. I've modified viper-mode to trace where viper-mode is being called, and surprisingly set-viper-state-in-major-mode is called by running the viper-post-command-hooks, set to nil. Any idea of what is going on?
Thanks!
EDIT: For the benefit of all beings, here is what I found out: as instructed by Trey, I started emacs with -Q and manually loaded both viper and my package. As I could reproduce the bug, the problem was on one of these packages. After line-by-line filtering, I discovered that the innoquous-looking (kill-all-local-variables) was causing the problem.
There's something in initialization that's causing it.
First try starting without your .emacs emacs -q. If the problem persists, then the trigger is in the site-start.el. So, talk to whomever installed Emacs and get them to remove the customizations there. You can also always use the -Q startup option to avoid loading the site-start.el.
If the problem isn't in site-start.el, and you don't think it's in your .emacs, it might be in a custom default.el file, which you can prevent from being loaded by adding:
(setq inhibit-default-init t)
to your .emacs.
If you still have a problem, then I'm 99% sure it's in your .emacs.
To be 100% sure, try emacs -Q, which runs Emacs with no customizations. If the problem persists, download and install your own Emacs b/c you surely can't trust the installation you're using.
So, now if you're convinced it's in your .emacs, start cutting out parts of your .emacs, or introduce an error in your .emacs with (error "frog"), and progressively rule out which portions of your .emacs are causing the problem.
g'luck
The function kill-all-local-variables will run all functions added to change-major-mode-hook, this is a common way for global minor modes to initialize themselves. For example, global font lock and global cwarn mode use this.
I haven't used viper myself, but chances are that it use this mechanism. Of course, you still would have had to enable it in your init file, somehow, so if you simply would stop doing this, it would solve your problem as well.
Try commenting out any references to viper mode in your .emacs. I don't get sent into viper mode, unless I start playing around with viper mode before I eval your new mode.
Maybe there's more being done with this statement than you think:
(use-local-map ecoli-map)
Try to change some of your binds in your map. eg. j to C-j and k to C-k.
Maybe emacs is getting confused?
Try removing your ~/.viper config file, and also check your .custom.el for settings that might kick viper into action in your major mode (or globally).
Is there a way Emacs can automatically refresh the buffer showing the dvi right after my LaTeX compilation?
Thank you.
The global auto revert is not always desirable, in fact I only use it for for the DocView to see the new output of pdflatex.
The following will allow auto revert for the DocView major mode
(add-hook 'doc-view-mode-hook 'auto-revert-mode)
Use interactive function:
auto-revert-mode
to enable reloading when the file changes.