Hot answers tagged

18

M-x cd This should solve your problem.


15

Take a look at the system-configuration-options variable. Here's an example, which is the result of running C-h v system-configuration-options system-configuration-options is a variable defined in `C source code'. Its value is "--prefix=/usr/local/emacs 'CFLAGS=-O2 -march=native -pipe -falign-functions=64 -fomit-frame-pointer -ftracer -funit-at-a-time -...


11

If you use use-package, you can move that file around from computer to computer, and when Emacs starts up, as long as you have internet access, it will pull in the packages and configure them. First, set up the package library: (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (package-initialize) ...


9

The correct solution is to use straight.el, a package manager that I wrote to solve this problem. You can find more details about this in another answer to this question. This answer, which was written months before I started work on straight.el, previously described a strictly inferior way of achieving a partial solution. This approach is described briefly ...


8

How can I keep multiple profiles for Emacs? In a single init file. As others have suggested in the comments above, this is easily done in emacs without having multiple profiles. A single init file can keep the settings for multiple modes. Based on your question, those modes would be Clojure, Mathematica, and Text modes, and perhaps others in future. ...


7

setting default value for auto-fill-column Normally, you'd put such configuration in dotspacemacs/user-config, which is a function in your dotfile (~/.spacemacs). It's possible to use a ~/.spacemacs.d/init.el as your dotfile instead of ~/.spacemacs, which I assume is what Eivind Fond does. The original default value for fill-column is 70. In current ...


6

Next-generation package management with straight.el After a long and frustrating struggle to use package.el + Quelpa to manage my packages, I bit the bullet and wrote my own package manager. It is intended to completely replace package.el by providing a package management experience that is superior in almost every way. You can read the very extensive ...


5

C-h f cd: cd is an interactive compiled Lisp function in files.el. (cd DIR) Make DIR become the current buffer’s default directory. If your environment includes a CDPATH variable, try each one of that list of directories (separated by occurrences of path-separator) when resolving a relative directory name. The path separator is colon ...


5

You can type M-x ielm Then in the REPL type load-path to see what the default is. I know package manager appends to it but I'm not sure what else (if anything) does. You can add (add-to-list 'load-path "~/.emacs.d/lisp/") to your init.el file. It is good to get used to modifying your init.el file. I actually have multiple *.el files for my configuration ...


5

This is most likely an instance of Emacs bug#25228 - custom-set-faces from init file ~/.emacs ignored. Basically Emacs is applying gconf settings which override your customization (Emacs versions prior to 25.1 apparently had some bug which prevented the settings from applying at all). To disable gconf updates, add this your .emacs: (define-key special-...


5

Symlinks usually work fine in this scenario, so that's unlikely to be a problem. You should check the file and directory permissions.


4

Since Magit can't find my .gitconfig file even though it is in the HOME path of Emacs, git config --system can be used to change user name and email such that Magit can find them.


4

You can use cask to manage your packages. Use git/github to source control and sync your emacs dotfiles.


4

The terminal application has full control over the graphical elements. The gui terminal app will give text applications some control via “escape codes”. For example, vt100/xterm terminals, including Mac OS X Terminal, allow you to change colors using the sequence ESC [ numbers m. Try it in the shell: echo -e "\e[1;37;41mhello" This should print the word “...


4

On the first computer you have AUCTeX installed, on the second one emacs is using its default mode for editing tex files.


4

As I can see from one of your comments, the main point is to run Emacs faster in some cases. Then there are several options for you. You can load your GUI-related configuration only when you run Emacs in GUI mode. You can use something like the following code (just place your GUI-related configuration in init_gui.el): (when window-system (load "~/.emacs....


4

I think the only way Emacs offers to control the cwd of the process is the --chdir command line argument. Once the process is started, there is currently no way to modify it.


4

I would like to have emacs in English only, Emacs is already English only. to have for example eshell or built-in gdb output in English. gdb output is not builtin to Emacs, it comes from gdb. By eshell, I assume you refer to external programs which you call from eshell. On a Unixish system, you can tell programs to use non-localized message and ...


3

You can achieve this "fast load, slow load" using the server/client functionality of emacs, which works like this: Emacs can be started as a server. This can either be done as a stand-alone, running a server in the background. Or, if you want to, say, run a main GUI instance of emacs, the GUI and server can be started at the same time. Once the server is ...


3

This line is in error: (add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode)) It doesn't open .tpl files and .php files in web-mode, it opens files ending .tpl.php in web-mode. Amusingly, I have that in my init file also; it came from somewhere on the web. And it doesn't work for me either. So, to fix it, add two separate lines, one for each ...


3

Dunno about a command-line switch, but: If you use library emacsbug+.el, which enhances standard library emacsbug.el, then you can use command ebp-insert-version with a prefix arg, to insert the complete version info, including some build info, in the current buffer. This is the same version info that is included when you use command report-emacs-bug. For ...


3

The easiest way is to use load. (load-file "~/elisp/foo.el") More ways you can find in the Spacemacs configuration layer docu.


3

I just did that using chemacs. Considering you don't have an .emacs file in your home folder you can follow this instruction to install it: Clone the Git repository, and run install.sh $ git clone https://github.com/plexus/chemacs.git $ cd chemacs $ ./install.sh you should get this message: OK Creating symlink ~/.emacs -> /home/arne/chemacs/....


3

If you mean specifically "all files in the /etc/ directory," you could add an absolute path to your auto-mode-alist: (add-to-list 'auto-mode-alist '("/etc/.*" . conf-unix-mode))


3

The Bug-Hunter may be able to help you with that. Install the bug-hunter package from the Package-Menu. Invoke M-x bug-hunter-init-file It will ask you for an assertion, type (or paste) in the following predicate and hit RET. (or (member "~/.emacs.d/" load-path) (member (expand-file-name "~/.emacs.d/") load-path)) That's it! You'll be presented with a ...


3

Two approaches come to mind. Use rgrep ... to search for offending code: Open your elpa directory in Dired. If you're not sure where this directory is located, check the value of package-user-dir with C-h v. Call rgrep: M-x rgrep RET add-to-list 'loadpath RET *.el RET RET You might need to play around with the exact search string a bit to narrow down ...


3

Customize default-frame-list to have values for frame parameters top and left that put it in the middle of your screen. (Use M-x customize-option default-frame-alist.) If that doesn't do the job then try the same thing with initial-frame-alist instead (or in addition).


2

If you really want to use more than one full emacs configuration at the same time and not only some major mode configurations, then you can use the configuration that I have described here: https://emacs.stackexchange.com/a/20508/934 With this .emacs-file you can start emacs with a configuration directory: EMACS_USER_DIRECTORY=~/your/emacs.d emacs This ...


2

You could use as many "configurations" as you would like by wrapping your emacs commad to a script that would use different emacs directories (say .emacs.d.clojure .emacs.d.mathematica and .emacs.d.notes) Assuming you are using a Unix type system your emacs incantation would be something like emacs -Q -l .emacs.d.clojure/init.el Another alternative is to ...


2

Adding (setq load-path (cl-delete-if-not #'file-name-absolute-p load-path)) to my .emacs.el fixed this problem for me. The problem manifests itself unless I pass the --no-site-lisp option. I filed a bug report.


Only top voted, non community-wiki answers of a minimum length are eligible