elisp

What is the role of the buried-buffer-list frame parameter in Emacs

In emacs, I've read the following code snippet in simple.el : (frame-parameter frame 'buried-buffer-list) What is the exact meaning of buried-buffer-list parameter ? What it is used for ? ...

Tips for Learning Elisp?

I have been using emacs for years now and I keep meaning to get a better understanding of elisp so I can customize the editor. One problem I have found is that it is a fairly daunting task to get started with. I have a basic understanding of LISP syntax, but is there any articles out there to help someone get started? Perhaps a tutorial...

Getting Emacs fill-paragraph to play nice with javadoc-like comments

I'm writing an Emacs major mode for an APL dialect I use at work. I've gotten basic font locking to work, and after setting comment-start and comment-start-skip, comment/uncomment region and fill paragraph also work. However, comment blocks often contain javadoc style comments and i would like fill-paragraph to avoid glueing together li...

replace-char in Emacs Lisp ?

[I cannot find a question tagged emacs-lisp, so let's start, it will be the first on StackOverflow.] Emacs Lisp has replace-string but I cannot find a replace-char. If I want to replace "typographic" curly quotes (Emacs code for this character is hexa 53979) with regular ASCII quotes, I write: (replace-string (make-string 1 ?\x53979) "...

How do I set the size of emacs' window?

I'm trying to detect the size of the screen I'm starting emacs on, and adjust the size and position the window it is starting in (I guess that's the frame in emacs-speak) accordingly. I'm trying to set up my .emacs so that I always get a "reasonably-big" window with it's top-left corner near the top-left of my screen. I guess this is a ...

Maximizing an Emacs frame to just one monitor with elisp

I use maxframe.el to maximize my Emacs frames. It works great on all three major platforms, except on my dual-head Mac setup (Macbook Pro 15-inch laptop with 23-inch monitor). When maximizing an Emacs frame, the frame expands to fill the width of both monitors and the height of the larger monitor. Obviously, I would like the frame t...

GLSL major mode for emacs?

I found this link http://artis.imag.fr/~Xavier.Decoret/resources/glsl-mode/, but there isn't a lot of description around it, aside that it's "simple". Ideally, I'd like an extension to CcMode that can do it, or at least a mode that can handle auto-styling and has similar shortcuts to CcMode. If there isn't one, any good elisp reference...

Why are fixnums in emacs only 29 bits?

And why don't they change it? Edit: The reason ask is because I'm new to emacs and I would like to use Emacs as a "programmer calculator". So, I can manipulate 32-bit & 64-bit integers and have them behave as they would on the native machine. ...

How to invoke an interactive elisp interpreter in Emacs?

Right now I write expressions in the *scratch* buffer and test them by evaluating with C-x C-e. I would really appreciate having an interactive interpreter like SLIME or irb, in which I could test Emacs Lisp expressions. ...

Emacs: How do you store the last parameter supplied by the user as the default?

I'm writing an interactive function that I'd like to have remember the last argument the user supplied and use it as the default. (defun run-rake (param) (interactive "sTask: ") (shell-command (format "rake %s" task))) The first time the function is invoked I want it to remember the argument the user supplied so that the next ti...

What's in your .emacs?

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!...

Filtering text through a shell command in emacs

Hello, In vi[m] there is the ! command which lets me pipe text through a shell command -- like sort or indent -- and get the filtered text back into the buffer. Is there an equivalent in emacs? Thanks, Rohit ...

How do I pass a function as a parameter to in elisp?

I'm trying to pass one method to another in elisp, and then have that method execute it. Here is an example: (defun t1 () "t1") (defun t2 () "t1") (defun call-t (t) ; how do I execute "t"? (t)) ; How do I pass in method reference? (call-t 't1) ...

Emacs JavaFX Script mode?

Does such a major mode exist? ...

Emacs Lisp: How to add a folder and all its first level sub-folders to the load-path

If I have a folder structure set up like this: ~/Projects emacs package1 package1-helpers package2 package2-helpers package2-more-helpers package3 package3-helpers How do I add these folders: ~/Projects/emacs ~/Projects/emacs/package1 ~/Projects/emacs/packag...

determining the line terminator in emacs

I'm writing a config file and I need to define if the process expects a windows format file or a unix format file. I've got a copy of the expected file - is there a way I can check if it uses \n or \r\n without exiting emacs? ...

what's the fundamental differences of variables and symbols?

I'm rather confused about this. And what's their relationship(e.g., how one can be used in the context of the other)? Much thanks!! ...

Wrapping variable width text in emacs lisp

I am hacking up a tagging application for emacs. I have got a tag cloud/weighted list successfully displaying on a buffer, but i am running into a snag. I need to be able to properly word-wrap the buffer, but I haven't a clue where to start. The font I am using is a variable width font. On top of that, each tag is going to be in a di...

Is there a (repeat-last-command) in emacs?

frequently, I've dug into apropos and docs looking for something like the following only to give up to get back to the task at hand: (repeat-last-command) do the last C- or M- command I just executed (to be rebound to a fn key) or sometimes the related: (describe-last-function) what keystroke did I just mistakenly issue, the effect...

Relative path to absolute path in Elisp

Having a relative path, how do I turn it into an absolute one from the location where the elisp file that I'm loading is. That is, I have an elisp file that I'm loading, it has an relative path and I need an absolute one. ...