emacs24

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

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

别来无恙 提交于 2019-12-02 14:17:20
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? ataylor You can get a list of currently installed packages (excluding built in packages) from the variable package-activated-list .

Emacs Client: difference between C-x k and C-x #

一个人想着一个人 提交于 2019-12-02 10:59:40
问题 When running emacs in daemon with a client and I hit C-x k, it says: Emacs buffer still has clients. Are you sure you want to quit? But when using C-x #, it exits immediately. I don't understand the difference. Why doesn't C-x k just behave normally in the first place, if its in a client? I found this snippet that's supposed to make C-x k behave properly but I don't understand the difference. Furthermore, when an emacs client starts up, it starts with the previous buffer for a few seconds

Configuring emacs for showing fixed width inline images

半腔热情 提交于 2019-12-02 04:28:48
问题 Follow up to: Emacs org-display-inline-images I managed to show inline images following abo-abo's advice. Now I want to set a fixed width size for all of them. Setting (setq org-image-actual-width 50) didn't work. Emacs picked the variable, but it isn't doing anything to the images. The idea is to show them as thumbnails. Note: I am using emacs 24.2 on Linux. I can show thumbs using M x image-dired, however, I want to show fixed size images under org mode. Normal images can already be shown.

Reverse evaluation order of split-height-threshold and split-width-threshold in Emacs for display-buffer

孤者浪人 提交于 2019-12-02 04:08:48
问题 When display-buffer has to create a new window in an existing pane, the Emacs manual states that split-height-threshold is looked at first to determine if the new window can be below the current one, then split-width-threshold is evaluated in the same way for side-by-side windows. Is there a way to make Emacs try first to put the windows side by side first if the width is high enough? I can set split-height-threshold to nil to inhibit vertical split altogether, but that makes Emacs steal

Emacs Client: difference between C-x k and C-x #

荒凉一梦 提交于 2019-12-02 03:54:12
When running emacs in daemon with a client and I hit C-x k, it says: Emacs buffer still has clients. Are you sure you want to quit? But when using C-x #, it exits immediately. I don't understand the difference. Why doesn't C-x k just behave normally in the first place, if its in a client? I found this snippet that's supposed to make C-x k behave properly but I don't understand the difference. Furthermore, when an emacs client starts up, it starts with the previous buffer for a few seconds then opens up the new buffer. Isn't the point of emacs server to speed up the initial start up time? Why

Configuring emacs for showing fixed width inline images

不想你离开。 提交于 2019-12-02 01:27:26
Follow up to: Emacs org-display-inline-images I managed to show inline images following abo-abo's advice. Now I want to set a fixed width size for all of them. Setting (setq org-image-actual-width 50) didn't work. Emacs picked the variable, but it isn't doing anything to the images. The idea is to show them as thumbnails. Note: I am using emacs 24.2 on Linux. I can show thumbs using M x image-dired, however, I want to show fixed size images under org mode. Normal images can already be shown. I've looked at org-display-inline-images source: it's just calling create-image . It seems there's no

Lexical eval in emacs24

China☆狼群 提交于 2019-12-01 20:25:51
问题 Can anybody explain me how eval works with emacs24? From eval description: eval is a built-in function in `C source code'. (eval FORM &optional LEXICAL) Evaluate FORM and return its value. If LEXICAL is t, evaluate using lexical scoping. Does that mean, that something like this should work? (setq lexical-binding t) (let ((myvarr 42)) (eval 'myvarr t)) ; (void-variable myvarr) Update: (setq lexical-binding nil) ;; => nil (let ((myvarr 42)) (eval 'myvarr)) ;; => 42 (#o52, #x2a, ?*) (setq

Lexical eval in emacs24

痴心易碎 提交于 2019-12-01 18:42:41
Can anybody explain me how eval works with emacs24? From eval description: eval is a built-in function in `C source code'. (eval FORM &optional LEXICAL) Evaluate FORM and return its value. If LEXICAL is t, evaluate using lexical scoping. Does that mean, that something like this should work? (setq lexical-binding t) (let ((myvarr 42)) (eval 'myvarr t)) ; (void-variable myvarr) Update: (setq lexical-binding nil) ;; => nil (let ((myvarr 42)) (eval 'myvarr)) ;; => 42 (#o52, #x2a, ?*) (setq lexical-binding t) ;; => t (let ((myvarr 42)) (eval 'myvarr)) ;; Debugger entered--Lisp error: (void-variable

How to add a tool-bar button in emacs?

你离开我真会死。 提交于 2019-12-01 11:05:08
I try to add a button in the tool-bar but that doesn't works. how to do that, i check in Emacs wiki and i find nothing. I used emacs 24.3.1. The toolsbar are displayed but not my new item. I can run it with eval-buffer but not with my .emacs or find another solution to resolve that. When i add it with eval-buffer my button leave my toolbar after a scroll. (defun omar-hotel () "another nonce menu function" (interactive) (message "hotel, motel, holiday inn")) (define-key global-map [tool-bar omar-button] '(menu-item "Hotel" omar-hotel :image (image :type xpm :file "/usr/share/emacs/24.3/etc