When using compose-mail to write a messages, and then using message-send-and-exit to send the message, I got a failure. In the messages buffer, I see:
Sending via mail...
sendmail-query-once: Symbol's function definition is void: nil
Running "version" gives: "GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) of 2014-03-07 on lamiak, modified by Debian."
It seems like the variable send-mail-function has been set to nil for some reason. The function sendmail-query-once expects this variable to contain the name of a function that will send the message. Since nil is not a valid function, you get the error "Symbol's function definition is void: nil".
As a special case, if send-mail-function is set to sendmail-query-once, then you will be taken to a prompt for setting up sending email. Try setting it to that value, to go through the method selection again, and then the configuration will be saved automatically.
Related
Upon running the source code from org mode by invoking M-x org-babel-execute-subtree
I have to respond to every code block with a 'y`
How could configure it run as default 'y'
Evaluate
(setq org-confirm-babel-evaluate nil)
If you really want to skip this step always, you have to add the above form to your initialization file.
Here's the doc string of the variable:
Documentation:
Confirm before evaluation.
Require confirmation before interactively evaluating code
blocks in Org buffers. The default value of this variable is t,
meaning confirmation is required for any code block evaluation.
This variable can be set to nil to inhibit any future
confirmation requests. This variable can also be set to a
function which takes two arguments the language of the code block
and the body of the code block. Such a function should then
return a non-nil value if the user should be prompted for
execution or nil if no prompt is required.
Warning: Disabling confirmation may result in accidental
evaluation of potentially harmful code. It may be advisable
remove code block execution from ‘C-c C-c’ as further protection
against accidental code block evaluation. The
‘org-babel-no-eval-on-ctrl-c-ctrl-c’ variable can be used to
remove code block execution from the ‘C-c C-c’ keybinding.
You can customize this variable.
You should at least be aware of the warning.
Recently started using mu4e for email in emacs. When I compose, I get a line at the bottom by default
--
Sent with my mu4e
I can always just delete it, but would rather it didn't appear in the signature area in the first place. What's the command for removing this in my emacs init.el?
Change mu4e-compose-signature to modify the signature, or set mu4e-compose-signature-auto-include to disable the automatic inclusion of the signature in new messages:
(setq mu4e-compose-signature-auto-include nil
mu4e-compose-signature "")
I'd like to use icicle-comint-search in shell-mode, but it used to be failed with error message like this
byte-code: No search contexts for `\^\[\^#\$%>
]\*\[#\$%>] \*\\S-\.\*'
Of course my shell prompt in zsh does not meet that regular expression. B
I tried to change icicle-search-context-regexp via setq to meet my zsh prompt. But when I issue icicle-comint-search the error message comes again. When I examine variable value of icicle-search-context-regexp, it was reset to its default value again.
How could I change it to meet my zsh prompt?
icicle-comint-search uses this regexp: (concat comint-prompt-regexp "\\S-.*").
So you can change the value of variable comint-prompt-regexp to change the search regexp. You can set that variable in a mode hook, for example (e.g., comint-mode-hook). Note that the doc string for comint-prompt-regexp says that it is used only if comint-use-prompt-regexp is non-nil, but for icicle-comint-search it is always used. I've updated the icicle-comint-search doc string to mention comint-prompt-regexp.
I used to be able to open a new buffer in Emacs quickly using the command C-x b <non existent buffer name>
Somehow I've broken this in my version of Emacs (23.1). When ever I try to do this now I get the message [No match] in the command buffer.
Does anyone know what I might have done to break this functionality, or is it possible that I imagined being able to do this?
Set confirm-nonexistent-file-or-buffer to nil:
confirm-nonexistent-file-or-buffer is a variable defined in `files.el'.
Its value is after-completion
Documentation:
Whether confirmation is requested before visiting a new file or buffer.
If nil, confirmation is not requested.
If the value is `after-completion', confirmation is only
requested if the user called `minibuffer-complete' right before
`minibuffer-complete-and-exit'.
Any other non-nil value means to request confirmation.
This affects commands like `switch-to-buffer' and `find-file'.
You can customize this variable.
This variable was introduced, or its default value was changed, in
version 23.1 of Emacs.
If you have enabled ido-mode, you can still switch to the behavior you're familiar with. I do this frequently when I know I'll be creating a new named buffer.
C-x b C-b
You press C-j instead of hitting enter twice, which will bypass the confirmation and immediately open the new buffer. This works with or without ido-mode. This will have the same effect has pressing enter with confirm-nonexistent-file-or-buffer set to nil.
You probably enabled ido-mode. You need to press ENTER to confirm the creation of the buffer.
I have a HTML page, with html-mode enabled. I call function sgml-validate to check for any markup errors. It's based on compilation-mode. I want to remove some warnings from the compilation output, so I wrote a function and hooked it to compilation-filter-hook (this variable is not documented, but compilation-filter invokes it). Everything works. My problem is that how can I ensure my filter function only gets called when I started the compilation process on a HTML page (via sgml-validate)?
I see two methods, but none of them worked:
First, I can check the value of major-mode. But it always returns compilation-mode, since that is enabled on the *compilation* buffer. (I found a filter function in the source code of grep+, and they did check the value of major-mode. I can't figure out how can it work correctly.)
The other idea was than to only hook my filter function to the HTML file's buffer, but for similar reasons it couldn't work as the output of compilation process goes to a seperate buffer.
It sounds like you can advise smgl-validate so that it performs the filtering before it performs all it's other operations. For example:
(defadvice sgml-validate (around fix-filtering command activate)
(let ((return-value ad-do-it))
(filter-function return-value))))
Meanwhile, I found that compilation-start accepts an optional argument mode, which will be the major mode for the compilation buffer. So I can create a major mode derived from compilation-mode, and define there my filter function now hooked to the proper buffer.
The only problem is now that sgml-validate does not allow me to set the mode argument on compilation-start, but that's another question.
(I don't consider this the ultimate solution, of course.)