|
comedyblissoption posted:M-x visual-lines-mode Real men M-q Your Computer posted:What makes these text editors better than an IDE? I guess I'm very "new-school" with how I program, but I wouldn't want to switch over to something that does not have autocomplete, method-lookups, auto-import and other niceties such as browsing project folders by the click of a mouse and copy-pasting code between files/projects. I get that they're more portable than an IDE, but I only have one workstation so that's not a very strong point to me. To me these text editors feel more like a cult in which members embrace an obsolete technology. I mean, haven't we since invented graphic displays and mice? Well, for a start there's CEDET, which if it were finished would be amazing. It's a touch buggy at the moment but it knocks every IDE I've used into a cocked hat. As for autocomplete, what you really want is dabbrev-expand, not having it for me is like being down a limb. I don't miss intellisense and it's code obscuring key grabbing nonsense at all. For project navigation ido is about a bajillion times faster at navigating your project as files than the IDE based hunting through a giant treeview nonsense. Also, mice are older than Emacs IIRC, they are a terrible mistake in the development of computer interaction. So yes, there are some things that "modern" IDE's do better than these obsolete text editors, but I just don't miss those features at all. I do miss dabbrev-expand and spell checking comments (flyspell-prog-mode) and strings when not using emacs. Not having to switch tools when editing python files and sql files is also great. It does take a long time to learn how to use emacs well though. The best way is to pair with a more experienced user if you can find one. You will also be disadvantaged if you're using a language that has terrible deficiencies that can only be overcome by tools.
|
# ¿ Oct 1, 2011 22:43 |
|
|
# ¿ Apr 28, 2024 04:34 |
|
Your Computer posted:I mostly program in Java using Netbeans Goondolances. quote:Another question; I've never actually tried emacs, though I've dabbled in vim. Are there any good* reasons why emacs is better? org-mode quote:e: I'm one of those people who program in Java using an IDE on Windows. Should I even bother with stuff like vim and emacs? Yes, org-mode. I tend not to use it much because I'm terribly disorganised. But it is still amazing. Here's a video about it http://orgmode.org/talks/GoogleTech.html
|
# ¿ Oct 2, 2011 01:57 |
|
shrughes posted:Good things about Emacs: it has modes for obscure programming language indentations that no other editor has. It is probably the best editor for Haskell. It is a better general purpose text editor than anything else (for small files). I assume by small you mean less than several copies of War and Peace in size? Also worthy of mention, nxml-mode is pretty great for editing XML files. comedyblissoption posted:I consider one of the greatest features in Emacs is that virtually everything is unified together in text buffers. You are not prevented from using the text editing and searching capabilities on any buffer window simply because it is a modal dialog or GUI widget. Oh yeah, being able to search your compiler output, help text, REPL sessions, etc... using exactly the same bindings as everywhere else is excellent. Incremental search (C-s) is simply the best way to search. Another fun thing is the number of places emacs bindings turn up, Bash for example and text entry widgets on the Mac.
|
# ¿ Oct 2, 2011 08:39 |
|
shrughes posted:No, by small I mean smaller than a typical log file. I wonder how typical your log files are. I don't find any problems under 10M and anything under 100M is still usable. Once you get beyond that you're pushing it though. I don't edit my logs that often though and when you get up to GB log files you should probably not be trying to read them by hand.
|
# ¿ Oct 2, 2011 09:18 |
|
Fren posted:
I haven't seen this one, how's it done? nm, seems to be from here http://nflath.com/2009/09/emacs-fixes/ Zombywuf fucked around with this message at 16:17 on Oct 2, 2011 |
# ¿ Oct 2, 2011 16:04 |
|
Fren posted:Here's how I'm doing it on my system. I should add that while I can't I had to make a small change to the code in that blog post which was possibly Emacs 23 related. It's a drat sexy thing. Now I wonder if I can make it follow imports...
|
# ¿ Oct 2, 2011 16:56 |
|
Fren posted:I might be starting to sperg. I use vimium in Chrome which also does that. Fun fact: There are defined html meta fields for this, no-one uses them :-(
|
# ¿ Oct 5, 2011 11:41 |
|
So working on a hosed Python codebase has lead to me creating this little function:code:
|
# ¿ Oct 5, 2011 12:31 |
|
TasteMyHouse posted:I want to be able to search through files using arbitrary regexes, but I want to exclude comments from the search. I also want to be able to search ONLY inside comments, and exclude code. Ideally this would be aware of any style of comment, based on the file extension It's not ideal, but emacs regexps have escape sequences that match comment delimiters that should work in any language, so you can potentially search using these. Anything more than that requires advanced elisp skills. Well, advanced enough to iterate over comments and run search-forward-regexp on them while dealing with nesting.
|
# ¿ Oct 5, 2011 17:15 |
|
baby puzzle posted:I tried emacs on osx and there was this enormous toolbar that I couldn't hide. How do you not have that thing? code:
code:
Aquamacs wants these settings in ~/Library/Preferences/Aquamacs Emacs/Preferences.el, reqular Emacs in ~/.emacs. When you're editing the file, if you put the cursor just after each expression you can C-x C-e to run the expression.
|
# ¿ Oct 7, 2011 11:32 |
|
Fren, do you know of any way for compilation mode to understand tracebacks? Having next error jump through every line in the traceback is annoying. Or even better to understand the whole output of unittest (and run tests on a save hook)?
|
# ¿ Oct 7, 2011 22:19 |
|
Fren posted:Gonna assume you're talking about running Python test suites with M-x compile. For pdb support I seem to be able to just open up a shell (C-x M-m) and run my nosetests test suite at the prompt. When pdb open up it seems to figure out where files are and starts PDB mode. Maybe try that with your unittest test suite? Well, I'd also like for g++ "in file included from ..." chains to a appear as one error instead of half a dozen. Will give pdb a try for python though.
|
# ¿ Oct 8, 2011 14:37 |
|
comedyblissoption posted:Why don't more people hit left ctrl with where their knuckle meets the palm rather than the pinky? People seem to go through a lot of hoops on windows to rebind ctrl to caps. I can only assume your keyboard is a really weird shape. Even the mac has the option to remap your capslock in the keyboard preferences these days. Also emacs keybindings seem to work in most text entries, makes me wonder if Steve was a secret Emacs user.
|
# ¿ Oct 11, 2011 10:45 |
|
orphean posted:You know how girls do window-shopping as a life-long regular activity? and some guys do window-shopping of cars? I don't need another keyboard, i already have plenty. But, i look at them, look for them, stare at them for hours, every week. But, if you have a Kinesis all other keyboards become like empty husks of typing misery.
|
# ¿ Oct 24, 2011 18:33 |
|
shrughes posted:I see you and raise you to Topre keyswitches. Make the layout less cruel to fingers and I'll think about it.
|
# ¿ Oct 24, 2011 19:04 |
|
Beef posted:Any changes that will make me more productive? I've got a deadline on Thursday and I need to soothe my conscience that it will be worth the switch This is called Yak Shaving. Don't do it.
|
# ¿ Oct 31, 2011 15:03 |
|
Fren posted:Also, the lexical binding stuff is pretty fantastic. I understand that this may be the beginning of writing code that doesn't block (i.e., waiting for the interface to respond after checking Gnus IMAP), though I'll admit I don't understand fully how the two concepts are related. Could you shed some light on that? Asynchronous callbacks? Please say it's asynchronous callbacks. Then I can do flymake in tramp.
|
# ¿ Oct 31, 2011 19:04 |
|
pgroce posted:It looks like the tricky bit is that the server file needs to be shared out-of-band. The source code for server-start also mentions a server-port variable, which might be useful if you need to punch through a (hopefully internal) firewall. Sounds like this might be a job for sshfs.
|
# ¿ Nov 4, 2011 21:33 |
|
I wonder if emacsserver is a server in the same way that Xserver is a server. i.e. the server is supposed to be run wherever the user is sitting.
|
# ¿ Nov 6, 2011 12:13 |
|
The problem I have with org-mode is that I am not a natural note taker. I frequently try to use it but simply don't write enough stuff down. It is good at meetings though. Anyone know any tools to pull information in to org-mode? I seem to have accounts on things all over the place, it would be cool if facebook/last.fm/google/etc... events could turn up in an org file somewhere. Actually what I really want is a kind of web-based org-mode with multi user editing, a RESTful API for sharing parts and editing and embedding of arbitrary web content. Also I want a pony.
|
# ¿ Nov 8, 2011 19:25 |
|
Fren posted:Unfortunately, there aren't really any good tools for that sort of thing. But that's the benefit of them being in plain text -- just write some glue code and you can usually find a way to translate the information you need. For example! I wanted my OS X Address book contacts synced in Org, because I use org-contacts to autofill e-mail addresses. So I fired up Clozure CL (which has an Apple Foundation Framework bridge) and wrote some code to generate the Org file I wanted. (I have the bridge code for the address book up at https://github.com/ardekantur/nsclasp, but not the code that writes the Org file. I'll put that up in a bit.) Oh man, whenever I start to try and write this kind of thing for a personal project I always end up over generalising. As in, never actually start for want of solving all the problems ever. quote:I really want to be able to provide a babel source like so: quote:Oh oh! I'm not a natural notetaker also, but Org-capture is the poo poo. From whatever buffer you're in, org-capture (which I think is C-c c by default), choose the template for your note, write it, and it gets filed away wherever you want it to go. Then at the end of the week or whatever you have some inbox.org filled with all your org-capture notes, and you can go through and refile/deal with them. Seems I have some lovely default ubuntu version of org where this doesn't work. Hmm, time to upgrade perhaps.
|
# ¿ Nov 9, 2011 00:52 |
|
orphean posted:It may seem daunting (its not!) but you could always build your emacs from source. I tend to track the bleeding edge but there's nothing stopping you from just downloading the officially released source tarball and using that. I used to run Slackware. I've pretty much converted to "Give me package management or give me death." I could upgrade ubuntu but that runs into problems with my work machine being out of sync with the servers. Anyone know any good ppa's for emacs on Lucid?
|
# ¿ Nov 9, 2011 12:39 |
|
Fren posted:Holy crap, I just discovered what I'm doing wrong with isearch. When you search for something and it's not found, but there's a prefix of your search string that *is* found, hitting C-g doesn't remove the search string, it removes everything after that prefix. That is, if I'm looking for `removed`, and there's only `rem` in the corpus, hitting C-g will turn the search string into `rem`, not the empty string. That makes so much more sense now. drat I wish I'd known that sooner.
|
# ¿ Nov 10, 2011 18:05 |
|
Beef posted:Moar emacs hints! Y'all know about dabbrev-expand yes? M-/ will complete the current word using other words in your buffer and other buffers. I find it so much easier to use than Intellisense.
|
# ¿ Nov 10, 2011 18:58 |
|
Fren posted:Hey thread. Does anyone know if there's a reasonably good Jira Emacs mode lying about? I hate having to lose context 10 or 12 times a day to go to that horrid website. The only one I've found (jira.el) is pretty poor as it uses the xmlrpc interface which is very limited. So tempting to write a better one but .
|
# ¿ Nov 30, 2011 19:03 |
|
Anyone know how to get the current revision and other version control info from a file to create a org-capture template. The idea is to be able to insert a note about the file I currently have open, so something like this:code:
quote:** /home/zombywuf/code/dotfiles/src/.emacs:32 <2012-01-02 Mon 15:24>
|
# ¿ Jan 2, 2012 16:29 |
|
Fren posted:So far I've found vc-git-working-revision and vc-git-state, both of which take a filename as an argument. If you want the SHA1 hash, I'm sure vc-git.el has something that you can use. The problem is I want it to work for git, hg and bzr. Ideally without duplicating a bunch of code that seems like it must exist within dvc somewhere.
|
# ¿ Jan 2, 2012 16:48 |
|
Awesome, that looks even better than what I was trying to do :-)
|
# ¿ Jan 6, 2012 03:00 |
|
DrMelon posted:I just started using Emacs today, and I'm currently going through the little tutorial. There is no help, you are ours now. Join us. tip: try M-/ for auto completion
|
# ¿ Jan 8, 2012 15:59 |
|
Also, how to get help: C-h a - apropos, lets you search all the built in documentation C-h b - opens a new buffer containing all the key bindings in the current buffer C-h m - opens a new buffer with help for the current modes active (e.g. python-mode, help-mode, etc...) The C-s search Mr. Fish mentions is extremely useful when it comes to the last 2 buffers. I usually explore new modes by searching through the help buffers that are opened. The function names that are displayed are hyperlinks you can follow with a mouse click or <enter>. Also if you open the minibuffer for a command with M-x then you get tab completion of commands. The list of functions that appears when you hit tab twice is also searchable (you may be noticing a theme).
|
# ¿ Jan 8, 2012 16:44 |
|
More org mode fun. I've been playing with babel and I've just found out how to make it do SQL. A fairly common workflow for me is: 1) Oh it broke, maybe the clue is in the db. 2) Run a bunch of queries. 3) Curse my own stupidity. Step 2 is often a pain as I often need to run a bunch of similar queries and keep a log of all the queries run and their output for reference. Org babel lets me do this by its "every language now has a workbook magic" and I'm guessing a lot of other people do so here's how. To do this for postgres you need a src block like this: code:
You can insert a src block by typing <s<tab> btw. You can also use parameters, I'm using org mode 7.7, in 7.8 replace srcname with name. Parameters are delimited with a $ and are specified with :var param=value. Sadly it's just done with raw string insertion so features like using named tables as parameters are not going to work, to use a string as a parameter you need to double escape it like so: code:
code:
Then comes babel's party trick, you can pass the output of one codeblock to the input of another, even across languages. For example: code:
|
# ¿ Jan 17, 2012 00:45 |
|
ITYM C-e, but yeah, it's really cool when I suddenly realise I'm using those bindings outside of emacs and have been for ages. There's even a dabbrev-expand in readline which is not bound by default, enable it with:code:
Note: in SQL Server Management Studio C-e is "execute current buffer". Be very careful.
|
# ¿ Jan 31, 2012 13:40 |
|
You seem to have changed your tune on w3m Fren, how much effort is it to get it working? Aside, sometimes certain things (flymake mostly) generate 2 line messages, which makes the window at the bottom move up one line. This can be really jarring, anyone know how to make the bottom window shrink instead of the top window shrinking and the bottom moving?
|
# ¿ Jan 31, 2012 18:51 |
|
I have fallen at the first hurdle, the ubuntu packages wont byte compile :-(
|
# ¿ Jan 31, 2012 19:45 |
|
Beef posted:Is there a good semantic auto-complete for C/C++ modes? I guess I'm too spoiled by lisp+slime. Well, there's CEDET, but I didn't have much fun trying to get it to work. For the most part M-/ is good enough.
|
# ¿ Mar 9, 2012 13:13 |
|
Gah, I'd love to know an answer to a similar question. Currently when I try to open any kind of file but an elisp file I get "End of file during parsing". Usually it fails to switch to the buffer for the file, but the file will open in a buffer. For SQL mode hooks will not have run, for python-mode they will. debug-on-error and debug-on-signal do not cause the debugger to open, using the -q argument (no init file) causes the error not to happen. Manually disabling hooks doesn't stop the error. I'm kinda stuck as to where to go from here. (I'm running the emacs-snapshot for ubuntu 12)
|
# ¿ Mar 28, 2012 15:19 |
|
Zombywuf posted:Gah, I'd love to know an answer to a similar question. Currently when I try to open any kind of file but an elisp file I get "End of file during parsing". Usually it fails to switch to the buffer for the file, but the file will open in a buffer. For SQL mode hooks will not have run, for python-mode they will. debug-on-error and debug-on-signal do not cause the debugger to open, using the -q argument (no init file) causes the error not to happen. Manually disabling hooks doesn't stop the error. I'm kinda stuck as to where to go from here. Gah, so I found out why this was happening after much diagnosis. I found the problem went away when I used -q, but not when I commented out my whole .emacs file. I found that commenting out my entire .emacs file triggered a parsing bug in vc-mode which I don't even use. I also found that it had nothing to do with my .emacs file being a symlink to a git controlled version of the file. Turns out I had been messing around with a .dir-locals.el file but had found it didn't do what I wanted but left it in a broken state. The end of file during parsing message was due to it trying to parse that file (which is apparently not loaded with -q), why I couldn't get it to trap in the debugger I don't know though.
|
# ¿ Apr 3, 2012 16:54 |
|
Last place I worked I did check that they didn't do any weird "you must use this editor" poo poo during the interview. I then spent several years learning how to write documents in Word and diagrams in Visio without slitting my wrists. I think it took a year for people to stop blaming my use of emacs for every svn corruption (which were caused by something else entirely).
|
# ¿ May 3, 2012 12:34 |
|
Fren posted:You know, I don't really think Org-mode has a place in my life. It's too picky to be a universal markup language. Filtering out noise with agenda filters is too complicated to be practical. Literate programming is too primitive to handle complex development. TODO items are a pain in the rear end to be kept in sync with outside systems. Publishing a blog with it requires violent wrenching about in the innards of the module, and the default export systems are always just 90% there but for some glaring oversight in formatting. I like the default behavior for outlining, say, 50% of the time, and the other 50% are wrapped up in countless bizarre edge case options to understand and set. I kind of agree with you. org-mode is still awesome for short term things like "I need to take notes in this meeting" but really starts to fall apart after 3 months of note taking all you have is a big pile of notes. The real thing that would make it shine would be a thing that lives outside of Emacs and syncs up all your note/tracking/issue data. But that's just one of my dreams of a brighter tomorrow. I still use it as an ide for sql, it beats just about everything hands down there. In fact as a general "I need to do some coding for this one of task with a few scraps of shell, awk, python, sql, etc..." babel is pretty sweet. And when you realise you need to do it again a month later you have all your notes and code.
|
# ¿ May 24, 2012 13:56 |
|
|
# ¿ Apr 28, 2024 04:34 |
|
org-babel would be awesome for SQL if org-mode weren't so drat slow at displaying tables. Just having a table in your buffer slows it down horribly.
|
# ¿ Jun 11, 2012 16:21 |