dot-emacs

Alias to make emacs open a file in a new buffer (NOT frame) and be activated/come to front?

喜欢而已 提交于 2019-12-05 15:58:00
What I have so far is alias em="open -a /Applications/Emacs.app "$@" && osascript -e 'tell application "Emacs.app" to activate'" But I am stumped. With that code, em file.txt will activate, but won't open the file . And I get '22:23: syntax error: Expected end of line but found unknown token. (-2741)' Doing alias em=open -a /Applications/Emacs.app "$@" Works fine and then it will open the file, but obviously not bring emacs to the front. And for some strange reason osascript -e 'tell application "Emacs.app" to activate' doesn't activate emacs.... I have no idea what is going on. I am happy to

what is custom-set-variables and faces in my .emacs?

与世无争的帅哥 提交于 2019-12-04 15:49:05
问题 this is in my .emacs can I mess with it or not? (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than

Sublime Text 2's “Goto Anything” (or instant search) for Emacs?

ε祈祈猫儿з 提交于 2019-12-04 07:44:14
问题 I tried out Sublime Text 2 recently, and I found Goto Anything superbly useful for navigating source code (Ctrl-P file@symbol seems to work really well). Is there something similar for Emacs? Preferably something that just works, without a ton of custom elisp. What I've tried so far: I've seen Helm and Anything, but as far as I understand neither of them is capable of actual "instant" search (see edit below). I've used multi-occur-in-matching-buffers, but it too seems unable to satisfy the

Setting tab size in Emacs

这一生的挚爱 提交于 2019-12-03 17:30:23
I'm using Emacs as an editor. I want to set the tab size to four spaces. In my .emacs file I have the following: (setq default-tab-width 4) I've also tried: (set-default tab-width 4) Either way, when I open emacs and try to tab, it inserts two spaces. Am I doing something wrong? It almost seems like its not seeing my .emacs file. Any suggestions would be great! Thanks! The tab-width variable doesn't determine the amount of indenting per level, and the TAB key doesn't insert a tab: it indents the current line to the correct indentation level in most language modes. If you're programming in C, C

how to get focus-follows-mouse over buffers in emacs?

假如想象 提交于 2019-12-03 11:18:25
Suppose I have a source file open and I launch a shell. I can hit C-x o to switch between the two buffers. But how can I get it so that when I move the mouse the buffer under the mouse gets focus, just like the "focus follows mouse" option common in window managers? Set: (setq mouse-autoselect-window t) Answering the shift+arrow comment, do in your .emacs: (windmove-default-keybindings) 来源: https://stackoverflow.com/questions/898401/how-to-get-focus-follows-mouse-over-buffers-in-emacs

why cant emacs 24 find a custom theme I added?

萝らか妹 提交于 2019-12-03 10:20:09
问题 My entire emacs setup is here I loaded my init-theme.el file here And supposedly that should make the darkclean theme available. But when I type M-x load-theme TAB the darkclean theme is not listed. How can I register it for Emacs 24? 回答1: If you install themes via elpa / package.el you'll notice that you need to add each theme folder into your custom-theme-load-path - this is a bit of a pain to do manually, especially when you take into account upgrades will create a new folder, e.g. 0.1.0 -

what is custom-set-variables and faces in my .emacs?

我只是一个虾纸丫 提交于 2019-12-03 09:49:37
this is in my .emacs can I mess with it or not? (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(better-fringes-bitmap ((t (:foreground "#00dd44")))) '(font-lock-string

How do I byte-compile everything in my .emacs.d directory?

China☆狼群 提交于 2019-12-03 01:29:04
问题 I have decided to check out Emacs, and I liked it very much. Now, I'm using the Emacs Starter Kit, which sort of provides better defaults and some nice customizations to default install of Emacs. I have customized it a little, added some stuff like yasnippet, color-themes, unbound, and other stuff. I've set up a github repository where I keep all of the customizations so I can access them from multiple places or in case something goes bad and I lose my .emacs.d directory. All of this is very

How to save a list of all the installed packages in Emacs 24?

淺唱寂寞╮ 提交于 2019-12-03 00:53:11
问题 I am using prelude as a base Emacs configuration. I have installed lots of packages from the package manager, and I want to use my settings on another machine. I don't want to carry the installed packages and also I don't want to create a list manually. What is the way of saving a list all the installed packages into prelude-package.el or any other file so that when I take this configuration to my other machine, they automatically get installed there on first use? 回答1: You can get a list of

Sublime Text 2's “Goto Anything” (or instant search) for Emacs?

你说的曾经没有我的故事 提交于 2019-12-02 15:52:12
I tried out Sublime Text 2 recently, and I found Goto Anything superbly useful for navigating source code ( Ctrl-P file@symbol seems to work really well). Is there something similar for Emacs? Preferably something that just works, without a ton of custom elisp. What I've tried so far: I've seen Helm and Anything , but as far as I understand neither of them is capable of actual "instant" search (see edit below). I've used multi-occur-in-matching-buffers , but it too seems unable to satisfy the "instant" criterion. imenu / idomenu works well for single files, but doesn't work across files. I