From: <kla...@sd...> - 2005-08-24 16:09:15
|
Hi Andy, sorry, currently i'm quite busy - i have read your posting and i will = answer as soon as i find enough time ;-) Ciao, Klaus -----Urspr=FCngliche Nachricht----- Von: ecb...@li... im Auftrag von Andy Kutruff Gesendet: Fr 19.08.2005 22:46 An: ecb...@li... Betreff: [ECB-list] Migrating from Visual Studio to XEmacs with Emacs = Code Brower =20 Hello, I am a developer at a company that uses Visual Studio in combination = with a=20 proprietary command line-based build environment. I have been using VS = since=20 leaving academia, and currently spend 90% of my day writing c++ in a = very=20 large code base for a rather well known Windows application. Over time, = I=20 have come to loathe the inefficiency of the basic text editing = capabilities=20 and limited extensibility of the VS IDE. Naturally, when I complain = about=20 this to my friends at other companies who work mostly on Unix flavored=20 projects, I always get one of two answers: "Use VI!" or "Use Emacs!" I = got=20 the latter answer with higher frequency and, considering my original=20 experiences with VI in college I decided to give Emacs a shot. I grabbed = the=20 official GNU version of Emacs for Win32 and began the tedious muscle = memory=20 retraining and forced myself to never use VS to directly edit text. I=20 figured I would start simply and then explore code navigation and = debugging=20 when I felt annoyed with typing direct paths all day.=20 So, I've been using Emacs for 2 months now, and, of course, have = gleaned a=20 decent understanding of Lisp as a result. I have definitely converted to = Emacs, and enjoy the steady improvements that I never experienced the = first=20 two months after I first started using VS. As of now, I believe my text=20 navigation and editing speeds are faster than they were previously, and = as I=20 continue learning new tricks, commands, and key remappings, I only see = my=20 performance increasing.=20 The main reason I have decided to switch is because I write code. I = spend=20 40-90 hours a week entering, moving, correcting, refactoring, staring = at,=20 compiling, and debugging a sea of syntax, and the tool I was using = everyday=20 wasn't efficient enough for me. I mean, does a carpenter use just a = hammer=20 and screwdriver?=20 Unfortunately, there have been, and still are, several issues tainting = my=20 conversion. This leads me to the real reason of this email. My = experience=20 has usually followed the same path when I attempt to attack a problem = with=20 OSS:=20 1) Initial excitement 2) Try to figure it out myself 3) I fail 4) Seek = help=20 documentation and tutorials 5) Docs found but then determined to be=20 schizophrenic and esoteric. I have given up in disgust more times than I = care to admit, but in the case of my pilgrimage to the land of the "one=20 true" editor, I have vowed diligence, and success. Furthermore, I have=20 decided to pass on my findings in a new Emacs tutorial targeted to an=20 audience that I feel will find it most valuable: Programmers.=20 Now that I am mostly through the pains of learning the basic text = editing,=20 I have started to crave efficient navigation of our massive code base. = This=20 leads me to ECB. I'm trying to use it, and I want to use it. But, I'm = having=20 the same experiences that have plagued me in the past when adopting new=20 software. Resultantly, I believe this mailing list would be the best = place=20 for help and advice on writing my guide, as it will both help alleviate = the=20 newb questions to a degree and help evangelize Emacs with ECB as one of = the=20 main selling points for conversion. I know there are other resources out = there (Emacs help, Wiki, ECB help), but none of them go from zero to = ECB,=20 and none of them focus on Win32. Let's face reality. Most professional=20 developers run Windows as that's what their teams use, and what their = other=20 tools are written in. They use VS, and are resigned to taking their hand = off=20 the keyboard every few seconds to do something with the mouse. Some = build=20 within VS, other do not. The ones who do not build in VS usually alt-tab = more often than they blink.=20 So here are the goals of my tutorial: "Emacs from Scratch for the = Windows=20 Developer: ECB" 0) Complete quick start=20 This is the section that I believe all guides and tutorials should = have. A=20 completely raw, no explanation fly through of the big tasks to get up = and=20 running on the subject at hand. Here will be something like: go to=20 xemacs.org <http://xemacs.org>, download this... , get new CEDIT = from...,=20 get ECB from..., add these lines to your .emacs found at..., etc.=20 1) Introduction I'll basically start with a cut/paste of the above with some history on = Emacs, and a bunch of examples of where Emacs will make their life = easier.=20 These examples will be basic editing tasks that are use-case based: Here = I'll definitely solicit help from others, as I'm sure there are many = nifty=20 things that I have missed. One example I have found is on the fly macro=20 recording. Emacs wins in my opinion. Also, I'll emphasize the = customization=20 capabilities of Emacs and that if there is something in Emacs that a = user=20 wants to add, there is a whole language devoted to this task. Here I want to pick one win32 flavor of Emacs and stick with it. Up = until=20 this point I have been using the official GNU Emacs for Win32. I have=20 decided to move over to XEmacs for this document, because it is more=20 graphical in nature, and it is hard to argue with this screenshot. http://ecb.sourceforge.net/screenshots/4.png Also, I'll give a sweeping overview of the main aspects of Emacs. This = will=20 be basic stuff that I'll glean from the Emacs tutorial: Buffers, basic=20 navigation, mini-buffer, kill/yank vs. cut paste, opening, closing = files,=20 and a brief discussion of Lisp and a reassurance that I'll throw in=20 necessary explanations with verbosity. 2) Installation This area I want to be as thorough as possible, and be very detailed on = how=20 to add/remove XEmacs packages, install Lisp Libraries manually, and = *gulp*=20 be able to install the latest version of ECB, and even the latest pre=20 release CEDIT. Here I'll greatly appreciate suggestions and corrections = from=20 this list. Also I'll introduce the .emacs file, and the customize system. 3) Configuring for win32 This will be discussing customization in detail with an emphasis on = getting=20 Emacs as close to a Win32 feel as possible. Here's a big one: use = backslash=20 instead of forward slash. I know that most of you will not be pleased = with=20 this idea, but you must really consider how difficult converting to = Emacs=20 is. Making the "little things" the same goes a long way to increase = comfort.=20 Most win32 developers work with the cmd.exe command line, and Emacs = should=20 behave similarly. Now, I will suggest reconfiguring things that are more = powerful if done the Emacs way. For example, I would totally recommend = kill=20 / yank versus cut and paste, but definitely include a pointer to the = Wiki on=20 how to emulate it if they are so inclined. Now here is a project for me that I feel is a big negative that needs=20 addressing. The shell interaction in Emacs includes "eshell", and just=20 regular old "shell." This audience wants just "shell" as they had it in=20 another window. I'm going to do my best to make that happen. I know = Emacs=20 does do a lot of things to be smart about directory tracking and=20 auto-complete, but it's just too different for comfort, and makes = working=20 with custom build environments tricky. This is a topic of investigation = for=20 me, and would love input from others, on making it make sense for the = Win32=20 crowd. 4) Writing code This will be C++ oriented as that's what most people use. Here I'll = cover=20 major/minor modes and immediately discuss precisely how to get the big = code=20 formatting things accomplished: syntax highlighting, automatic = indentation,=20 brace styling (on the same line as an if/for/while or the next line), = and=20 tabs/space indentation width. (These were the ones that I cared about = the=20 most and that the defaults were definitely not to my liking.) I'll = likely=20 put in a complete example which attempts to get to the same behavior as=20 Visual Studio but also discuss how to improve on the VS auto formatting=20 based on specific user preferences.=20 Here I'll do my best to really nail down ways to increase speed and = give=20 common editing scenarios that can be accomplished as quickly as = possible.=20 Moving text around, using in-document auto completion (alt / for me),=20 recording macros, moving around a cpp file. Here I believe that many = people=20 will be able to add corrections and scenarios that they use all the time = but=20 to which I am oblivious. Things I haven't used yet: code templates, or any form of refactoring = tools=20 (do any exist?) 5) ECB and CEDIT Here is the goal chapter where discussion of semantic, senator, and ECB = will be. I'll explain what each does, and how a programmer will use = them.=20 This is truly where I would like help from this list.=20 I'll leave configuration and installation instructions here for two=20 reasons. Firstly, spatial locality makes things much easier to = accomplish. I=20 like following guides that move me serially from the beginning of a = topic to=20 the end without having to jump all over the document or web to get = something=20 done. Secondly, this is a little bit more involved than installing one = Elisp=20 file, and I'll talk about byte compilation here as it's a good thing to = do=20 before running ECB.=20 Next, SOURCES. I still am trying to figure out how senator and ECB work = together to figure out sources and dependencies. Our code base has a = massive=20 include directory and several sub projects that all work together. I'm = still=20 trying to get it to work.=20 Following this, will be disussion of the windows, setting up the mouse = to=20 be win32 like, and using the pesky speedbar.=20 To get this done, I'll have the user start with a simple one directory=20 "Hello World" project, and show how to move around the ECB windows, and = what=20 they do. Next I'll provide some contrived #include situations with a = bunch=20 of CBase, CChild, with a sparse directory structure and how to get = things to=20 work. Finally, I'll discuss auto-completion, and whatever cool things that = this=20 list will enlighten me to. 6) Appendix: The painless guide to ELisp for the C++ programmer. This will be lower priority but necessary in my opinion. I'll discuss lists, functions, using lisp major mode, and contrive = examples=20 that lead to a cool end result that is actually usable for the c++=20 programmer. Maybe a function like: "insert a comment header for a = function=20 or class" -------End of Guide---------- So that's it. Once again, any help or ideas will be appreciated. I'm = going=20 to work on chapter 2 first (installation) and then move forward from = there.=20 I'll post each chapter after I complete it, so that I may incorporate=20 suggestions and take flames incrementally before I move on to a = subsequent=20 topic.=20 Thanks and I hope people like this idea, Dex |