All functions and variables defined in a file that gets loaded are put into the global environment. Although Emacs has installable packages, those packages are not isolated from each other in any way. If two files define functions or variables with the same name then you'll get a warning when the second one is loaded.
You can find out where a function was ...
Yes! This is command-log-mode which can be installed from Melpa.
You have to add the function to whatever modes you want to record, like
(add-hook 'python-mode-hook 'command-log-mode)
Then, to invoke the log window as shown in the video
Open a Python file (in my example) and start manipulating the code to see your ...
The application of a lambda expression was used to populate the local variables in the expression, so for example what you can today write as
(let ((x 12))
(message (number-to-string (- (* 4 x) (/ x 2)))))
you wrote as
(message (number-to-string (- (* 4 x) (/ x 2)))))
The lambda expression is the car of the whole form.
Almost every mode puts some kind of text in the mode line, which is the line of text at the bottom of every buffer. You can also type C-h m (or M-x describe-mode)to get long-form documentation about every mode that is currently active. This includes their names as well as all of their keybindings.
Org mode does a bunch of context-dependent actions by binding a key (e.g. C-c C-c or C-c RET) to a generic function (org-ctrl-c-ctrl-c or org-ctrl-c-ret). The function looks around to determine a context (am I in a header? or a source block? or a table? etc.) and then calls another function (e.g. org-insert-heading) depending on that context.
I don't know ...
C-h a runs apropos-command, and so will only show you interactive commands, not variables like make-backup-file-name-function. You could use apropos-user-option in combination with a non-nil value of apropos-do-all to search more extensively.
Interactively you can use a prefix argument C-u to tell most 'apropos' commands to use their apropos-do-all ...
You can use func-arity added in 26.1. C-h f func-arity:
func-arity is a built-in function in `C source code'.
Return minimum and maximum number of args allowed for FUNCTION.
FUNCTION must be a function of some kind.
The returned value is a cons
cell (MIN . MAX).
MIN is the minimum number of args.
MAX is the
You can use substitute-command-keys, e.g.,
;; => "C-g"
though if there are multiple key bindings, it returns only one of them (the "first" one), for example,
;; => "C-x ("
see also it's docstring and (elisp) Keys in Documentation.
I use eldoc, this screenshot shows the first line of concat's docstring:
(define-advice elisp-get-fnsym-args-string (:around (orig-fun sym &rest r) docstring)
"If SYM is a function, append its docstring."
(apply orig-fun sym r)
(let* ((doc (and (fboundp sym) (documentation sym 'raw)))
(oneline (and doc (substring doc 0 (...
To discover an existing command that moves up or down lines, use command apropos-command, bound to C-h a by default.
Commands involving lines often have line in their name. So try that: C-h a line RET. Among the displayed command names and their descriptions, you'll find next-line and previous-line.
M-: (setq debug-on-message "Entry repeats: SCHEDULED")
The stack traces should show you what is causing each instance of that message.
See C-hig (elisp)Using Debugger for help on the debugger.
When you're done, M-: (setq debug-on-message nil)
You can execute arbitrary elisp code from a link:
Clicking on the link runs the code and you get a greeting in the echo area.
All you have to do is figure out what code to run. The first step is to find out the keybinding of C-h f, so do C-h c C-h f RET and you see that C-h f is bound to the command describe-...
There's M-x describe-mode, which is bound to C-h m by default. It shows the current major mode, as well as all current minor modes.
If you want to jump directly to the description of your current major mode, then either evaluate (describe-function major-mode) (via M-:) or bind it to a key, for example:
(defun my/describe-current-major-mode ()
You may want to try ivy + ivy-rich.
The relevant section of the documentation has this screenshot:
You need to include the following lines in your init.el:
(setq ivy-use-virtual-buffers t)
(setq enable-recursive-minibuffers t)
(global-set-key (kbd "M-x") 'counsel-M-x)
OP seems to be missing the point already clearly made in the two answers given: you cannot do what you are asking. Emacs uses a voluntary naming convention, not syntax or compilation rules, to define namespaces. It may sound like a recipe for chaos, but in practice it works very well.
What you are doing when you name your function s-join is (effectively) ...
In Elisp, all functions names normaly (but not necessarily) reside as an entry in a global environment (obarray). In Elisp functions can be redefined. Which means the function definition which has been evaled (or loaded) last will be the only one, which is known and used.
This way you can change functions in your init file, you just need to be sure your ...
I don't know about "straight-forward", but you can do it as follows:
(let* ((comps '(("faz" "Pogo quote part 2")
("foo" "Regular fubar")
,(lambda (s) (format " %s" (cadr (assoc s comps)...
When you're in the agenda buffer try C-h m which should give an overview of the current mode, show which commands are available and list their keybindings.
There are a few other ways to access the built in documentation (as found in the manual) that you might want to explore.
In addition to C-h f which gives you information about functions as you found out, the C-h prefix key leads to all sorts of other documentation as well: variables, keys, log messages, modes, the Info manuals and much more - type C-h ? to get the list.
Is there any package that does that, or a way to achieve it?
One such package is Show Key (code: showkey.el).
Global minor mode showkey-log-mode keeps a log of such events, in a separate frame. It's refreshed with each new event, and it's kept on top of other frames without stealing the input focus. Various user options control what events get logged, etc.
You can automatically have the *Help* window be selected when it is displayed, by customizing option help-window-select.
help-window-select is a variable defined in help.el.
Its value is t
Original value was nil
Non-nil means select help window for viewing.
never (nil) -- Select help window only if ...
For this particular case...
In that call to org-auto-repeat-maybe we see this:
(if (or (memq 'org-add-log-note (default-value 'post-command-hook))
(memq 'org-add-log-note post-command-hook))
;; We are already setup for some record.
(when (eq org-log-repeat 'note)
;; Make sure we take a note, not only a ...
You can call describe-minor-mode to get help on any minor mode. It prompts you to enter either a symbol or an indicator from your mode line, and gives you the help for that mode. I don't think that there's anying similar for major modes.
The user firstname.lastname@example.org#emacs provided the following implementation of a function that shows the documentation in the echo area at the bottom of emacs:
(defun showdoc (f)
(interactive (list (thing-at-point 'symbol t)))
(message "%s: %s" f (documentation (intern f))))
I noticed that if the docstring was long, as for example with interactive, ...