I have started using speed bar in emacs and I would like to know if it is possible to mark (in the speedbar) the files / buffers that have unsaved changes.
Related
I want to create a buffer that will behave like a pop-up buffer.
Wanted Features
It should be closed with ESC.
It should kill window when a buffer is killed (Could also do with a hook but if there's
builtin version it would be better)
Restrictions
I use evil-mode and I don't want to use external packages.
Things I've Done:
It should be on the bottom of the frame.
(display-buffer (get-buffer-create "*kmonad-scratchpad*")
'(display-buffer-at-bottom (window-height . 0.15)))
It should be immediately focused.
(pop-to-buffer "*kmonad-scratchpad*")
Looked at compile.el but couldn't find how it's implemented.
Differences with similar questions:
How to create buffer similar to *compilation* in Emacs? Mine needs to be writable, it messes with evil mode.
Emacs: pop-up bottom window for temporary buffers Don't want to use popwin.el
Everytime I start emacs, I have a series of orgmode buffers open (even though I close them before exiting). Do you know how to set emacs so that it opens only with my current setup (currently it shoudl only open shoring my agenda and a todo orgmode buffer on the left, but, while it does this, it also shows other opened buffers in the background (!). Thanks for any help provided!
Emacs out of the box does not open anything by itself at startup. You are probably using some package (internal or external) that offers this feature. Maybe desktop-save-mode?
For example, I use workgroups2. It opens at startup, everything that was open at exit. But that means - everything I close before the exit will not be opened on startup. I can highly recommend workgroups2.
I am a beginner user of emacs. Even after I have deactivated the mark by pressing ctrl+spc still the text gets highlighted when I move across the text. Emacs works fine before I set mark for the first time while editing a file. Once I use the mark this problem begins.
Why do you think that you have "deactivated the mark by pressing C-SPC"?
Do you have transient-mark-mode enabled? (It is enabled by default in Emacs 23 and later.) If so, the you do not see highlighting by default - the mark and region are not active, and if you hit C-SPC once then you see highlighting when point is moved away from the mark that C-SPC just set - the mark and region are active.
When the region is active, you can hit C-g to inactivate it, removing the region highlighting.
If this is not the behavior you see then probably something in your init file is causing the problem. In that case, try starting Emacs without your init file: emacs -Q. If the problem goes away with emacs -Q then recursively bisect your init file to find the problem.
(Emacs newbie here)
Sometimes a Help buffer gets opened in my emacs editor. It opens in a different pane, splitting the current window into two halves vertically.
When I use C-k buffer-name, to kill a buffer (say Help), some other buffer (say scratch) gets opened automatically in that pane.
Is it possible to revert to my previous configuration, after a random buffer (Help or Debug..) gets opened.
My previous configuration would be to go back to a single window with no panes
To revert to the previous window configuration after any arbitrary change(s), you should enable winner-mode in your .emacs file:
(winner-mode 1)
Then you can use C-c<left> (repeatedly, if necessary) to undo window configuration changes with winner-undo.
C-c<right> calls winner-redo which returns you to the most recent configuration (immediately; not in single steps the like the 'undo' command).
Winner mode is the key to never ever getting annoyed by Emacs creating an unwanted window, but it also lets you do things you wouldn't have done before (for instance C-x1 to maximise one of your windows temporarily for easier reading, because getting back all the windows you just deleted is now trivial).
Obviously this is also incredibly useful if you accidentally mess up your window config!
Hello to revert back to one buffer you must hit C-x1 while standing in the buffer you want to keep. And to switch between frames C-xo
This question probably applies to other emacs modes than haskell-mode, since I assume emacs has got a general way of opening windows for automatically created buffers:
haskell-mode for emacs enables me to hit C-c C-l to load the contents of the current buffer into a Haskell interactive session, which automatically causes emacs to open the buffer for the session in a split window in the current frame. Since I am running a setup with multiple emacs clients connected to a server, I really don't want to show the buffer in each open frame I've got. Is there a way to prevent emacs from doing this kind of thing?
Ah, I found a solution just after posting this :).
Adding
(setq special-display-buffer-names
'("*haskell*" "*Help*"))
to my .emacs tells emacs to open these buffers in a frame instead of a split.
Edit: But still, an even better solution would be for emacs never to create frames/splits automatically, but just silently create special buffers in the background. I can't figure out how to specify this though.
in init.el
(setq split-height-threshold 5)
(setq split-width-threshold 5)