How to write an emacs mode for a new language? - emacs

I would like to write an Emacs major mode for a 4GL.
Can someone show me a tutorial?
As far as I googled I was able to find only this broken:
link http://two-wugs.net/emacs/mode-tutorial.html

If you're lazy, one easy way is to extend generic-mode to know about your new language:
http://emacswiki.org/emacs/GenericMode
I do this a lot for config files for applications that I work with a lot to get decent syntax highlighting. Here's one I did for the asterisk PBX a long time ago as an example.

Related

Definitive guide for Emacs learners [duplicate]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am about to learn Emacs, have been through the tutorial and borrowed the O'Reilly book on Emacs. But the question still is - how do you learn good Emacs workflow? I guess, you don't use Emacs as you'd use, for example, Vim.
This question seems revelant to mine:
- Where can I find a video of a professional using Emacs?
I can't believe nobody has mentioned this, but reading the info pages bundled with Emacs is a great way to learn about obscure features. Whenever you need a break from coding, hit M-x info and pick a random page to read. Your emacs ability will improve incredibly quickly.
It is also important to realize how emacs' self-documenting-ness helps you work. Say, for example, you are wondering how you can scale the font size. Instead of interrupting your flow and asking here, or on IRC, or Google, you can ask emacs! Just hit C-h a (M-x command-apropos) and type a search term, in our case scale. If there are matching functions, their names, keybindings, and documentation will appear. There are, and now you've just discovered text-scale-increase and text-scale-decrease.
There are other self-documentation functions that are good to learn C-h m will tell you what keybindings and commands are available in the current major and minor modes. This is a great way to discover features you didn't know existed.
Another way to "learn by osmosis" is to M-x customize-group for the modes you use regularly. (customize is the interactive configuration editor that almost all modes support.)
The final thing to do is to learn Emacs Lisp. It is nice to use existing tools, but sometimes you will need your own. If you try to avoid learning Lisp, you will always be stuck with things not quite working right, and that's a shame.
Emacs is a great environment for customizing itself. Emacs includes two Lisp manuals that are viewable via M-x info. It is self-documenting, so you can say C-h f or M-x describe-function to get the documentation for any function. You can even press TAB ENT to jump to the source code of that function, to see how it's implemented. This is great when you think "I wish I had something that worked like foo, but just slightly different." You can read how foo is implemented, make your change in the *scratch* buffer, and then see if you like the change. There is no edit/compile/test cycle. You press a key and your emacs session immediately has the feature you just wrote.
The more effort you put into learning emacs, the more emacs will do to make your work easier.
Once you mastered the basics (opening/closing files, navigating, basic editing) just use it. As with a lot of other tools, practise makes perfect...
I would, however, set some time aside to work on improving how you use the editor currently, but as part of your normal workflow as opposed to just going off on a tangent and learning things for the sake of it.
I find some useful resources are the EmacsWiki and the Planet Emacsen blog. I use both, mainly by using Planet Emacsen for "inspiration" and then wandering over to EmacsWiki and having a trawl on there for a specific topic. I found that unless you're having at least a vague idea what you're looking for, the available information is just going to swamp you instead of it actually being helpful.
Not to mention that there are a few very useful resources here on StackOverflow, for example this question here. Emacs is a very powerful tool that tends to be able to do a lot more than a single person needs, but in the end that allows you to pick and choose exactly those parts that you need.
My suggestion is just stop using anything but Emacs, when you come across a problem see if you can solve it in Emacs, and then fall back (if you don't have the time or it just won't work). As for work flow, it is pretty much the same as you would normally work. i.e. for a normal ide session you would open/edit a file as normal, then commit (in C-x v v) just as normal.
I agree with the other posters here, you just have to use it! Here's how I did it:
Once I got the very basics (can get between buffers, open/save files, etc), I printed out a reference card and kept it handy. This is a good one. Review it just so you know what is on it, then whenever you find yourself doing something repeatedly that is on the card, start using the shortcut! Before you know it you'll have memorized quite an arsenal of commands. But remember, probably no one uses everything that emacs can do.
When you eventually find yourself doing something repeatedly that doesn't have a shortcut, that's a good time to learn keyboard macros. Once you get them, you'll find uses for them everywhere! From there it's a short jump to writing elisp (if you're a programmer).
The great thing about emacs is that you don't need an "emacs workflow", emacs works around your workflow!
You don't need to learn emacs workflow. Once you complete the tutorial and master the essentials, you'll have to adopt some degree of monogamy and use nothing but Emacs. Eventually you will think of functionality that you really wished existed; most of the time somebody else will have as well and the solution is just one search away! Over time you just can't help but learn and eventually you'll pick up enough that you'll develop your own personal workflow.
If you're looking to accelerate the process, the Emacs wiki has a variety of tips but really the best way is just to do stuff with Emacs.
You could have a look at Bram Molenaar's talk about efficient textediting, http://video.google.com/videoplay?docid=2538831956647446078&ei=EqiGSau8KZ-QiQLi-Nn8Cg&q=bram+molenaar+editing
Although he's a vim guy (he wrote it), you might get some ideas about how best to go about becoming more proficient with your text editor that'll apply to emacs.
To be honest, all I do is learn the keybindings I need. I don't use emacs to its full potential, because I don't need its full potential. My suggestion is to just learn what you need, and don't worry about what you don't. Learn a new key binding everyday, and in about 300 years will you know them all ;)
I am using the emacs since the old Amiga days on all platforms i am currently working on.
The best way to use emacs is curiosity. I still use often apropos (C-h a) and M-x (for a long functionname instead of key-binding) to find a functionality.
a key-concept to "proper use" Emacs is, to learn the very easy elisp (a simple derivate of lisp) and write your own little helpers (own commenting style, underlining, templates) and to know where to look to change values (tab-size, compiler, email)
And the third thing: everything is in emacs: I use the dired (directory editor) for navigating through files. I use a lot of buffers for all textual files (with proper modes for each type of file (c, ruby, list, sql, latex, ...)) which are stored when quitting emacs and recovered when invoking. I start the compiler from emacs and use the jump-to-error-functionality.
Macros are a daily routine (scimming throu code and changing it on the way).
I like the picture-mode, which allows to type downward with replacing, which makes it easy to renumber block of constants (good old c #defines))
There is a hugh mountain to climb, but if you have reached the top, you can see the whole world down your feet, and never want to miss this experience again. I know, there are many good editors around (i work myself thru Eclipse)
As previously stated, the best advice is to use nothing but Emacs for the next year. Once you develop your finger memory, things get to be much easier.
How do you learn a "good workflow" for anything? By using it, getting to know it, making it yours. There is no "proper" use of Emacs.
As for getting to know it: ask Emacs -- use its help system. This can help too: http://www.emacswiki.org/emacs/EmacsNewbieWithIcicles
That's the power of Emacs, you use it the way you like. You just have to configure it before for your liking.

YADR look on Emacs

I just discovered yadr with an amazing look&feel that makes macvim really looks like Emacs:
I was wondering if anybody is aware of a way to make emacs buffer bars having a similar look?
Originally posted this as a comment since I wasn't sure what exactly you were talking about in the screenshot, but since it answers your question I'm posting it as an answer.
The effect you are seeing is the Powerline plugin for vim. This idea has been ported to Emacs and is available on EmacsWiki. There are a few forks of this available on GitHub as well.
There are many Emacs ports of Powerline, but the most notable is this one and this being the original port to Emacs. A world of caution though - cool toys like the powerline tend to play bad with some modes and are mostly pretty rather than practical.

Is there a .emacs file available to make its keybindings behave like any modern IDE?

I learned programming with GUI editors such as Notepad++, Gedit, Netbeans and so on, so I'm used to some keybindings common in almost all of these programs (and some others like LO Writer, etc).
Is there any place where I can find a .emacs file that makes it work like that, so I can have all its power without spending half of my life in learning its keybindings or configuring it?
You might try ErgoMacs which was built to modernize Emacs. I haven't tried it since when I found it I already had too many of my own keybindings to switch, but if I were starting over, I'm pretty sure I would use it.
cua-mode remaps emacs to use the key bindings that most other programs use. It is built in to emacs and you can enable it in your .emacs with:
(cua-mode t)
It depends a bit on what you mean. There are ways to make Emacs use keyboard shortcuts that are standard in Windows, as e.g. pointed out by ataylor. However, when you say you want it to behave more like an IDE, it seems that you're not only interested in text editing keybindings (such as, moving the point, copy and paste, marking a region, etc.), but specifically for the functionality offered by IDEs: compiling, management of code projects, deployment, code refactoring, etc.
But Emacs is not an IDE. It's a text editor. Okay, it really is a lisp interpreter based around a visual model of text buffers.
As such it can do many tasks that IDEs do, but out of the box, IDEs do many of the tasks mentioned above better because they are made for these tasks. Since Emacs is just a lisp interpreter, a lot of people have written extensions to its core functionality, in form of so called "modes". So, yes, by installing the right modes on top of a vanilla Emacs you can make it a pretty powerful tool that can compete with IDEs.
But that doesn't go without spending half of my life in learning its keybindings or configuring it. Well, half your life is a bit of a stretch. Emacs has a steep learning curve, that's true, but it's worth it -- because it is not an IDE. It's more than that.
If you're not willing to learn new stuff, than maybe you might want to take a moment and reconsider whether programming really is for you. Because the IT landscape changes very quickly all the time. Maybe in five years, Java is dead and no-one uses Eclipse any more. But you can be pretty sure of one thing: Emacs will still be around.
Okay, the last paragraph was total FUD, so ignore it. But seriously, learning new keybindings is not as hard as you think. And it doesn't take thaaat long either. You could re-configure and re-assign completely to your own liking in Emacs, but why not give the standard keybindings a chance?

Young people using Emacs?

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)
My "highly extensible editor" of choice is vim. Started using vi 10 years ago, at age 17, and I haven't really looked back. I like to stay away from my mouse as much as possible.
I rarely work in compiled languages these days, so the only thing I feel like I'm missing from an IDE is syntax-completion. Constantly switching to a browser to look up the order of arguments to various PHP functions gets a bit tedious.
PS: I don't want to start a vi/Emacs war here. I suspect that Emacs and vi[m] users have more in common with each other than either group has with IDErs.
I'm 62 and I've been using emacs for 21 years. I am capable of using vim in a pinch, but I really prefer emacs.
I used to use TECO a long time ago (in the 1970's) and I liked that one too.
First off, why do you care what other people think? It is clear that
Emacs has a vibrant community, as there are lots of extensions and
lots of people working on the core. There is plenty of support to be
had for it.
If you are "worried" that other editors are better, then you should
try those editors and make the decision yourself. Only you can know
what you like.
That said, I am young (23) and use Emacs. I have used it for almost
15 years. I have tried other editors, including Vim, Eclipse,
Netbeans, and Textmate. None of those editors work as well as Emacs
as far as I'm concerned, so I feel I made the right choice. I can't,
however, tell you which choice to make. You will have to figure it
out for yourself.
It is important to note that I am pretty "invested" in Emacs. I
maintain a lot of extensions, and have spent a lot of time
understanding the Emacs core... so if I switch editors, I am throwing
away a lot of time and experience. This could theoretically cloud my
judgment, but I don't think it does. Textmate works like Emacs, but
has fewer features. (I try not to use my mouse, so the eyecandy and
OS X integration don't buy me much.) Netbeans and Eclipse are nice
for managing Java projects, but on the rare occasion that I have to do
Java, I still find Emacs easier to use. I even find that writing Ant
files myself gets me closer to "where I want to be" than relying on
Eclipse's auto-builds. That leaves Vim, which is certainly
featureful, but is still a "lesser" Emacs. Emacs has all the features
of Vim -- if you want modal editing, you can just invoke Viper. The
only reason to use Vim is that you have already learned Vim, and you
can't stand the keybinding and editing model differences between Vim
and Viper. (No, Viper is not a Vim clone. It's Emacs with modal
editing.)
Anyway, JMHO. I think Emacs will serve you well throughout your
programming career. (Or any career that involves text. Emacs is
great for writing books... and email.)
When i was young i heard this:
A good hacker must be expert in 4 editors and 4 languages.
And have taken it to heart since then....
I routinely use vi(m), (x)emacs, eclipse , sed/awk/perl ( yeah .. they are text editors ).
IMHO, mastering a range of tools is essential. One should subject his brain to move
out of comfort zone every once in a while.
I now found it amazing that i have hundreds of key combinations at my fingertip , and rarely type key sequence of one into other.
I'm 21 and started using Emacs at 15, only moving away for Textmate/E in recent years. I personally can't stand IDEs, feeling they get in the way far more than they help. Give me a good straight-up text editor any day.
I'm 19, started using emacs last year, and I'm liking it. Even though I don't know how to use its "advanced" features yet, I'm comfortable with the fact that they exist and I could learn them when needed.
In my college, there shouldn't be much more than 5 students using Emacs or Vi, though.
Fear not, young programmer, and take courage from this Editor or IDE analysis. Powerful editors like Emacs will be around as long as there are language mavens. And IDE's will continue to serve the tool mavens. And each camp will continue to be amazed at how [un]productive the other is. ;-)
Well, I started using Emacs in college, and I'm only 30, so I think I count as part of the "Eclipse-loving generation".
I don't use it every day, but Emacs is certainly near the top of my tools list. (And much higher than Eclipse, I can tell you that.)
The first proper editor I used was Brief and then a number of IDE based ones before someone convinced me to try emacs (on Windows no less). I made the decision then that I was going to learn that one editor well and when I needed it to do something different I'd learn how to do it.
The real benefit of choosing one editor and sticking to it is consistency. Whatever language or task you're doing, if you're in your favourite editor, everything is easily remembered. Added to that the extensibility makes things possible that are often not on the slick IDEs.
Of course the downside is that your emacs session is a well crafted environment. If I don't have my .emacs loaded up it can seem like a foreign environment. Things work almost but not quite like I'm used to. Fortunately with DVCS systems my perfect environment is a git clone away.
I'm a university student age 19, but I started learning Emacs a good 2-3 years ago. I tried vi(m) for a bit, but I couldn't stand the modal editing model.
Prior to my introduction to Emacs, I was using Gedit and nano to do all my coding.
If you go to most grad schools, you will find your share of UNIX hackers who stick with emacs, so it's definitely there.
I'm 28 and switched from vim to emacs a month or so ago. I learnt a bit of emacs while learning lisp. I switched from vim because having compiler / debugger / shell integration made a lot of sense to me and I like the idea of the extensibility / customization.
I've got a few die-hard eclipse / intellij people I work with that are young and are rubbing their chins while thinking about making the switch. The buffer philosophy was almost enough to sell one person who was sick of tabs in IDEs.
It's not so much about age I don't think - those that are considering emacs are the ones that are forward thinking enough to realize that is has powerful enough features / ideas that the learning curve is / might be worth it.
I'm 22 year old emacs user and I cry whenever I have to leave it to do something on other IDEs.
I'm 21 and I use vim. It's a real step up from the other programming editors I had been using, and I would recommend anyone else in computer science courses to try it out.
I'm 23 and emacs was taught in our Operating Systems course as the "C editor you should use." I used it for the course, but have moved on to other IDEs that better suit my workflow and day to day development environment.
Edit Because my original post was not altogether helpful.
I used emacs through a command terminal inside of PuTTY and that is my extent of using it. I didn't mind it as an editor and got good enough with the shortcuts to be quite productive. I haven't really explored the emacs editor anymore than that because I was already using eclipse and really liked it.
Now, I use eclipse day to day because it is an extensible language that I have to develop with Java, ActionScript, JavaScript, PHP, CSS, HTML, and even Scheme. I also have a custom eclipse extension that I'm perfecting that helps me be more productive in my full time niche (WordPress development). Eclipse provides FTP and SSH services and I've been familiar with the interface for longer than any other IDE, and that is why I use it.
I was born in 1970*, but came (back) to programming about 6 years ago, starting with Visual Basic 6 (ay-yi-yi!). A co-worker would hard-code all his Perl in a text-editor (INCLUDING forms), which boggled my mind, but did not entrance. Slowly, I started using humble MS notepad for... notes while on the phone, open tasks throughout the day, etc. And slowly, I started wanting more. A number of other factors (desire to work closer to regexes, old desire to learn LISP [I came of age in the 80s, if you know what I mean]) lead me through a couple of editors, and finally to Emacs.
Now, I get frustrated in IDEs that I can't key-navigate and tweak to my heart's content.
*okay, so I may no longer be a "young people" -- but when I started using Emacs I was in my early-mid 30s, and identified as such.
I'm 26 and I'm using VIM for several years now for C++ development. All my team mates use either VIM or Emacs (50% vs 50%, we have great flames from time to time), our lead is also using VIM. It's a best choice for us on Solaris.
However for large MS APIs like DirectX I use VS... its sometimes pain to switch but it's much easier to tackle this kind of monster :)
I barely step out of my VIM these days and on those applications where I find myself forced into an IDE, I quickly remember why. I have become so accustomed to the VIM hotkeys for selection, replacement, folding, etc. that my productivity gets floored.
Like others, I rarely work in compiled languages anymore, so I've setup shortcuts that run my Perl/PHP paste the interpreters to find syntax errors. In some cases, I've even set up VIM to run available unit tests through the same interface. It's also very easy to alt-tab back to a browser (preferably on another monitor) and hit "Control-R" for a refresh, all without touching the mouse.
I'm 21 and I use vim for now 3 or 4 years...
I once tried emacs when one of my teacher told me it was better than Vim...but I prefered my workflow with vim...
I tried to use emacs last week because I had problem indenting html files...But my teamate lost me when he started talking about key combination or something like that. My guess is that vim or emacs are two great editor...It's better than most of the IDE I know.
Thumbs up to everyone.
I'm 20 and I started using Emacs last summer when I have to code c++ on linux, and Emacs was the only editor I can stand on openSUSE (Kate is horrible, horrible! - especially my work machine is kinda slow). Then I was won over; there is really nothing better in the world for a mouse-hater. Now I use emacs (yeah on Windows...) for all kind of thing including doing file operations with dired and playing tetris ;)
That being said I still code c# in Visual Studio (occasion switch to emacs for major refactoring and boilerplate work, which is much^100 easier in emacs). IF emacs has intellisense (that works) then I'll dump the text editor in VS studio (I will still use the GUI designer though, nothing replaces that); as of now, having to look up classes is too much a pain for me to code c#.NET in emacs.
I'm a 19 year old college student who uses Emacs - I started using it about a year ago and haven't looked back.
I've only been using emacs for about 10 years now. At one point I took a decided turn to learn it (and vi) to be more comfortable editing directly on servers.
When it comes to writing code quickly and with little red flags when the syntax is wrong in realtime, using an IDE is like wearing gloves when handling thorny plants: you don't have to be as careful. (It's also like using a word processor with automatic spelling fixes and grammar checks compared to using, well, emacs for writing.)
So, I mostly use Eclipse/Xcode/other-required-IDE except when it comes to quick changes, direct edits on a server, or other remote/fast editing scenarios.
What I haven't done is looked around to see if there are any good modes for emacs that allow it to provide such quick editing help as other IDEs (though, the default modes do help quite a bit, anyway -- this isn't raw text editing, really).
I also had a pleasant surprise recently when I realized much of the Mac OS UI can use emacs commands in a similar way to how unix command line editing can be done with emacs commands. How cool is that?
I am under 30 and I use emacs.
Currently, I has to interface with computer through software speech recognition.
Nothing beats emacs because various commands are easy to program for recognition and create aliases.
now, it took me some time to get comfortable with programming in elisp, but I think benefit was worth it. I have tried using eclipse, but there is something about emacs, particularly extensibility, that it's hard to replace.
Mostly I use gedit. Simple and sweet. I'm 20 and always hated IDEs (I got my start with Netbeans in high school).
Emacs is all right; it doesn't quite do everything I like jEdit to do, but I'm not interested in spending time writing macros and plug-ins for my editor - I like getting stuff done instead. If I needed my editor to do something that different, I'd get another editor or install someone else's plugin.
I've used jEdit, Visual Studio, notepad++, TextWrangler. I abhor VIM.
Ironic....
I use emacs full-time now. Several months after the above answer I was doing a lot of remote logins into Linux and nano got too constricting. And, yes, I've spent time writing macros and plug-ins for emacs. jEdit is still pretty good, but emacs is quite better. Still don't use vim(yet?).
I'm 17 and I started using Emacs when I was 14, and VIM when I was 15. I use Emacs for SLIME and ERC mostly now, preferring GVim for editing files and such.
Each time I approached a respected guru type about Emacs, they would warn me away. Most of them didn't like it, either. I took that as a clue.
OTOH, I was interested in TECO a long time ago (now you know my age), and I hear Emacs grew out of that. So, I still wonder...
You can have my copies of Eclipse, NetBeans and Visual Studio when you pry them from my cold, dead hands!
I tried to learn how to use Emacs when I started my degree, but I eventually gave up. Part of that is because I have a poor memory, and its keyboard shortcuts are unconventional compared to what I am use to.
I do almost all my coding in TextMate (which has been dubbed the Emacs of Macs). If I'm in a command-line environment then ViM does the trick.
I code J2me in Windows, where my company doesn't impose me on certain IDE. And guess what, I return to my Old friend, Emacs...
I am 31 now, and I first learning emacs ca 23. But, the situation makes me change IDE alots : Netbeans, VS.NET, Eclipse, etc.
You know, Emacs still beat other, in some perspective :)

How do you learn proper Emacs? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am about to learn Emacs, have been through the tutorial and borrowed the O'Reilly book on Emacs. But the question still is - how do you learn good Emacs workflow? I guess, you don't use Emacs as you'd use, for example, Vim.
This question seems revelant to mine:
- Where can I find a video of a professional using Emacs?
I can't believe nobody has mentioned this, but reading the info pages bundled with Emacs is a great way to learn about obscure features. Whenever you need a break from coding, hit M-x info and pick a random page to read. Your emacs ability will improve incredibly quickly.
It is also important to realize how emacs' self-documenting-ness helps you work. Say, for example, you are wondering how you can scale the font size. Instead of interrupting your flow and asking here, or on IRC, or Google, you can ask emacs! Just hit C-h a (M-x command-apropos) and type a search term, in our case scale. If there are matching functions, their names, keybindings, and documentation will appear. There are, and now you've just discovered text-scale-increase and text-scale-decrease.
There are other self-documentation functions that are good to learn C-h m will tell you what keybindings and commands are available in the current major and minor modes. This is a great way to discover features you didn't know existed.
Another way to "learn by osmosis" is to M-x customize-group for the modes you use regularly. (customize is the interactive configuration editor that almost all modes support.)
The final thing to do is to learn Emacs Lisp. It is nice to use existing tools, but sometimes you will need your own. If you try to avoid learning Lisp, you will always be stuck with things not quite working right, and that's a shame.
Emacs is a great environment for customizing itself. Emacs includes two Lisp manuals that are viewable via M-x info. It is self-documenting, so you can say C-h f or M-x describe-function to get the documentation for any function. You can even press TAB ENT to jump to the source code of that function, to see how it's implemented. This is great when you think "I wish I had something that worked like foo, but just slightly different." You can read how foo is implemented, make your change in the *scratch* buffer, and then see if you like the change. There is no edit/compile/test cycle. You press a key and your emacs session immediately has the feature you just wrote.
The more effort you put into learning emacs, the more emacs will do to make your work easier.
Once you mastered the basics (opening/closing files, navigating, basic editing) just use it. As with a lot of other tools, practise makes perfect...
I would, however, set some time aside to work on improving how you use the editor currently, but as part of your normal workflow as opposed to just going off on a tangent and learning things for the sake of it.
I find some useful resources are the EmacsWiki and the Planet Emacsen blog. I use both, mainly by using Planet Emacsen for "inspiration" and then wandering over to EmacsWiki and having a trawl on there for a specific topic. I found that unless you're having at least a vague idea what you're looking for, the available information is just going to swamp you instead of it actually being helpful.
Not to mention that there are a few very useful resources here on StackOverflow, for example this question here. Emacs is a very powerful tool that tends to be able to do a lot more than a single person needs, but in the end that allows you to pick and choose exactly those parts that you need.
My suggestion is just stop using anything but Emacs, when you come across a problem see if you can solve it in Emacs, and then fall back (if you don't have the time or it just won't work). As for work flow, it is pretty much the same as you would normally work. i.e. for a normal ide session you would open/edit a file as normal, then commit (in C-x v v) just as normal.
I agree with the other posters here, you just have to use it! Here's how I did it:
Once I got the very basics (can get between buffers, open/save files, etc), I printed out a reference card and kept it handy. This is a good one. Review it just so you know what is on it, then whenever you find yourself doing something repeatedly that is on the card, start using the shortcut! Before you know it you'll have memorized quite an arsenal of commands. But remember, probably no one uses everything that emacs can do.
When you eventually find yourself doing something repeatedly that doesn't have a shortcut, that's a good time to learn keyboard macros. Once you get them, you'll find uses for them everywhere! From there it's a short jump to writing elisp (if you're a programmer).
The great thing about emacs is that you don't need an "emacs workflow", emacs works around your workflow!
You don't need to learn emacs workflow. Once you complete the tutorial and master the essentials, you'll have to adopt some degree of monogamy and use nothing but Emacs. Eventually you will think of functionality that you really wished existed; most of the time somebody else will have as well and the solution is just one search away! Over time you just can't help but learn and eventually you'll pick up enough that you'll develop your own personal workflow.
If you're looking to accelerate the process, the Emacs wiki has a variety of tips but really the best way is just to do stuff with Emacs.
You could have a look at Bram Molenaar's talk about efficient textediting, http://video.google.com/videoplay?docid=2538831956647446078&ei=EqiGSau8KZ-QiQLi-Nn8Cg&q=bram+molenaar+editing
Although he's a vim guy (he wrote it), you might get some ideas about how best to go about becoming more proficient with your text editor that'll apply to emacs.
To be honest, all I do is learn the keybindings I need. I don't use emacs to its full potential, because I don't need its full potential. My suggestion is to just learn what you need, and don't worry about what you don't. Learn a new key binding everyday, and in about 300 years will you know them all ;)
I am using the emacs since the old Amiga days on all platforms i am currently working on.
The best way to use emacs is curiosity. I still use often apropos (C-h a) and M-x (for a long functionname instead of key-binding) to find a functionality.
a key-concept to "proper use" Emacs is, to learn the very easy elisp (a simple derivate of lisp) and write your own little helpers (own commenting style, underlining, templates) and to know where to look to change values (tab-size, compiler, email)
And the third thing: everything is in emacs: I use the dired (directory editor) for navigating through files. I use a lot of buffers for all textual files (with proper modes for each type of file (c, ruby, list, sql, latex, ...)) which are stored when quitting emacs and recovered when invoking. I start the compiler from emacs and use the jump-to-error-functionality.
Macros are a daily routine (scimming throu code and changing it on the way).
I like the picture-mode, which allows to type downward with replacing, which makes it easy to renumber block of constants (good old c #defines))
There is a hugh mountain to climb, but if you have reached the top, you can see the whole world down your feet, and never want to miss this experience again. I know, there are many good editors around (i work myself thru Eclipse)
As previously stated, the best advice is to use nothing but Emacs for the next year. Once you develop your finger memory, things get to be much easier.
How do you learn a "good workflow" for anything? By using it, getting to know it, making it yours. There is no "proper" use of Emacs.
As for getting to know it: ask Emacs -- use its help system. This can help too: http://www.emacswiki.org/emacs/EmacsNewbieWithIcicles
That's the power of Emacs, you use it the way you like. You just have to configure it before for your liking.