emacs

How to know the line number corresponding to a buffer position?

When Emacs reports error it always show code with a buffer position, with which it is quite unconvenient to find out where the exact words locate. It there any way to know the exact line number of the buffer position? ...

C-Tab cannot be recognized in terminal?

I want to bind company-mode-map to C-tab, but it seems doesn't work. And I typed C-h k C-tab, it just said that I typed TAB but not C-Tab. It works in Xwindows, is there any way to fix the problem in terminal mode? ...

In emacs, how do I highlight the current line in the current frame only?

In Emacs (23 on Mac Leopard), I've discovered how to highlight the current line with hl-line-mode, but when using it globally in all buffers, it highlights the current line in all buffers in all frames. I'd like to be able to highlight the current line (or at least have a different face for it) in only the currently active buffer. I'm ...

How can I check if a file exists using emacs lisp?

I would like emacs to mark files that are generated as read-only when they're opened. The part of the puzzle that I'm missing is how to check if a file "exists". I currently have the following: ;; ;; get file extension ;; (defun get-ext (file-name) (car (cdr (split-string file-name "\\.")))) ;; ;; get the base name of the file ;; ...

How to change the working directory for build/debug in Emacs?

I'm trying to get accustomed to using Emacs for building and debugging, although I'm having some difficulties. My biggest problem right now is that I need to be in (e.g. have a file open in) the root directory to make -k my applications and I need to be in the binaries directory to run gdb MyApp. Is it futile to try to get Ctrl+Shift+B ...

How to do massive search and replace in emacs?

Possible Duplicate: Using Emacs to recursively find and replace in text files not already open Duplicate: using-emacs-to-recursively-find-and-replace-in-text-files-not-already-open I need to to regexp search and replace on a list of files. Is there an emacs command (command combo) for that? Or maybe you have a better way to...

emacs: Does HideShow work with xml-mode (sgml-mode)?

I use hideshow.el in my cc-mode buffers to collapse sections of the file I'm not looking at. It would be nice to be able to do that in an XML doc. I use emacs 22.2.1 and the built-in sgml-mode for xml editing. I haven't gotten hideshow to work with the XML. I mean, I turn on the minor mode but the keystrokes have no effect. Ooh, e...

How don't use Gnus adaptive scoring in some newsgroups?

If I do: (setq gnus-use-adaptive-scoring t) The adaptive scoring works properly, but for all groups. Then I tried this, but without success: (setq gnus-parameters '(("mail\\..*" (gnus-use-adaptive-scoring nil)) ("gmane\\..*" (gnus-use-adaptive-scoring t)))) Can anyone help me with this? ...

Emacs 23, OS X, multi-tty and emacsclient

How can I get emacs 23 working nicely in multi-tty mode on OS X? I've added (server-start) to my .emacs, and have discovered that running /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -n ~/myfile.txt will open it in my emacs.app, but it doesn't bring emacs to the front. So, how can I get emacs.app to come to the front when I r...

How auto subscribe on new IMAP folders in Gnus?

I need automatically subscribe on new IMAP folders created by my IMAP server in Gnus. How to do this? ...

Indenting template arguments in Emacs

I'm having no luck getting Emacs (cc-mode) to indent multiline template arguments. Here's an example line: typedef ::boost::zip_iterator< ::boost::tuple< vector<int>::const_iterator, vector<float>::const_iterator > >; I'd like the second line to be indented, as like in a function. It is indented, until I enter the second-to-last >, ...

Convert syntax highlighted code to HTML in Emacs

In TextMate there is a feature called "Create HTML from Document", which converts displayed code including syntax coloring to HTML/CSS for easy online publishing. I wonder if there is such a feature hidden in Emacs or maybe an extension that I could install to do that. ...

Is there a multilanguage program that will generate emacs-compatible who-calls information?

There is, and has been for awhile, the excellent etags program. For many languages it allows one to generate a TAGS file which emacs can use to jump from a call site to the definition. The versions of etags I have seen support literally oodles of languages. Is there a similar program that can generate who-calls data? For example, giv...

How do you change the emacs init file to customize the font for new frames?

I want to know, what text do I have to input in the .emacs file so that it uses a especific font (like the clean 5x8) on the new frames, such as with the speedbar. I can modify the speedbar font size and type by using SHIFT-LeftClick but I want it to stay by default. ...

Modify mode-compile.el to handle MS-Windows paths with imbedded blanks?

Can anyone suggest a modification of mode-compile.el that will make it work better on Windows? My specific issue is handling of path names that contain blanks. I'm working on code in Ruby, using "GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600) of 2008-03-26 on RELEASE" with mode-compile.el version: 2.29 (Last modified: 2006/12/01 13:52:47) T...

How do you activate line-wrapping in emacs?

How do you use line-wrap (autoscrolling?) in emacs? So that the portion that doesn't fit on the screen isn't shown as opposed to shown on the next line? ...

Using visual studio 6 c++ compiler from within emacs

Hey guys, I'm just getting started with c++ development and I would like to use emacs to write the code and then compile and run it from within emacs using the visual studio 6 compiler. I have already googled around a bit but just can't seem to find an explanation of how this is done. Any pointers? Thanks for your help, joerg ...

configure emacs variables for a specific function

I run an email client in a separate emacs window (usually connecting to gnuserv), for example, emacs -f wl (the email client being Wanderlust, which probably doesn't matter much). Is it possible to make emacs remember my preferred window layout, main window dimensions, fonts, colours, etc., to set these up only when wl is called?...

What are good practices to get GNU emacs and xemacs co-habitate.

I would like to make a gradual switch from GNU Emacs to Xemacs. Are there tricks I can use to have the two play well? Currently, I see the following issues: xemacs alters .emacs The two do not like each others .elc files. Thanks! ...

Emacs indentation of break after switch statement

Right now the standard emacs indentation works like the following: switch (cond) { case 0: { command; } break; } I want the break; to line up with case. Also, is there a list of the c-set-offset commands somewhere? ...