So I have this Emacs plugin which I quite like:
auto-indent-mode
However, when I add it to my startup file (_emacs) like this:
(auto-indent-mode)
It won't run.
Also, I would like to know how I could setup my Emacs window like this:
-----------
| A | B|
|______| |
| C | |
Thanks.
This mode appears to be buffer-local. If you always want this mode enabled, EmacsWiki suggests doing this:
(auto-indent-global-mode)
You can also enable it for certain modes, e.g.
(add-hook 'emacs-lisp-mode-hook #'auto-indent-mode)
Related
I have a list of tab-separated values that I Select using C-<space> down down down...
If I use M-x org-table-create-or-convert-from-region, it perfectly converts that region to an org-table. However, the shortcut associate with that command C-c | doesn't work. It simply adds the | character at the end of the region.
I'm in the process of creating 100 or so tables through this process and I'd really want my keyboard binding to work. Unfortunately, this command doesn't disambiguate until I type a lot.
Am i missing something very obvious?
Edit: From a great tip from Andrey I typed C-h k C-c | . I can confirm, the key is bound as seen in the following output
C-c | runs the command org-table-create-or-convert-from-region, which
is an interactive autoloaded Lisp function in `org-table.el'.
It is bound to C-c |.
I have a bunch of journaled pages that look like this:
** <2013-12-03 火 20:53> [[http://www.geek.com/science/nasa-funds-fuelless-laser-thruster-could-be-readying-for-test-launch-1573468/][NASA funds fuelless laser thruster, could be readying for test launch | Science! | Geek.com]] :euler:technical:space:
:PROPERTIES:
:ID: c064d0ae
:END:
The biggest problem for PLT is its limited range...
I would like to link to these from other org-mode documents, such as TODO lists. Normally what I do is click on the link, select Org->Hyperlinks->Store link to here(GLOBAL), and then use tab completion with C-l.
The resulting link, though, doesn't work and has different formatting:
[[file:~/orgs/webjournals.org::*%20%5B%5Bhttp:/www.geek.com/science/nasa-funds-fuelless-laser-thruster-could-be-readying-for-test-launch-1573468/%5D%5BNASA%20funds%20fuelless%20laser%20thruster,%20could%20be%20readying%20for%20test%20launch%20|%20Science!%20|%20Geek.com%5D%5D][<2013-12-03 火 20:53> {{http://www.geek.com/science/nasa-funds-fuelless-laser-thruster-could-be-readying-for-test-launch-1573468/}{NASA funds fuelless laser thruster, could be readying for test launch | Science! | Geek.com}}]]
How can I straighten this out? I tried setting simplified text search links like [[file:~/orgs/webjournals.org::*http:/www.geek.com/]], but didn't find any success.
You can cut the bad string with C-w and yank it back with
the following command:
(defun yank-and-unhex ()
(interactive)
(insert (url-unhex-string (current-kill 0))))
This is some variation of a problem already mentioned, but I can't figure out what exactly.
I have my frame split in three windows:
----------------
| | |
| |------|
| |shell |
----------------
When I'm typing the shell, I do "tab" to get completions. They appear in the window on the left. Then emacs doesn't close the buffer, but the entire window, and I'm left with a horizontally split screen:
----------------
| |
|--------------|
| shell |
----------------
I'm not sure I understand how to stop this from happening, and it's not a problem I remember ever having. My botched attempts managed to get to the state where emacs would not close the completion suggestion buffer at all, but that's not ideal either.
What can I do to have emacs normally close the completion buffer, but leave my window alone?
M-x dedicated-mode
;; This minor mode allows you to toggle a window's "dedicated" flag.
;; When a window is "dedicated", Emacs will not select files into that
;; window. This can be quite handy since many commands will use
;; another window to show results (e.g., compilation mode, starting
;; info, etc.) A dedicated window won't be used for such a purpose.
;;
;; Dedicated buffers will have "D" shown in the mode line.
using ido for find file completion, is it possible to select and edit the first completion? Eg., if I had this, I'd like to complete with apples, but not to ido-exit-minibuffer so I can add to the end of apples:
From:
Find file: /home/me/{apples | pears | armadillos | ...}
To:
Find file: /home/me/apples
Cheers,
Tim
C-e (edit input string) seems to do what you want.
Just start typing the thing you are looking for and hit <TAB> this will attempt to complete the value, if it's not unique ido will list the possible completions, if it is unique then it will complete the selection.
I would like to have a pop-up bottom window for temporary buffers like compilation, Completions, etc. It should split-vertically the whole frame even if root window was split horizontally. For example:
Before M-x compile:
+------+------+
| | |
| | |
| | |
+------+------+
After:
+------+------+
| | |
+------+------+
| |
+------+------+
I'm absolutely satisfied with ecb-compilation-window, but I don't want to use ECB and CEDET.
Actually I see two ways make described behavior but both have their drawbacks.
Use split-root.el module.
Drawback: it uses delete-other-windows function and then rebuilds previous windows tree after root window is split as required. It invalidates all references to existed earlier windows in your code(or code of any module).
Set window-min-height variable to its minimal possible value(1) and call split-window-vertically during emacs startup minimizing window height after it's created. Then use this window for temporary buffers setting its height as required.
Drawbacks: Small annoying window with annoying modeline on the bottom of the frame, doesn't work with emacs --daemon.
Are there more elegant ways to do that without drawbacks?
Use popwin !
It behaves as you describe out of the box, and configuration is easy, it only took one line to get my anything buffers to pop-up at the bottom of the screen :
(push '("\*anything*" :regexp t :height 20) popwin:special-display-config)
There some more detailed config examples floating around japanese blogs, just google it.