Berkeley CSUA MOTD:Entry 20808
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/24 [General] UID:1000 Activity:popular
5/24    

2001/3/15-16 [Computer/SW/Editors/Emacs, Computer/SW/Languages/Functional] UID:20808 Activity:high
3/15    How do I comment out multiple lines of ELISP code in ~/.emacs (or LISP
        code in general)?
        \_Set the region using Ctrl-Space on one end and move your cursor to
          the other, and do M-x comment-region.  Or use vi and stick a ';' on
          the front of each line manually.
          \_ So there's nothing similar to "#if 0 / #endif" in C that I can do?
             \_ can't you do (if (<condition>)
                                 (progn ...) )  ?
        \_ can you have your .emacs file load other files?  then you would only
           have to comment/uncomment one line
           \_ (load-file ...)
2025/05/24 [General] UID:1000 Activity:popular
5/24    

You may also be interested in these entries...
2011/12/21-2012/2/6 [Computer/HW/Laptop, Computer/SW/Editors/Emacs] UID:54269 Activity:nil
12/21   In Emacs, how do I make it so that it will resize its screen
        when the maximum resolution of my monitor changes? When I
        use my laptop, my emacs is too big (and I can't resize it
        because the bottom-right corner is not accessible).
        \_ Which OS?  Can't you drag the top border (not a corner) to resize
           the height to be smaller?
	...
2007/3/7-11 [Computer/SW/Editors/Emacs] UID:45897 Activity:moderate
3/7     In emacs 21, is there a way in Emacs-Lisp to detect whether emacs was
        started with the "-r" switch?  In C mode, the syntax colors are
        different when I start emasc with and without "-r".  I want to do the
        same in my elisp code, but I can't find how this is done in cc-mode.el.
        Thanks.  -- yuen
        \- are you sure what you are talking about is being done by the cc*.el
	...
2005/5/6-9 [Computer/SW/Editors/Emacs] UID:37552 Activity:kinda low
5/6     Is there a way to pass command-line arguments to emacs, and then detect
        them in my elisp code in .emacs?  I want to distinguish, in my .emacs,
        whether it's started by me typing "emacs" at the command line, or by
        some other program using the EDITOR environment variable.  So I'm
        thinking I can change EDITOR from "emacs" to "emacs -foo" and then
        detect it in .emacs.  Thanks.
	...
2005/1/31-2/1 [Computer/SW/Editors/Vi] UID:35990 Activity:kinda low
1/31    What the fuck is wrong with you people who use emacs in "vi mode"?
        Why don't you just use vi???  I hate it when some loser asks me
        to help debug something and I see an emacs window and expect basic
        things, like C-n, to work!
        \_ Just a guess, but I assume people who utilize this probably
           want the additional features of emacs but were trained under
	...
2004/6/1-2 [Computer/SW/Editors/Emacs] UID:30524 Activity:low
6/1     Argh!  I accidently hit double-bucky-kill-XEmacs.  Is there some
        magical incantation to make it open up the 20-some-odd files I was
        editing?  (I don't need to recover lost data).
        \_ How about this? Find the last .saves-xxxxx file in your home dir,
           run "grep -v # ~/.saves-xxxxx", then somehow pass the resulting
           lines as arguments to the elisp function (find-file ......).
	...
2003/10/9-10 [Computer/SW/Languages/Java, Computer/SW/Editors/IDE] UID:10557 Activity:nil
10/9    Anyone use Emacs for Java dvlpmt?  What packages & modes do you use?
        \_ No.  Eclipse.  Eclipse.  Eclipse.  There is no other IDE.
        \_ Sure.  Java mode.  Cygwin.  I had to tweak the elisp for java mode
           to make it work according to taste, but then, I'm kind of
           particular.
        \_ IntelliJ is pretty nice as well.
	...
2003/10/9 [Computer/SW/Editors/Emacs] UID:10552 Activity:nil
10/9    in elisp, what's the difference between setq and set-variable?
        I've googled to no avail.
        \_ According to M-x describe-function, the name of the variable in setq
           is not evaluated.  So I guess you can't do something like
           "(setq (foo bar baz) 3)" but you can with set-variable.
	...
2003/9/3-4 [Computer/SW/Editors, Computer/SW/Editors/Emacs] UID:10062 Activity:nil
9/3     What editor can be controlled by another program?  What I want is to
        have my program launch, say ED, and the user edit a given file.  Only
        a subset of ED's command is avaialbe to the user.  The rest of the
        functionality is controlled by the parent program, so that ED is
        acting like an embedded editor.
        \_ rex
	...
2003/3/16-17 [Computer/SW/Editors/Emacs] UID:27713 Activity:high
3/16    Is there a way to change the background and foreground color of xemacs
        after it has started?  I know I can do "xemacs -bg black -fg white"
        but I can't seem to do it after the program started.  apropos on
        background doesn't show me anything.
        \_ I don't know, but why would you want to do this?
        \_ http://www.google.com/search?q=change+emacs+foreground+color
	...
2002/1/9 [Computer/SW/Editors/Emacs] UID:23507 Activity:insanely high
1/8     I am getting tired of Pine's editor. I like jove.
        What's YOUR favorite email program? Can it use Jove as editor?
        \_ mh.  yes.
            \_What is mh? or Where is mh?
               \_ mh is everywhere and nowhere.
        \_ nmh.  it's mh with more features and fewer bugs. nmh+procmail+jove.
	...
2001/9/16 [Computer/SW/Editors/Emacs] UID:22475 Activity:moderate
9/15    [ REPOST ] What is the equivalent of '.' (sh) in emacs/elisp?
        I want to include a elisp file into my .emacs at startup but
        I don't know how to do it. tia.
        \_ (load "file")
           \- note, if you want to load something interactively [i.e. with
           M-x] use load-file or load-library or some other wrapper. --psb
	...
2009/4/24-28 [Computer/SW/Languages/Functional] UID:52902 Activity:nil
4/23    what book is this?
        "I'm reading this horrible horrible book about a programmer
         from silicon valley that gets magically
         transported into some world where magic is real
         and uses computer programming skillz to become the world's
         greatest sorceror … in book 1 of the series
	...
2008/12/17-2009/1/2 [Computer/SW/Languages/Functional] UID:52267 Activity:nil
12/17   wtf is happening to the dollar?
        http://quotes.ino.com/chart/?s=NYBOT_dx
        \_ People are finally taking Bernanke seriously when he says he
           is going to print as many dollars as he has to, to reinflate
           the dollar.
           is going to print as many dollars as he has to, to kill deflation.
	...
2008/7/28-8/5 [Computer/SW/Languages/Python, Computer/SW/Languages/Functional, Computer/SW/Languages/OCAML] UID:50704 Activity:nil
7/28    So, I'd like to try playing with a functional language.  Any
        recommendations?
        \_ Haskel.  Why would you start with anything else?
        \_ Haskell if you want a _functional_ language.  Ocaml if you want to
           see what a proper language implementation looks like.  LISP if
           you want old fogies to think you are cool. -- ilyas
	...
2008/4/2-6 [Computer/SW/Languages/C_Cplusplus] UID:49645 Activity:moderate
4/2     Is there an interpreted version of C or C++ that can be used for
        educational purposes? It doesn't have to be full-featured or
        strictly adhere to the standards, but it's painful for students
        to change a variable in a for loop and then wait for a compile
        to see how it changes the result. Something really lightweight
        would encourage them to play around a lot more and learn more in
	...
2007/8/30-9/3 [Computer/Theory] UID:47837 Activity:nil
8/30    what AI is editing the motd?  that's some next level shit.
        \_ Sorry. -- ilyas
        \_ ilyas -> i l y a s -> s l y a i -> Sly AI
           \_ ilya shpitser -> lisp hysteria
	...
2007/2/9-11 [Computer/SW/Languages/Java, Computer/SW/Languages/JavaScript] UID:45694 Activity:low
2/9     Looking for a Javascript slider bar example. The first example
        on Google is horrible-- initialization code all over the place,
        global variables, method conventions suck, etc. Thanks!
        \_ I don't have an answer for you, but what do you think of this
           article?  http://ajaxworldmagazine.com/read/333329_p.htm
           \_ From the article:
	...
2006/8/11-14 [Computer/SW/Languages/Perl, Computer/SW/Languages/Functional] UID:43974 Activity:low
8/11    How do you find out the max # of file descriptors for a process,
        thread, and entire system?
        \_ Dep on OS. Are the youth today assuming "linux is the standard"?
           That is kinda sad.
           \_ LINUX RUUULES!  W1ND0ZE DR000LEZ!
        \_ while(true) { do(something that uses a fd) if (good rc) counter++; print }
	...
2006/3/17-18 [Computer/SW/Editors/Vi, Computer/SW/Editors/Emacs] UID:42280 Activity:moderate
3/16    I'm looking to troll the motd. What are some good topics guaranteed
        to get results?
        \_ sex!
        \_ Easy.  Anything of interest to more than 1 person that isn't
           resolvable.  Next!
        \_ http://www.trollwars.com  -John
	...
2006/2/21-23 [Computer/SW/Languages/Java] UID:41939 Activity:nil
2/21    What is the best way to get the current method name in Java?  So far
        I have seen 3 approaches:
        1. Create new Exception, grab the first frame off its stack trace.
           Inelegant, requires creating a stack trace (expensive).
           \_ Yeah it sucks.  Yeah it does much more work than you need.
              Yeah it is really fragile and may break when you switch java
	...