dot-emacs

Setting Emacs 24 color theme from .emacs

ⅰ亾dé卋堺 提交于 2019-11-28 15:59:10
问题 I have the following code in my .emacs: (if (null window-system) (progn (require 'color-theme) (color-theme-initialize) (color-theme-simple-1))) When I open Emacs on the console, I can verify that the progn block runs (by a (message "Got here.") ), and I see a flash that suggests that the color theme was loaded, but if it was loaded, it is overridden by something else. If, after loading, I open my .emacs file and submit the block above using C-x C-e , it works. I've tried doing: (add-hook

Tips for profiling misbehaving Emacs Lisp?

拜拜、爱过 提交于 2019-11-28 15:57:58
问题 I customize Emacs a lot. Recently, I added something to my .emacs configuration that sporadically pegs my CPU at 100%, but I really don't know what it is. If I press C-g a bunch of times, eventually I'll get a message below the minibuffer asking me if I want to auto save my files and then if I want to abort emacs entirely. If I keep saying no and keeping pressing C-g, eventually I can get back to running emacs as normal. An hour or so later it will happen again. I could keep going about like

How to execute emacs grep-find link in the same window?

女生的网名这么多〃 提交于 2019-11-28 03:17:01
问题 When I use grep - find it opens another window (area in the frame) with a list of results that I can select. When I select one it opens the target file in a different window than grep - find is in. How can I get the target file to open in the same window as the grep results (replacing the grep results window with what I am actually looking for). How can I keep grep-find from opening a separate window (have it so it opens in the current window). My goal is I look for something, I find it, I go

Saving Window Configurations in Emacs

本小妞迷上赌 提交于 2019-11-27 19:26:36
I'm wondering if there's a way to save window configurations across emacs sessions. I know desktop-save is fantastic for preserving buffers and whatnot and the emacs manual demonstrates storing a window configuration into a register but this doesn't persist across sessions. Of course this doesn't seem like it would be too hard to implement myself... EmacsWiki is a great resource: EmacsWiki: Session Management Looks like Windows Mode , or more specifically revive.el, is what you want. A lot has changed since 2008, and desktop-save-mode now also restores windows accross sessions. Emacs 24.4 and

PATH and exec-path set, but emacs does not find executable

依然范特西╮ 提交于 2019-11-27 18:21:53
My .emacs contains (setenv "PATH" (concat ".:/usr/texbin:/opt/local/bin" (getenv "PATH"))) (setq exec-path (append exec-path '(".:/usr/texbin:/opt/local/bin"))) (add-to-list 'load-path "/usr/local/share/emacs/site-lisp") (require 'tex-site) (load "auctex.el" nil t t) (load "preview-latex.el" nil t t) /usr/texbin is where latex/pdflatex/.. are located. /opt/local/bin/ is where gs can be found. And yet when I run preview-at-point, which apparently needs both latex and gs, I get Preview-DviPS finished at Thu Dec 22 11:25:46 DviPS sentinel: Searching for program: No such file or directory, gs

Emacs - Error when calling (server-start)

送分小仙女□ 提交于 2019-11-27 06:04:39
I am currently using GNU Emacs 23.0.93.1 in Windows Vista SP1. In my .emacs file I make a call to (server-start) and that is causing an error with the message The directory ~/.emacs.d/server is unsafe . Has anyone seen this and know a fix or workaround? ... other than leaving server turned off ;) Here is the stack trace: Debugger entered--Lisp error: (error "The directory ~/.emacs.d/server is unsafe") signal(error ("The directory ~/.emacs.d/server is unsafe")) error("The directory %s is unsafe" "~/.emacs.d/server") server-ensure-safe-dir("~\\.emacs.d\\server\\") server-start(nil) call

What's in your .emacs?

帅比萌擦擦* 提交于 2019-11-26 21:14:09
I've switched computers a few times recently, and somewhere along the way I lost my .emacs. I'm trying to build it up again, but while I'm at it, I thought I'd pick up other good configurations that other people use. So, if you use Emacs, what's in your .emacs? Mine is pretty barren right now, containing only: Global font-lock-mode! (global-font-lock-mode 1) My personal preferences with respect to indentation, tabs, and spaces. Use cperl-mode instead of perl-mode. A shortcut for compilation. What do you think is useful? Use the ultimate dotfiles site . Add your '.emacs' here. Read the '.emacs'

PATH and exec-path set, but emacs does not find executable

谁说胖子不能爱 提交于 2019-11-26 19:19:28
问题 My .emacs contains (setenv "PATH" (concat ".:/usr/texbin:/opt/local/bin" (getenv "PATH"))) (setq exec-path (append exec-path '(".:/usr/texbin:/opt/local/bin"))) (add-to-list 'load-path "/usr/local/share/emacs/site-lisp") (require 'tex-site) (load "auctex.el" nil t t) (load "preview-latex.el" nil t t) /usr/texbin is where latex/pdflatex/.. are located. /opt/local/bin/ is where gs can be found. And yet when I run preview-at-point, which apparently needs both latex and gs, I get Preview-DviPS

Emacs - Error when calling (server-start)

懵懂的女人 提交于 2019-11-26 11:53:09
问题 I am currently using GNU Emacs 23.0.93.1 in Windows Vista SP1. In my .emacs file I make a call to (server-start) and that is causing an error with the message The directory ~/.emacs.d/server is unsafe . Has anyone seen this and know a fix or workaround? ... other than leaving server turned off ;) Here is the stack trace: Debugger entered--Lisp error: (error \"The directory ~/.emacs.d/server is unsafe\") signal(error (\"The directory ~/.emacs.d/server is unsafe\")) error(\"The directory %s is

Emacs 24 Package System Initialization Problems

喜欢而已 提交于 2019-11-26 11:44:12
It seems to me that the new Package system that is built-in on Emacs 24 has some flaws when it comes to properly loading and initializing the installed packages. Recently, I upgraded to Emacs 24.1.1 which was realeased on 6/10/2012 and I have been trying to use the built-in package system and have installed several packages using it, but they all have a similar problem related to autoload and initialization. For example, I use a package called smex which provides enhancements for using the M-x chord. It requires you to define a key for M-x , so I added (global-set-key (kbd "M-x") 'smex) in my