For C/C++, people use #ifdef .. #endif technique to prevent reloading libraries, and Objective-C uses import to do the same thing.
How about lisp/elisp? If (require 'cl) is used before, and (require 'cl) is seen somewhere, lisp is clever enough not to load it again? Or, is there any way to prevent this reloading libraries?
...
Is there SQLite wrapper for elisp?
If not, is it a good idea to call python code that takes control of SQLite through start-process or something? Is there better way to use SQLite from elisp?
...
If I execute a shell command asynchronously in emacs lisp like so:
(shell-command "mycommand &")
Is there a way to wait for the command to generate output before continuing? For my current application, it is probably sufficient to wait until the command generates any output at all, but ideally I'd like to capture the output for additi...
I need to get a range (or whole range) of current buffer, run program to process the range as an input, get the result and to put the string at the end of the current buffer.
I learned that shell-command-on-region can process a region.
I learned that shell-command-to-string can store the result of the program to a string.
Then, how ...
Hi!
Can you give me some examples of tasks unsuited for dynamically scoped lisps? I'm failing to see how the Lexical scope is so much better and not just a matter of changing the coding style, so I'd love to code something and see it with my own eyes.
Thanks!
...
I want to be able to use the emacs folding mode provided by folding.el from http://www.emacswiki.org/emacs/FoldingMode
I put the following in my .emacs file:
(setq load-path (cons (concat (getenv "HOME") "/.emacs.d") load-path))
(load "folding")
(folding-mode-add-find-file-hook)
(folding-add-to-marks-list 'latex-mode "%{" "%}" nil ...
emacs. when using bookmarks to open a file, is there a way to always open at a particular position of the file?
thanks.
...
I'm writing a mode which is actually a glorified markdown reader. It's a read-only mode however, and though I'd like to change the faces for bold, italics, and links, I'd love to remove the decorations surrounding those faces. However, when I do so, I lose the fontification. Is there anyway to modify fontified-text to something that no l...
I cannot find the setting that prevents deletion of an entire region when you have it highlighted and you hit backspace... (I just want it to delete one character even if a region is highlighted.) I already have
(delete-selection-mode 0)
and in custom-set-variables (I have cua-mode enabled for its rectangle functions),
'(cua-delete-s...
I know little elisp, and I'm trying to figure out how to call a function that takes a property list as one of its arguments. The particular function is rudel-join-session from the Rudel package; I'm trying to set it up so Rudel will automatically join a session when Emacs starts. I'm not sure how property lists work, so I tried doing thi...
I was recently browsing around for an emacs mode for php and the like and decided to settle on nXhtml. However, I keep getting the following error: whenever I open up an html file, the entire file is highlighted in blue. Needless to say, this is quite the annoyance. I figure it's probably because my html files don't have any xhtml spe...
I add the following preprocessor code in header files all the time.
#ifdef _HELLO_H_
#define _HELLO_H_
#endif
Is there a way to do this automatically (I mean, when I load the header file for the first time, the emacs just adds the code), or manually (I mean, I have some M-x SOMETHING)?
If none exists, how can I program the elisp co...
Im making a DSL in lisp (basically what i think is a nicer syntax), its the same thing as lisp except with different 'primitives', no instead of not, 'as' instead of let.Thus i need to change both indentation and color only in files which end in .goby (it should not effect ones which end in .lisp) So i would like to create files with ex...
I would like that my linum-mode numbering is right aligned. The closest thing I've found is on emacswiki, but it doesn't work - it seems to left align the digits instead of right align it. The snippet is found here. Sorry for the horrible indenting, lisp is pretty alien to me :)
(setq linum-format
(l...
Hi, I have a function to compress my pdf file using pdftk:
(defun compresspdf (filename)
(interactive)
(let ((tmpfile (concat filename "~")))
(start-process-shell-command "pdftk" nil
(format "pdftk %s cat output %s compress dont_ask"
filename tmpfile))
(rename-file tmpfile filename t)))
It compresses the file a...
I have been going through the emacs ebrowse info pages learning how to use it. I have hit a snag though. I am upto the "Member Buffers -> Switching Classes" page in which is states that I can swap classes using the "C c" key combination. Whenever I try to change to another class in the source tree it just spits out this error:
"ebrowse-...
Is there a way to define aliases so that shell-command can recognize them? shell recognizes those defined in .emacs.d/init_bash.sh; is it possible to make shell-command aware of these also?
...
I came up with a elisp function, and tried to match a key to the file.
(defun loadtopics ()
"Load the topics.org file"
(interactive)
(load "../topics.org"))
(global-set-key (kbd "C-c C-a") 'loadtopics)
The problem is it's hard to find an unallocated key combination.
Is there any easy way to find key combinations that are not...
I need to get the full path of the file that I'm editing with emacs.
Is there a function for that?
If not, what would be the elisp function for getting that?
How can I copy the result (path name) to a clipboard so that I can reuse it?
I'm using Mac OS X and Aqumacs.
(setq filepath (get-fullpath-current-file)) ???
(copy-to-clipboard...
For now I've stuck with multi-occur-in-matching-buffers and rgrep, which, while powerful, is still pretty basic I guess.
Eventhough I realize anything more involved than matching a regexp and renaming will need to integrate with CEDET's semantic bovinator, I feel like there is still room for improvement here.
Built-in functions, packag...