dot-emacs

how to delete region with [delete] key in emacs

只愿长相守 提交于 2019-12-12 11:01:44
问题 I am using Emacs 23.3 on Mac OS X Lion. How can I delete the selected text region with simple key typing—something like delete or C-d ? This works on windows without setting anything specific. How can I implement that in Mac OS X Lion? 回答1: Try M-x cua-mode . This will change a lot of things about the way Emacs behaves to fit the behavior of other GUI applications. For more information, see M-S-: (info "(emacs) CUA Bindings") . You can turn it on persistently with M-x customize-option RET cua

Qt Mode for Emacs

守給你的承諾、 提交于 2019-12-12 09:54:06
问题 What are you using to develop Qt code in Emacs, so that it's highlighted/indented properly? This page explains an extension to CC mode, but it seems a little outdated. Since Qt is constantly evolving, is there a more up-to-date Qt mode available? 回答1: That page makes it pretty clear that the standard cc-mode packaged with GNU Emacs is supporting Qt extensions now; just make sure your cc-mode is up to date and you should be all set. 来源: https://stackoverflow.com/questions/6144512/qt-mode-for

gdb within emacs on Windows

别等时光非礼了梦想. 提交于 2019-12-11 12:30:42
问题 I'm running Emacs 22.3 in Windows. Earlier today I had gdb working within Emacs just fine. I was installing QT4 and during the installation it asked me to uninstall MSYS which I quickly clicked through not thinking about things. I think I had gdb installed with the MSYS package and Emacs was using that, but I'm not completely sure. Now when I run the following I get an error in the mini-buffer. M-x gdb "Searching for program: no such file or directory, gdb" I tried to add the path " C:\cygwin

How do I get my cocoa emacs on Mac OS X to load my .emacs visual customizations for new windows (any document opened after the first)?

老子叫甜甜 提交于 2019-12-11 05:24:51
问题 So I just downloaded emacs 23.1 for my new snow leopard macbook pro from http://emacsformacosx.com/ and it works like a charm, except... I have visual customizations in my .emacs, a few lines are extracted here: (set-background-color "black") (set-cursor-color "green") (set-default-font "- -Lucida Console-normal-r-normal-normal-18- -96-96-c-*-iso10646-1") I also have some key bindings set up, here are a few lines of those (global-set-key "\C-l" `goto-line) (global-set-key [(control ?%)]

Emacs - set mark on edit location

只谈情不闲聊 提交于 2019-12-10 18:49:08
问题 I want emacs to add last edit location to the mark ring, so I can jump back to previous edit locations. Ideally this would only mark one edit location per line. When I edit another line, the last edit location on that line would be added to the ring, and so forth. I'm not familiar with Lisp to implement this myself. If anyone knows of a plugin or can kindly provide a solution that would be great! :) 回答1: Session.el provides this functionality bound to "C-x C-/" or session-jump-to-last-change

setq of case-sensitivity in .emacs has no effect

坚强是说给别人听的谎言 提交于 2019-12-10 15:05:58
问题 I have a lot of custom stuff in my .emacs file: fonts, colors, window sizing, key bindings, etc. All of it works. Then at the end, I just added a: (setq case-fold-search nil) . It's a variable that when set to nil is supposed to make search case-sensitive in all emacs modes. It doesn't for me. Setting case-fold-search to nil in an individual buffer works, but when I set it in .emacs , it doesn't work. Is there a reason why a setq declaration in a .emacs may not work sometimes? How should I

When using two frames in emacs, how do I prevent the compilation buffer from showing up in both?

荒凉一梦 提交于 2019-12-08 22:42:19
问题 I work with two monitors, and often use emacs with two frames open; one for each monitor. each frame is split into two side-by-side windows, like so: a | b <-- frame 1 in monitor 1 ------- c | d <-- frame 2 in monitor 2 When I hit my 'compile' button while in window a, the compilation buffer opens in the buffer next to it. So far so good: a | compilation ----------------- c | d However, if I then move to window c to edit some stuff, then hit compile again, window d visits the compilation

How to get whitespace-mode enabled only for certain modes

烂漫一生 提交于 2019-12-08 17:28:41
问题 I'm trying to get emacs whitespace-mode enabled automatically only in certain modes. According to the documentation, enabling global-whitespace-mode and setting the whitespace-global-modes variable should do exactly that. But I can't get it to work correctly. In my .emacs.el I have: (require 'whitespace) (global-whitespace-mode t) (setq whitespace-global-modes '(c-mode c++-mode)) but the definition of whitespace-global-modes seems to be ignored; global-whitespace-mode is enabled in every

Bazaar: how put files from different locations in one repository?

末鹿安然 提交于 2019-12-08 13:09:09
问题 I'm new to bazaar and would like to give it a try by storing my Emacs configuration files in one repository. These files consist of a .emacs file in my home directory (on unixish systems) and a couple of Emacs Lisp source files in /usr/local/share/emacs/site-lisp I'd really like to have one repo because some changes in my .emacs file go together with changes in other files. What I couldn't work out from the manual is how to get these files together. The "bzr init" takes recursively all files

Qt Mode for Emacs

人盡茶涼 提交于 2019-12-05 22:44:48
What are you using to develop Qt code in Emacs, so that it's highlighted/indented properly? This page explains an extension to CC mode, but it seems a little outdated. Since Qt is constantly evolving, is there a more up-to-date Qt mode available? That page makes it pretty clear that the standard cc-mode packaged with GNU Emacs is supporting Qt extensions now; just make sure your cc-mode is up to date and you should be all set. 来源: https://stackoverflow.com/questions/6144512/qt-mode-for-emacs