Search Results

Search found 1353 results on 55 pages for 'emacs lisp'.

Page 23/55 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • compile c problem in emacs (ubuntu)

    - by user565739
    I wrote a very simple program like: ( sorry, I typed the code in the right way, but the display is wired. How could I fix it?) #include <stdio.h> int main( void ) { int i; for ( i = 0; i <= 10; i++ ) { printf( "%d hello!\n", i); } return 0; } Usually, I compile c program in terminal with the command cc -o xxx xxx.c So in Emacs, when I type M-x compile, I change make -k to cc -o. But I got error like cc: argument to '-o' is missing What's the problem? If I use make, then I still got error No targets specified and no makefiles found. Finally, if the above problem is fixed, how could I define a custom hotkey for compile? I have already know how to do something like global-set-key [f8] 'goto-line But I don't know to set a hotkey for an action only for c-mode.

    Read the article

  • is there a way to switch bash or zsh from emacs mode to vi mode with a keystroke

    - by Brandon
    I'd like to be able to switch temporarily from emacs mode to vi mode, since vi mode is sometimes better, but I'm usually half-way through typing something before I realize I want I don't want to switch permanently to vi mode, because I normally prefer emacs mode on the command line, mostly because it's what I'm used to, and over the years many of the keystrokes have become second nature. (As an editor I generally use emacs in viper mode, so that I can use both vi and emacs keystrokes, since I found myself accidentally using them in vi all the time, and screwing things up, and because in some cases I find vi keystrokes more memorable and handy, and in other cases emacs.)

    Read the article

  • elisp macro to write function?

    - by aaa
    hello I have written few functions, which nearly identical, save for names. For example ; x is name, such as function/paragraph/line/etc. (defun my-x-function (interactive) (mark-x) (do-more-stuff) (modify-x)) is there a way to put it automatically? I have a feeling this is what macros do, but I am not sure how to use them. you help/maybe small example would be great Thanks

    Read the article

  • Data structures in functional programming

    - by pwny
    I'm currently playing with LISP (particularly Scheme and Clojure) and I'm wondering how typical data structures are dealt with in functional programming languages. For example, let's say I would like to solve a problem using a graph pathfinding algorithm. How would one typically go about representing that graph in a functional programming language (primarily interested in pure functional style that can be applied to LISP)? Would I just forget about graphs altogether and solve the problem some other way?

    Read the article

  • Why isn't there a good scheme/lisp on llvm?

    - by anon
    There is Gambit scheme, MIT scheme, PLT scheme, chicken scheme, bigloo, larceny, ...; then there are all the lisps. Yet, there's not (to my knowledge) a single popular scheme/lisp on LLVM, even though LLVM provides lots of nice things like: easier to generate code than x85 easy to make C ffi calls ... So why is it that there isn't a good scheme/lisp on LLVM?

    Read the article

  • My first Lisp macro; is it leaky?

    - by Tom Martin
    I've been working through Practical Common Lisp and as an exercise decided to write a macro to determine if a number is a multiple of another number: (defmacro multp (value factor) `(= (rem ,value ,factor) 0)) so that : (multp 40 10) evaluates to true whilst (multp 40 13) does not The question is does this macro leak in some way? Also is this "good" Lisp? Is there already an existing function/macro that I could have used?

    Read the article

  • emacs frustration with web development any working dot-files?

    - by Tony Cruise
    I really liked flexibility of emacs but it is really annoying to make it work. I want to use it for web development html, css, javascript, php. I first tried emacs-starter-kit . It didn't included nXhtml. Also C-g key binding does not work (they call it starter kit but basic key command does not work). I think it is mapped for git control. That's a frustration for a beginner. Then I replaced emacs-starter-kit with nXhtml. At least C-g is working. But code completion sucks, M-tab does not work. I tried code completion from nXhtml menu with no success. Also NXhtml mode did'nt colorized my file if css is mixed with html. Isn't it recommended for mixed html, css,php files. So why it doesnt work?. Why Emacs folks do not aware of convention over configuration? Dam! ship it something works! Please help me before I am getting crazy. I use Ubuntu 10.04 and emacs-snaphot-gtk 23.1.50-1. Please guide me step by step with your working dotfile url. Even I accept I am a dummy, it is really annoying and frustrating to use emacs.

    Read the article

  • Where do I input a piece of code in Emacs?

    - by Vivi
    Hi there, I have just started using Emacs for the specific purpose of editing latex documents. I was attracted to Emacs because I want to be able to customize syntax highlighting even to the point of defining the colors of specific words. I am new to Emacs and not a programmer, so I having an extreme difficulty in doing what I want to do because most help I find assume too much knowledge for my level (it took me days just to be able to install emacs + auctex and change the first face color). I found something that I think will help me but I don't know how to do it. The post below is what I want to do, but what I am supposed to do with this code? Where should I insert it or where should I type it? I am using GNU Emacs in Windows. Thank you so much for you help :) M-x what-face will print the face found at the current point. And the code for that is: (defun what-face (pos) (interactive "d") (let ((face (or (get-char-property (point) 'read-face-name) (get-char-property (point) 'face)))) (if face (message "Face: %s" face) (message "No face at %d" pos)))) By the way, I found this in another post that can be found here: http://stackoverflow.com/questions/1242352/get-font-face-under-cursor-in-emacs

    Read the article

  • vi and emacs: comparison? (not flamebait!)

    - by jared
    So, I've been enjoying learning and using vi for the last couple of years. The beauty of vi, for me, is that its UI is a language of movement and action with a very uniform, simple grammar, and which is terse enough that the requisite memorization pays ample dividends in how much more I enjoy working with text (by avoiding boring repetition and eliminating micro-hassles, like that half-second annoying wait while you scroll down the screen). (Note--I don't claim to have expert knowledge of vi, but I get around decently well: comfortable with limited '@' macros and regexp search-and-replace within files; frequently use multiple buffers, tabs, and windows; get around pretty well in the file browser; understand the grammar of actions + movement + subject (as described so aptly in this beautiful SO answer); and had some pretty sweet debugger and ctags integration going with PHP.) I wonder if some emacs folks could take a swing at explaining what emacs does brilliantly, or sum its strengths up in a phrase or two. Spare me the talk about productivity; I'm more interested in conceptual clarity. Lisp-centric answers are okay; I'm learning Scheme on the weekends, and would pick up emacs for that alone (have been using Racket).

    Read the article

  • What does it mean that "Lisp can be written in itself?"

    - by Mason Wheeler
    Paul Graham wrote that "The unusual thing about Lisp-- in fact, the defining quality of Lisp-- is that it can be written in itself." But that doesn't seem the least bit unusual or definitive to me. ISTM that a programming language is defined by two things: Its compiler or interpreter, which defines the syntax and the semantics for the language by fiat, and its standard library, which defines to a large degree the idioms and techniques that skilled users will use when writing code in the language. With a few specific exceptions, (the non-C# members of the .NET family, for example,) most languages' standard libraries are written in that language for two very good reasons: because it will share the same set of syntactical definitions, function calling conventions, and the general "look and feel" of the language, and because the people who are likely to write a standard library for a programming language are its users, and particularly its designer(s). So there's nothing unique there; that's pretty standard. And again, there's nothing unique or unusual about a language's compiler being written in itself. C compilers are written in C. Pascal compilers are written in Pascal. Mono's C# compiler is written in C#. Heck, even some scripting languages have implementations "written in itself". So what does it mean that Lisp is unusual in being written in itself?

    Read the article

  • Org-mode properties for Emacs diary anniversaries?

    - by lecodesportif
    I am trying to have the "Birthday" property of an Org-mode contact entry added to the agenda automatically: * John :PROPERTIES: :Name: John :Birthday: 5 4 1900 :END: This can be done manually for each entry using: %%(diary-anniversary 5 4 1900) John's birthday But I don't want to type the date twice. I would like to use the org-entry-get functionality to make diary-anniversary take the values of the Birthday and Name (see the bold text above) properties. This is how I get the correct property values. %%(org-entry-get nil "Name") %%(org-entry-get nil "Birthday") But after several attempts, I still haven't managed to put the values in variables and pass them correctly to diary-anniversary. Any ideas how to do it?

    Read the article

  • emacs hexl-mode insert or delete a byte

    - by Oleg Pavliv
    How can I insert or delete a byte in hexl-mode? Suppose I have a 3-byte file "123" which is displayed as "3132 33" in hexl-mode. How can I add a byte to get "1234"? How can I remove a byte to get "12"? Using C-M-x and similar shortcuts I can replace a byte, but I want to insert and delete.

    Read the article

  • How to undo fill-paragraph in emacs?

    - by Dave Paroulek
    I have a text file that is pretty long. Any easy way to "undo" a M-q (fill-paragraph) on a file that was written and saved a while ago? For example, I want to change this: They're coming to take me away, ha-haaa!! They're coming to take me away, ho-ho, hee-hee, ha-haaa To this: They're coming to take me away, ha-haaa!! They're coming to take me away, ho-ho, hee-hee, ha-haaa

    Read the article

  • emacs elisp buffer not running font lock mode until opened by user

    - by jacob
    My problem is I am opening a buffer using (set-buffer (find-tag-noselect (current-word))) and then I try to copy some text out of that buffer. The text that I get back has only the properties (fontified nil). find-tag-noselect automatically opens the buffer found in the TAGS file but it seems it does not run the font lock mode over it. When I manually switch to this buffer after it has been opened and then run the function again when it copies the text it has all the correct text properties attached. So what do I need to do to have this buffer completely initialized so that the correct syntax highlighting will be copied in?

    Read the article

  • emacs cedet set up doubt

    - by trybeingarun
    Hi, I installed cedet successfully today and got most of it working; thanks to Alex Ott's Gentle Introduction to Cedet. However i am having a problem When I give the exact path relative to the current file i am working on then auto-completion is working fine. #include "../../opensource/inc/lldp_port.h" void test_func() { lldp_port port; port.blah //here auto-completion worked fine } However i cannot specify the full path all the time( we have eclipse at office and it generates makefiles for us ) #include "lldp_port.h" void test_func() { lldp_port port; port. //here auto-completion does not work :( } What should i do to solve this?

    Read the article

  • Emacs key binding fallback

    - by rejeep
    Hey, I have a minor mode. If that mode is active and the user hits DEL, I want to do some action, but only if some condition holds. If the condition holds and the action is executed I want to do nothing more after that. But if the condition fails, I don't want to do anything and let the default DEL action execute. Not sure how I could solve this. But I guess I could do it in two ways: 1) I could rebind the DEL key to a function in the minor mode and then check if the conditions holds ot not. But then how do I know what the default command to DEL is? 2) I could add a pre command hook like this. Execute the command and then break the chain. But how do I break the chain? (add-hook 'pre-command-hook (lambda() (when (equal last-input-event 'backspace) ;; Do something and then stop (do not execute the ;; command that backspace is bound to) ))) In what way would you solve it? Thanks!

    Read the article

  • Emacs on Windows: how to protect built-in el files from being accidentally edited

    - by RamyenHead
    On Linux, they are all read only, so no problem. But on MS Windows, what happens is like this: I get curious about the definition of the command isearch-forward, I type C-h f isearch-forward and click on the link isearch.el from the help to get to the definition of the function, and while I am reading its definition, I press C-h or C-c many times, but I set Caps Lock as another Ctrl key, so sometimes it happens that I release Caps Lock too early, in which case C-h or C-c becomes inserting h or c, sometimes I notice that and undo it, but sometimes I don't notice it, and I even save them all with C-x s. What is a good way to protect the built-in el files from me on MS Windows?

    Read the article

  • About the forward and backward a word behaviour in Emacs

    - by janoChen
    I don't know if there's something wrong with my settings but when I press M-f (forward a word) it doesn't matter where I am, it never place the cursor in the next word (just between words). This doesn't happen with M-b which place my cursor in the beginning of the previous word. Is this a normal behavior? How do I place my cursor at the beginning of the following word?

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >