You can unload the system prolog mode first, this unbinds all its variables, so that the new defvar init-forms will take effect:
(when (version< prolog-mode-version "1.25")
Note that unload-feature is not a commonly used function, so it's possible you may hit some ...
How do you recompile an .el source file [...]
In Elisp file-visiting buffers, you can run the command M-xemacs-lisp-byte-compileRET to byte-compile the corresponding file.
In Dired buffers, you can type B (dired-do-byte-compile) to byte-compile all specified Elisp files.
In all buffers, you can run the command M-xbyte-compile-fileRET to byte-compile an ...
@phils gave you what is almost always the correct answer, that is, it
is the right answer for most major and minor modes; but in the
case of eshell you need to do something else:
(define-key eshell-mode-map (kbd "C-M-i") 'eshell-previous-input)))
The reason is that, unlike most modes, eshell creates its keymap
Take a look at the customization options available for use-package. I think you can set use-package-always-demand based on how Emacs was started to get the behavior you want.
For example at the start of your init file (before any use-package forms) you could do something like:
(setq use-package-always-demand (daemonp))
The one word you request can also be just a dot ..
After running that command you get:
~/Documents $ . hello.el
If this is too strange for you you can also use:
~/Documents $ eshell-source-file hello.el
Why that works:
The dot runs the eshell/\. command which in turn runs eshell-source-file.
I remembered load-historywith that, I came up with this that seems to work. Libraries that are loaded more recently have a smaller position (i.e. closer to the beginning of the list).
(let ((org-ref-i (seq-position load-history (assoc (locate-library "org-ref") load-history)) )
(ox-bibtex-i (seq-position load-history (assoc (locate-library &...
There is no real definition in Dave Thomas' video presentation.
Therefore I stick to the definition Don Stewart gives in his PhD cited in your question.
Dave Thomas mentiones in his video that a functional language "potentially allows runtime code swapping" because "it is pure".
The notion of a pure function means that the function does not have an ...
Yes, at any point you can redefine a function by evaluating a defun with the name of an existing function.
By extension, when you reload a file with M-x load-file, all function definitions in that file will be reevaluated, and the corresponding old function definitions replaced.
If you want to change the behaviour of an existing function, it might be ...
The layer for idris in Spacemacs use this https://github.com/idris-hackers/idris-mode.
So for my part, using spacemacs and helm, I succesfully load a file using contrib using the following shortcut:
idris-set-idris-load-packages + RET
contrib + RET
CTR + RET
You don't :) At least, not for this use-case.
Instead you defer your configuration until such time as the library in question has been loaded:
(define-key eshell-mode-map (kbd "C-M-i") 'eshell-previous-input))
Note that C-hv eshell-mode-map provided me with the "esh-mode" library name.
If you did want to "make all ...
As an alternative to unload-feature, you could use this to check the version of the default package without actually loading the code:
(let ((version (with-temp-buffer
(insert-file (find-library-name "prolog"))
(re-search-forward "(defvar prolog-mode-version \"\\([^\"]+\\)")
(string-to-number (match-string ...
A file (message "Hello World") saved as 'hello.el'.
Now, how to run (evaluate) this file on Eshell?
~/Documents $ ....... hello.el
I just fill in the command at the dots:
~/Documents $ load hello.el
The reply t of the load command says that the file was loaded successfully Type C-h f load RET to obtain a more detailed ...
To run program written in Emacs Lisp from shell like other general languages, use (elisp) Batch Mode:
~ $ cat ~/Documents/hello.el
(message "Hello World")
~ $ emacs --batch --load ~/Documents/hello.el
However, it is just much easier to run Emacs Lisp code within Emacs, see (emacs) Lisp Eval. since Emacs is the IDE of Emacs Lisp.
Emacs will load your init.el file first. Nothing else gets loaded unless init.el says so. You can answer your question by working through init.el and looking for require or load lines, which will be processed in the order they appear. This is recursive, so if init.el requires sourceA.el, and sourceA.el requires sourceB.el, then sourceB.el gets loaded too.
The point of require is not lazy-loading (that would be autoload instead). Instead, the purpose is to avoid loading the same package multiple times.
In the case of config files, which of load or require is preferable is unclear and will depend on your particular use case (but I think in most cases the difference will be negligible).
While switching configurations I've came across this issue yet again and I believe I have a workaround for this if you're still interested.
The steps I do to reproduce:
start fresh emacs,
venv-workon to activate a virtualenv,
open a python buffer,
try elpy-goto-definition, receive the same error message you did.
(elpy-config confirms everything is ok)
You can throw the burden of iterating onto lisp's read.
To do that you just need to realize that the list in journals is a lisp list with the beginning and ending parentheses missing. So fill-in the missing and read.
[Ive renamed your list-of-cons-cells.el to journals.txt since its a lisp data-structure but not lisp code]
Command dirtree is not marked for autoloading so you need do (require 'dirtree) first.
Or follow instructions provided in dirtree commentary section:
Put the following into your ~/.emacs:
(autoload 'dirtree "dirtree" "Add directory to tree view" t)
I had to install notmuch in order to solve the problem.
Apparently I only had the notmuch-runtime installed but not  notmuch itself.
Installing notmuch with $ sudo pacman -S notmuch was my solution.
After trying @luc-duzan's answer, Spacemacs prompted me for whether to persist the setting. When I selected yes, the following was added to my buffer:
-- Local Variables:
-- idris-load-packages: ("contrib")
Sure enough, this caused it to work after closing and re-opening Spacemacs, without going back through the steps. It's a bit of noise added to ...
The function load-library is just a few lines long. If we type M-x find-function RET load-library RET we see that the variable completion-ignored-extensions is let-bound to nil. Therefore, a new function would be needed that either sets completion-ignored-extensions on a let-bound basis to the desired value(s) or eliminates the variable entirely from the ...
The usual way to bundle elisp code for redistribution to Emacs users is via package.el, which is described in the elisp manual. This information is available from within emacs as well, C-h i m elisp <RET> m packaging <RET>.
Start there, and if you have specific questions about that process open a new question here.
For the particular issue you ...
An interesting and efficient method for your goal is the macro use-package, excerpt from author's readme:
"The use-package macro allows you to isolate package configuration in
your .emacs file in a way that is both performance-oriented and, well,
tidy. I created it because I have over 80 packages that I use in
Emacs, and things were getting ...
You can try this.
Basically it uses a bootstrap dynamic module to provide an alternative load mechanism, with support for unloading.
Although it's aimed towards Rust, it should also work with C modules that define int emacs_rs_module_init(struct emacs_runtime *ert).
;; Load the alternative loader
;; It's ...
You can either add :ensure t to each package you want to load from ELPA, or add (setq use-package-always-ensure t) to the beginning of your emacs config file and add :ensure nil to those few packages that you do not want from ELPA.
Packages are downloaded or upgraded at load time. When you want to install a new package, you should write the use-package sexp ...