display-startup-echo-area-message triggers this little advertisement unless you're using customize and have set it there or have it set in your user-init-file (because it actually goes ahead and scans this file for something looking like that, see the definition of display-startup-echo-area-message for the gory details).
There is a way to replace it with ...
What existing command gets the current file buffer's file name like this?
Unfortunately there is no ready made command for this, but we can make one as follows:
(defun name-of-the-file ()
"Gets the name of the file the current buffer is based on."
(insert (buffer-file-name (window-buffer (minibuffer-selected-window)))))
The magic is ...
If you are writing C/C++/Java/Emacs Lisp/Python, then semantic-sticky-func-mode will do what you want.
NOTE: This seems to be working with CEDET from Git, not stock CEDET currently in Emacs 24.4. To get Emacs from Git:
git clone http://git.code.sf.net/p/cedet/git cedet
And load CEDET first above everything else in your init file:
(load-file (concat ...
Popup Minibuffer at the Center
Here’s a way to do exactly what you asked: display the minibuffer at the center of the screen.
Have a separate frame for the minibuffer
Position it at the center
Raise this frame whenever the minibuffer gains focus.
That is relatively easy to achieve, and is what you’ll get with the
oneonone.el package (as @Drew points out). ...
You are confusing a few things, here.
First, RET is not a physical (keyboard) key. It is a logical key -- the Emacs way of writing what your physical Return or Enter key typically sends to Emacs: a Control-M character (which Emacs also writes as C-m, when describing the Ctrl + m key sequence). And if your physical Return or Enter key sends something else, ...
Text scaling zooms the text of a particular buffer, everywhere that the buffer is displayed.
What you want to do is zoom a particular frame and not just scale the text of a particular buffer.
Commands zoom-in, zoom-out, and zoom-in/out of library zoom-frm.el let you do both of these things easily and incrementally.
From the keyboard, command zoom-in/out ...
C-y does work, but you can also paste into the minibuffer from the default register with, e.g., M-mre" or M-mrereturn--or by searching the contents of all registers: for example M-mre text copied a while ago.
M-m is the default dotspacemacs-emacs-leader-key: it's similar to SPC (which is the default dotspacemacs-leader-key), but the former is available ...
This is because isearch does not use the minibuffer to read input from the user, rather it simply updates the echo area with the characters entered during isearch. Please note that the minibuffer and the echo area are different. From the GNU Emacs Manual
The echo area is used for displaying error messages (see Errors), for
messages made with the message ...
find-file uses the buffer-local default-directory value as the default filename (see also find-file-read-args), so all you need to do is bind that value for the scope of the call to find-file:
(let ((default-directory "/home/"))
If you use library Icicles then you can use M-. at any time from the minibuffer to insert a thing-at-point from the buffer.
You can repeat M-. to either (a) append subsequent such things from the buffer or (b) change the kind of thing, inserting a different kind instead (cycling through thing types).
This is explained at Icicles - Inserting Text from Cursor....
This is very similar to the question Is there a way to disable the “buffer is read-only” warning?, so a very similar answer seems appropriate.
You can disable these messages by setting command-error-function to a function that ignores signals buffer-read-only, beginning-of-buffer, and end-of-buffer.
(defun my-command-error-function (data context caller)
As was pointed out by @phils the "Wrote file" comes from write-region. If you don't use the inhibit-message variable introduced in Emacs 25, you could replace the original write-region with a function that sets VISIT to neither t nor nil nor a string. As the docstring of write-region tells us, this will avoid displaying the message. In the following example ...
minibuffer-setup-hook is used only when the minibuffer is set up, i.e., activated, not when it is deactivated.
minibuffer-exit-hook takes effect when the minibuffer is exited. There is also minibuffer-inactive-mode-hook.
But although those do initiate the color change (as shown by adding (debug) at the beginning of the hook function, and then stepping ...
Minibuffer at the top
Displaying the minibuffer at the middle of the screen is complicated.
A reasonable alternative (which you may or may not find more readable)
is to move it to the top.
You can configure the location (or existence) of a frame’s minibuffer
with the minibuffer frame parameter in the
As others have indicated, and as was explained in the page you link to, output messages to the echo area are logged in buffer *Messages*. Clicking in the echo area brings up *Messages*, where you can copy text normally.
In the minibuffer, which is for input (as opposed to the echo area, which is in the same place, and which is for output), if you use normal, ...
Just use a string with faces.
(message (propertize "foo bar" 'face 'highlight))
Or use a different face, which has a red foreground. Or use a face property list:
(message (propertize "foo bar" 'face '(:foreground "Red")))
One solution for that narrow case is to dynamically set save-silently for that invocation specific invocation. Try:
(run-at-time nil (* 5 60)
(let ((save-silently t))
You might alternatively use advice to globally accomplish the same thing. See Advising Functions in the Emacs ...
The default C-x C-0/-/= bindings do an excellent job of font resizing. But they apply only to the buffer where they are used. They do not change the font sizes for the text outside the buffer, for example in the mode-line, mini-buffer or other buffers.
Below function changes the font size in those areas too, globally.
You can use the default-font-size-pt ...
Thanks to #emacs, I learned that (global-set-key (kbd "H-g") (kbd "C-g")) will work for this. C-g runs whatever command it is bound to, and now H-g will run a keyboard macro that consists of C-g, so it does exactly whatever C-g would.
A slight oddity is that because H-g is now bound to a keyboard macro, after hitting it, I see the keyboard macro message "...
Library oneonone.el gives you this out of the box.
Just customize option 1on1-minibuffer-frame-top/bottom to the position you want for the standalone minibuffer frame. The value is the number of pixels from the top (if non-negative) or the bottom (if negative) of your display. For example, set the value to your display height divided by 2, to center it ...
Many interactive commands read minibuffer input. find-file is one such
command. Reading minibuffer input "activates" the minibuffer window, which
is why you can switch to it with the other-window command. Interactive
isearch is special because it's implemented as a minor mode. It doesn't
technically read your search string from the minibuffer, but ...
You can turn on which-function-mode by doing
M-x which-function-mode RET
To make the setting permanent, add
to your init-file.
From the documentation:
Toggle mode line display of current function (Which Function mode). [...]
Which Function mode is a global minor mode. When enabled, the
current function name is ...
In addition to built-in ways to read single events such as read-char and read-char-exclusive, here's an option to read a single character, but also specify which characters are acceptable input:
(defun read-char-picky (prompt chars &optional inherit-input-method seconds)
"Read characters like in `read-char-exclusive', but if input is
not one of CHARS, ...
You can hit M-e to edit the current search term. This runs the command isearch-edit-string. You can then type C-s to resume the search.
To get a list of all key bindings available during isearch, type C-s (to enter isearch) and then C-h b. You can also get some documentation by typing C-s C-h m (describe-mode). Here's some basic key bindings from that ...