I am using Emacs Live (https://github.com/overtone/emacs-live) and I have global linum-mode enabled. However when I switch from a buffer to another, and then back to the original buffer, the line numbers are all messed up like so. Thanks.
Before digging further into it, you may want to try out nlinum-mode (available from GNU ELPA), which provides similar functionality, but using an implementation technique that tends to be more reliable.
Related
So I was wondering if there's a game out there that lets me practice my emacs cursor skills. I just started using emacs and thought that a game letting me control the player with the standard emacs bindings would be an awesome way to get going. When searching for one I stumbled upon this for VIM.
Does anyone know of something similar for emacs?
This is not a game, but I'd suggest installing hardcore-mode (available on Melpa too), and configure it to your liking (here's my configuration if interested). That package when enabled globally will force you to not use the arrow keys and use the C-f, C-b, C-n, C-p bindings instead. So much so that now using those bindings has become a second nature to me.
PS: There's an emacs-dedicated stackexchange site in case you didn't know.
One idea: Have a game mode that shows two buffers, and the goal is to transform the first into the second buffer with the least amount of keystrokes.
hs-minor-mode in Emacs makes it possible to hide the cumbersome initial comment block so that one can get quickly to the code.
Is there a way to duplicate in Emacs what Eclipse (and other) IDEs do to the initial import blocks? A solution that works for C++ includes as well as for Java imports would be nice.
Have a look at the various folding modes and HideShow mode in Emacs. The original Emacs folding-mode has the downside that it requires you to add some additional markers to the code, which I find cumbersome and they don't really help with readability IMHO.
CEDET has a semantic folding mode that will probably be able to do what you want (I haven't looked at it for a while but CEDET/semantic is pretty good at this sort of functionality).
I recently switched to using GNU Emacs 24 from 23, and I notice that whenever I enter gud the *input/output* buffer is open. I have close it manually with C-x 0 everytime I debug. Can anyone point me to the correct variable which needs to be configured in order to stop displaying this buffer by default?
There is a 'gud-gdb' in new emacs releases that implement the old behavior of gdb/emacs interaction (no dedicated-windows and no I/O buffer). If you don't want to call M-x gud-gdb when you use it you can define an alias for M-x gdb
I have this problem as well. After a quick look at the source code, the problem appears to be that GUD dedicates most of its windows (that is, it calls set-window-dedicated-p on them). A dedicated window is one that cannot be switched away from. I guess more and more young guns are using GUD in many windows mode and want GUD to manage their window layout, and those of us that like to do that manually are in the minority. There doesn't seem to be anything obvious in gdb-mi.el that disables this behavior (for example, gdb-set-window-buffer seems to always do a set-window-dedicated-p to t for all windows it manages).
For now, this solution is more or less the one I'm using -- I manually deactivate the window dedication. This seems suboptimal, though. There ought to be some way to get GUD to let you manually manage the window layout. This question is related.
You can disable window dedication altogether like this: (in Emacs 24.4+)
(defun set-window-undedicated-p (window flag)
"Never set window dedicated."
flag)
(advice-add 'set-window-dedicated-p :override #'set-window-undedicated-p)
Note that this doesn't affect already dedicated windows.
Is there a minor mode in Emacs that will highlight changes made to a buffer? I'm picturing something like highlight tails without a timeout feature. I would use highlight tails for this and change the timeout rate to be something huge, but the mode seems to consume a bit of CPU to do the timing (a feature I wouldn't use).
EmacsWiki is usually your friend for things like this. Sounds like you might want highlight-changes-mode.
In short, +1 for Timo's suggestion of highlight changes mode.
And without even resorting to EmacsWiki:
M-x apropos RET highlight changes RET
It's bundled with recent Emacs versions.
I spend a lot of my time in emacs, and for the most part it's wonderful. But one thing really drives me nuts when I'm deep in it, and that's control over which window various new buffers are opened in. When I do find-file, it always opens in the current window, and this is what I like. But tons of other modes like to split my windows for me, change the layout, and do various other things that annoy me. For example running M-x manual-entry seems to have no rhyme or reason about where it opens the manpage, and various org-mode commands do the same thing, closing windows I want to keep open, etc. I don't like having to redo my layout everytime I want to look at my org agenda or open a manpage.
In short, is there anyway to globally control which windows are used for modes that want to open in a window other than the current one? Can I direct them more easily? Or will I have to hack each mode to act the way I want it to?
Try Winner mode:
http://www.emacswiki.org/emacs/WinnerMode
It provides an undo/redo for changes to the window configuration.
This question has always bugged me too. I found this:
http://www.gnu.org/software/emacs/elisp/html_node/Choosing-Window.html
It looks like you can use (setf pop-up-frames t) to make stuff show up in a new frame.
Also, it looks like you can use display-buffer-function to override the display function (how buffers are chosen.) Of course, you'd have to be good at elisp.