Search Results

Search found 103 results on 5 pages for 'elisp'.

Page 4/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • Comments for Function in Emacs

    - by Ryan
    I'm looking for a way to add comments for my functions in Emacs. Of course doxymacs is a nice candidate. But I prefer another way works without the necessary libs. Can anyone recommend some others ways for adding smart comments for functions in Emacs? Thanks. Edit: Now I found this: http://nschum.de/src/emacs/doc-mode/, but it seems that it does not work well after I require it into my .emacs and add hook for js-mode. Doesn't it support js functions ?

    Read the article

  • Can I use the emacs keyboard macro counter as a command prefix?

    - by Sean M
    I'm working on a project in emacs where I'd like to use a keyboard macro that changes slightly with each iteration. When I saw the keyboard macro counter in the manual, that looked like exactly what I needed - but as far as I can tell, that inserts an incrementing number into the current buffer. I want to use an incrementing number as a prefix to another command. For example, instead of inserting 3 into the buffer on the third execution of the macro, I'd like to be able to execute C-u 3 M-x my-command, followed by C-u 4 M-x my-command on the next iteration. Is there way to create a keyboard macro that does this? My specific task is "zipping" two blocks of text in the same buffer together, but even if there's an alternative way to do that specific thing, it'd be good to know the answer to the general question.

    Read the article

  • Emacs auto-minor-mode based on extension

    - by vermiculus
    I found this question somewhat on the topic, but is there a way [in emacs] to set a minor mode (or a list thereof) based on extension? For example, it's pretty easy to find out that major modes can be manipulated like so (setq auto-mode-alist (cons '("\\.notes$" . text-mode) auto-mode-alist)) and what I'd ideally like to be able to do is (setq auto-minor-mode-alist (cons '("\\.notes$" . auto-fill-mode) auto-minor-mode-alist)) The accept answer of the linked question mentions hooks, specifically temp-buffer-setup-hook. To use this, you have to add a function to the hook like so (add-hook 'temp-buffer-setup-hook 'my-func-to-set-minor-mode) My question is two-fold: Is there an easier way to do this, similar to major modes? If not, how would one write the function for the hook? It needs to check the file path against a regular expression. If it matches, activate the desired mode (e.g. auto-fill-mode).

    Read the article

  • What are the reasons why Clojure is hyped and PicoLisp widely ignored?

    - by Thorsten
    I recently discovered the Lisp family of programming languages, and it's definitely one of the more diverse and widespread families in the programming language world. I like Elisp because that most wonderful tool Emacs is an Elisp interpreter. But I was looking for one more Lisp dialect to learn and thought Clojure would be the obvious choice nowadays - until I discovered the well hidden gem PicoLisp. That must be the most intelligent programming environment I have ever seen, like taking the best ideas from Lisp and Smalltalk and adding performance and practicability - and the beauty of parsimony. There is even an Emacs-mode for it. PicoLisp must be the productivity world champion when it comes to building business applications with database and web-client - and that's a very common task. It seems that throwing more and more hardware cores at your PicoLisp application makes it faster and faster, and the database is very performant anyway. However, reactions to PicoLisp in in general mailing-lists etc. are almost hostile (envy?), and there is absolutely no hype and very little publicity (ie not one book published). Are there real justified reasons for this (except the vast amount of java-libs accessible by Clojure, I know that one)? Or is the mainstream it getting wrong again (see C vs Lisp, Java vs Smalltalk, Windows vs Linux) and will come to the conclusion 10 years later that the JVM was good as in between solution, but a really fast Lisp interpreter on multicore machines is much better and allows much cleaner concepts? PS 1: Please note: I'm not interested in Scheme or any Common Lisp dialect, although they might be fine languages. It's just PicoLisp vs Clojure. PS 2: another thing I like about PicoLisp is its similarity to Elisp in certain aspects (both are descendants from MacLisp?) - it's easier to learn two similar languages. There is so much "dynamic binding bashing" on the web, but two of the most appealing Lisp applications use it.

    Read the article

  • Writing or extending existing emacs packages: is it worth or should I move to Netbeans/Eclipse?

    - by Andrea
    I'm finishing my master degree course in CS and I've almost become addicted to Emacs. I've used it to write in C, Latex, Java, JSP,XML, CommonLisp, Ada and other languages no other editor supported, like AMPL. I'd like to improve the packages I've been using the most or create new ones, but, in practice, I find that the implementation of Emacs leaves a lot to be desired. There are a lot of poorly-featured/poorly-maintained packages with either overlapping functionalities or obscure incompatibilities, and Elisp just seems to foster the situation by lacking the common features modern lisps have. In contrast Eclipse and Netbeans are actively improved and it does seem they can be effective for non-mainstream languages. I tried Hibachi for Ada in Eclipse and it worked well, there's CUPS for Lisp in Eclipse and LambdaBeans built using NetBeans components. On the other hand those plugins seem to be less active than their Emacs' counterparts, for example Hibachi was archived last year. What's your opinion on this? Which editor should I write extension for? EDIT: To answer Larry Coleman (see comment below): I like Emacs as a user because it is efficient both for me and the computer I'm using. It's fast and the textual interface (i.e. minibuffer) allows for quick interaction. It's solid and packages are usually small and easy to manage. If I need to correct or remove something I usually just have to change a row in my .emacs or an elisp file, or delete a directory. Eclipse plugins rely on a more complicated process that screwed my Eclipse configuration a couple of times, forcing me to do a clean reinstall. Emacs works as long as I use the basic packages. If I need something more complicated the situation gets pretty hairy. As a "power user" I think that the best I can hope for is to write a severely crippled version of the extensions I'd actually like to have; in other words, that it's not worth the trouble. I'd like to write extensions for the things I'd like to have automated in Emacs, for example project support with automated tag-table update on file writing. There are a few projects on this that lack integration, documentation, extensibility and so forth. The best one is probably CEDET, for which I believe the Greenspun's 10th rule can be applied. EDIT: To comment Larry Coleman's answer I'm pretty sure I can pick elisp programming but the extensions I have in mind don't exist yet despite their relative simplicity and the effort more knowledgeable people poured into related projects.This makes me wonder whether it is so because of the way emacs is developed, i.e. people tend to write their own little extensions without coordination, or its implementation, its extension language not being able to keep up with the growing complexity.

    Read the article

  • elisp: posn-at-point returns nil after goto-char. How to update the display before posn-at-point?

    - by Cheeso
    In emacs lisp, posn-at-point is documented as: posn-at-point is a built-in function in C source code. (posn-at-point &optional POS WINDOW) . Return position information for buffer POS in WINDOW. POS defaults to point in WINDOW; WINDOW defaults to the selected window. . Return nil if position is not visible in window. Otherwise, the return value is similar to that returned by event-start for a mouse click at the upper left corner of the glyph corresponding to the given buffer position: (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW) IMAGE (DX . DY) (WIDTH . HEIGHT)) The posn- functions access elements of such lists. ok, now I've got a function that looks something like this: (defun my-move-and-popup-menu () "move the point, then pop up a menu." (goto-char xxxx) (setq p (posn-at-point)) (my-popup-menu p ...) ) Basically, move the point, then retrieve the screen position at that point, and then popup a menu at that screen position. But I am finding that posn-at-point returns non-nil, only if the xxxx character position (the after position) is visible in the window, before the call to goto-char. It seems that the position is not actually updated until exit from the function. If goto-char goes a long way, more than one screenful, then the retrieved position is always nil, and my code doesn't know where to popup the menu. The reason I suggest that the position is not actually updated until exit from the function - when the menu successfully pops up, the cursor is clearly visible in its previous location while the popup menu is being displayed. When I dismiss the menu, the cursor moves to where I expected it to move, after the goto-char call. How can I get the position to be really updated, between goto-char and posn-at-point, so that posn-at-point will not return nil? In a Windows Forms application I would call Form.Update() or something similar to update the display in the middle of an event handler. What's the emacs version of that?

    Read the article

  • How can I split my conkeror-rc config over multiple files?

    - by Ryan Thompson
    Short version: can you help me fill in this code? var conkeror_settings_dir = ".conkeror.mozdev.org/settings"; function load_all_js_files_in_dir (dir) { var full_path = get_home_directory().appendRelativePath(dir); // YOUR CODE HERE } load_all_js_files_in_dir(conkeror_settings_dir); Background I'm trying out Conkeror for web browsing. It's an emacs-like browser running on Mozilla's rendering engine, using javascript as configuration language (filling the role that elisp plays for emacs). In my emacs config, I have split my customizations into a series of files, where each file is a single unit of related options (for example, all my perl-related settings might be in perl-settings.el. All these settings files are loaded automatically by a function in my .emacs that simply loads every elisp file under my "settings" directory. I am looking to structure my Conkeror config in the same way, with my main conkeror-rc file basically being a stub that loads all the js files under a certain directory relative to my home directory. Unfortunately, I am much less literate in javascript than I am in elisp, so I don't even know how to "source" a file.

    Read the article

  • where to download emacs manuals as offline html files

    - by Jisang Yoo
    When you press C-h i in Emacs, it shows what's called the top of the INFO tree, and it links to all kinds of manuals: AUCTeX, Org Mode, Emacs, Emacs FAQ, Emacs Lisp Intro, Elisp, ... . Is there a place where I can download all of them at once as html files? GNU Home page has links to some of them in html format: http://www.gnu.org/software/emacs/manual/elisp.html_node.tar.gz http://www.gnu.org/software/emacs/manual/emacs.html_node.tar.gz But I cannot find a link to a single tar.gz file packing all of them.

    Read the article

  • Tmux causes Emacs glitch

    - by killy9999
    Recently I started using Tmux, but I noticed that it causes a strange Emacs glitch. When I open source code for elisp or haskell, the comments aren't highlighted. Only the comment sign is (; in case of elisp, -- in case of haskell). The rest of the commented line is in normal colour. When I run Emacs outside of Tmux everything works as expected - the whole commented line is highlighted in a colour denoting a comment. Any ideas why this is happening? SOLUTION: Based on Stefan's comment I added this to my .emacs file: (custom-set-variables (custom-set-faces '(font-lock-comment-face ((((class color) (min-colors 8) (background dark)) (:foreground "red")))))) Now the comments are displayed in red, just like comment delimiters.

    Read the article

  • What do you expect from a package manager for Emacs

    - by tarsius
    Although several hundred Emacs Lisp libraries exist GNU Emacs does not have an (internal) package manager. I guess that most users would agree that it is currently rather inconvenient to find, install and especially keep up-to-date Emacs Lisp libraries. These pages make life a bit easier Emacs Lisp List - Problem: I see dead people (links). Emacswiki - Problem: May contain traces of nuts (malicious code). These are some package managers XEmacs package manager package.el - ELPA pases install.el install-elisp.el plugin.el use-package.el jem-pkg.el epkg/elm - the one I am working. And this are some packages that provide functionality that might be useful in a package manager ell.el - Browse the Emacs Lisp List genauto.el - helps generate autoloads for your elisp packages date-calc.el - date calculation and parsing routines strptime.el - partial implementation of POSIX date and time parsing wikirel.el - Visit relevant pages on the Emacs Wiki loadhist.el, lib-requires.el, elisp-depend.el - Commands to list Emacs Lisp library dependencies. project-root.el - Define a project root and take actions based upon it So I would like to know from you what you consider important/unimportant/supplementary... in a package manager for Emacs. Some ideas Many packages (incorporate the Emacs Lisp List and other lists of libraries). Only packages that have been tested. Support for more than one package archive (so people can choose between many/tested packages). Dependency calculated based on required features only. Dependencies take particular versions into account. Only use versions that have been released upstream. Use versions from version control systems if available. Packages are categorized. Packages can be uninstalled and updated not only installed. Support creating fork of upstream version of packages. Support publishing these forks. Support choosing a fork. After installation packages are activated. Generate autoloads. Integration with Emacswiki (see wikirel.el). Users can tag, comment ... packages and share that information. Only FSF-assigned/GPL/FOSS software or don't care about license. Package manager should be integrated in Emacs. Support contacting author. Lots of metadata. Suggest alternatives before installing a particular package. Some discussions about the subject at hand emacs-devel 20080801 comp.emacs 20021121 RationalElispPackaging I am hoping for these kinds of answers Pointers to more implementations, discussions etc. Lengthy descriptions of a set of features that make up your ideal package manager. Descriptions of one particular disired/undisired feature. This has the advantage that the regular voting mechanism allows us to see what features are most welcomed. Feel free to elaborate on my ideas from above. Surprise me.

    Read the article

  • Emacs and Long Shell Commands

    - by darrint
    Is there a way to run a shell command, have the output show up in a new buffer and have that output show up incrementally? Eshell and other emacs terminal emulators do a find job of this but I see no way to script them. What I'd like to do is write little elisp functions to do stuff like run unit tests, etc. and watch the output trickle into a buffer. The elisp function shell-command is close to what I want but it shows all the output at once when the process finishes.

    Read the article

  • Add Keyboard Binding To Existing Emacs Mode

    - by Sean M
    I'm attempting my first modification of emacs. I recorded a little keyboard macro and had emacs spit it out as elisp, resulting in: (setq add-docstring "\C-rdef\C-n\C-a\C-m\C-p\C-i\C-u6\"\C-u3\C-b") (global-set-key "\C-c\C-d" 'add-docstring) Searching the emacs reference, though, revealed that C-c C-d is already bound in diff mode. I don't plan on using diff mode, but the future is unknowable and I'd like to not lay a trap for myself. So I'd like this keybinding to only operate in python mode, where it tries to help me add docstrings. In my /usr/share/emacs/23.whatever/list/progmodes, I found python.elc and python.el.gz. I unzipped python.el.gz and got a readable version of the elisp file. Now, though, the documentation becomes opaque to me. How can I add my key binding to the python mode, instead of globally? Is it possible, for bonus points, to apply the changes to python mode without restarting emacs or closing open files? It's the self-modifying editor, I figure there's a good chance that it's possible.

    Read the article

  • splitting off an emacs window into a new frame

    - by user38983
    From a frame displaying multiple windows, I'd like to be able to 'break' one of the windows off into another frame, perhaps with a modifier-click on the modeline, where the window would now have its own frame but hold the same buffer and position. I was wondering if this behavior was available somewhere in the standard library, if there was an extension for it, or perhaps if a small elisp function would work.

    Read the article

  • How do I get TextMate style quotes in Emacs?

    - by pdcawley
    In textmate, when there's a current selection, I hit the " key and the selection gets surrounded by quotes. The same thing happens with other balanced characters like (, {, [ and '. Am I missing something obvious in Emacs configuration that would enable similar behaviour when using transient mark mode, or do I need to break out elisp and write something?

    Read the article

  • Clojure evaluation without SLIME

    - by Denis
    Hi, I'm a starter with Emacs (but quite experienced Vim user) and trying to play with Emacs+Clojure combination. Maybe my setup will be unusual for Emacs world, as I'm not using SLIME/swank-clojure, but Emacs + eshell with running clojure REPL in it, mostly due simplicity (or probably because SLIME quite scares me off :D). So, maybe there is a Emacs guru that can help me here: does exists any shortcut (or maybe some elisp sample) to copy/paste code chunks (sexps) from editing buffer to eshell (and possibly execute it)? Thanks.

    Read the article

  • Is there any *good* HTML-mode for emacs?

    - by Carson Myers
    I love emacs, and I want to do my web-programming work in it, but I can't find a way to get it to edit HTML properly. I mean it's seriously awful. It will do HTML fine, but not PHP, javascript, etc. I tried getting html-helper-mode... I downloaded it, put it in /usr/local/share/emacs/site-lisp, and added it to my .emacs file: (autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t) (setq auto-mode-alist (cons '("\\.html$" . html-helper-mode) auto-mode-alist)) copied and pasted from some site (I don't know elisp). it just, doesn't highlight anything at all. I tried downloading a whole bunch of modes and using some other mode to string them together, to no avail. Emacs is so great in every other way--why can't it do the simple task of editing web pages? I mean, it's a pretty standard thing to do for editors these days. So, does anyone know how to do this?

    Read the article

  • Incremental search for un/accented characters

    - by user38983
    Does emacs have an incremental search mode, where searching for a character will search for itself and for any other versions of the character with accent marks, similar to how Google Chrome (at least v27) will do when searching in a page? Alternatively, is there an additional library or piece of elisp code that can put incremental search in such a mode? For example, incremental search for: 'manana', would find 'manana' or 'mañana' 'motley crue', would also find 'Mötley Crüe' (with case-sensitivity off). Even a solution that only covers a subset of these characters would be helpful.

    Read the article

  • Code folding for LaTeX in Emacs

    - by ShreevatsaR
    Is there an Emacs minor-mode (or piece of elisp code) that lets you selectively hide/show environments while in LaTeX mode? For instance, I would like to move to the beginning of a long \begin{figure} block, hit a keystroke, and have the contents of that figure environment hidden from view. Similarly with \begin{proof} and so on, and ideally even with \subsections. Is this possible? I just tried hs-minor-mode, allout-mode, and outline-minor-mode, but most of them don't recognize LaTeX's environments, e.g. hs-minor-mode fails with "scan error: unbalanced parentheses". I would prefer not to have to enter explicit folding marks like {{{ as in folding-mode. [Ideally it would be great if the folding were persistent, but I see that that question doesn't have an accepted answer yet.]

    Read the article

  • Young people using Emacs?

    - by bigmonachus
    I am a college student that has fallen in love with Emacs. I have used IDEs in the past, and although features like Intellisense made the switch to Emacs very hard, I now think that Emacs is much more powerful, and features like Intellisense can be pretty closely matched by various modes depending on language (and I am not referring to M-/). I am happily writing Elisp code for everything that I need that isn't provided by modes or by Emacs itself and I love the way that it adapts and molds to my needs. However, I do think that its main disadvantage is the fact that it has a pretty steep learning curve and that most new programmers will not even begin to learn it out of many common misconceptions. So, I want to know the opinions of young people (or any person who didn't start using Emacs before there were IDEs) that are Emacs users. Just to get some reassurance that Emacs is not dead within our Eclipse-loving generation =). (Opinions of users of any other highly extensible editor like Jedit are also welcome)

    Read the article

  • Ubuntu | Ruby - Can't Remove Ruby 1.9.2 from system

    - by JWally
    I'm new to ubuntu, and might have had a couple of false starts updating ruby / rails. I'm trying to start clean by removing all versions of every thing ruby from my system I think I've installed everything through either Synaptic, or aptitude purge, but I can still do the following: jwally@jwally-laptop:~$ ruby -v ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux] jwally@jwally-laptop:~$ gem -v 1.3.7 jwally@jwally-laptop:~$ irb irb(main):001:0> RUBY_VERSION => "1.9.2" but when I type "dpkg -l | grep ruby, I only get the following: rc ruby1.8-elisp 1.8.7.249-2 ruby-mode for Emacsen thanks in advance

    Read the article

  • Programming challenge: can you code a hello world program as a Palindrome?

    - by Assaf Lavie
    So the puzzle is to write a hello world program in your language of choice, where the program's source file as a string has to be a palindrome. To be clear, the output has to be exactly "Hello, World". Edit: Well, with comments it seems trivial (not that I thought of it myself of course [sigh].. hat tip to cobbal). So new rule: no comments. Edit: I feel kind of bad editing someone else's question to say this, but it will eliminate a lot of non-palindromes that keep popping up, and I'm tired of seeing the same simple mistake over and over. The following is NOT a palindrome: ()() The following IS a palindrome: ())( Brackets, parenthesis, and anything else that must match are a major barrier to palindrome-ing, yes, but that doesn't mean you can ignore them and post non-palindrome answers. Languages represented thus far: C, C++, Bash, elisp, C#, Perl, sh, Windows shell, Java, Common Lisp, Awk, Ruby, Brainfuck, Funge, Python, Machine Language, HQ9+, Assembly, TCL, J, php, Haskell, io, TeX, APL, Javascript, mIRC Script, Basic, Orc, Fortran, Unlambda, Pseudo-code, Befunge, CFML, Lua, INTERCAL, VBScript, HTML, sed, PostScript, GolfScript, REBOL, SQL

    Read the article

  • emacs auctex: can one auto-fill section labels?

    - by Mica
    Hi all, I am currently using emacs and auctex to author my latex documents. This is, of course, fantastic. However, I would like to have emacs and/or auctex auto-fill the section label when using C-c C-e to make a new header. It should end up looking like this: \section{This is a section title} \label{sec:this-is-a-section-title} with the label for the header the same as the title, but with no spaces. I don't know lisp or elisp, and I'd have no idea where to start. If anyone could help that would be great!

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >