From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: What I'm missing when using M-x shell Date: Sun, 14 Sep 2008 14:02:13 +1000 Organization: Rapt Technologies Message-ID: <87zlmbcr3u.fsf@lion.rapttech.com.au> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221367283 435 80.91.229.12 (14 Sep 2008 04:41:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Sep 2008 04:41:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 14 06:42:19 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KejR9-0003mx-RU for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Sep 2008 06:42:16 +0200 Original-Received: from localhost ([127.0.0.1]:50817 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KejQ8-00071S-QZ for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Sep 2008 00:41:12 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!flpi089.ffdc.sbc.com!prodigy.net!news.astraweb.com!border2.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:EuMNwOCDpjztM3t49MmcN5m4ZXQ= Original-Lines: 94 Original-NNTP-Posting-Host: 89042c0c.news.astraweb.com Original-X-Trace: DXC=V5>nn9`YW List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57549 Archived-At: "Francis Moreau" writes: > [ please CC me when replying to me ] > > On Fri, Sep 12, 2008 at 7:34 PM, Dan Espen > wrote: >> Compiles are M-x compile, greps are M-x grep, >> ls is dired, email is MH-E. > > But what would you suggest as replacement for: > > $ make && gdb || mail -s "Compilation failed" home > Surely you don't use such a command when doing things interactively? A command like that is something I would use in an automated build process that isn't run interactively. For example, I've used something similar in a envrionment where we wanted to rebuild each night from SVN. This to me is a different question to working interactively. I don't see you cold ever eliminate the shell completely as many non-interactive processes use it. However, I do believe you can work totally through emacs. In fact, I know you can because that is how I *have* to work. I'm a blind programmer and work almost exclusively in the Unix world. My main interface to the system is through emacs and using a package called emacspeak. In general, if there is an emacs specific package to do a job, I use that (e.g. dired, tramp, VM, w3m, view-process (now using proced) ediff, PCL-CVS, psvn, man/woman, etc) and then revert to M-x shell, M-x term and M-x eshell when I need access to the shell or need to run a program directly in a shell etc. Though I've not used them, you also have elisp clones of things like screen and even basic window management packages. At one time I even used emacs as my window manager under X e.g. last part in my .xsession file was to try and run emacs and if that failed, run an exterm that executed a program that told me emacs had failed and started a very basic screen reader program in an xterm. > More generally sh scripts allow automatisation processes that you > can't simply do with emacs commands, it similar to using a mouse > actually. I don't think you can get rid of them. > I use lots of shell scripts to do various things, but I run them from within emacs and in some cases, have them bound to specific key bindings. > Futhermore there are a lot of tools out there that are not integrated > to emacs if you do so, you don't have enough keys on the keyboard to > create bindings ;) > yes, there are a lot of things that don't have 'native' emacs modes. However, I disagree there are not enough available key bindings - there are more than anyone is ever going to remember. What a lot of people don't do or possibly don't even realise is that in addition to M- and C- for meta and control bindings, you also have hyper and super. These can be bound to keys like the windows menu key and some of those other often unused keys on your keyboard. Combine those with shift and you have a lot of combinations. Admittedly, some of them can be uncomfortable to use, but thats a different issue and depends on things liike the type of keyborad, your style of typeing and even things like the size of your hands, length of your fingers, degree of flexibility you have in your hands, table height and chair. > So I don't think you can realistically get rid of a shell > You can't get rid of the shell - its fundamental to how the system works. However, you can create an environment wehre you only interact with the shell through emacs without losing any functionality or flexibility. It may take some work to get it configured, but thats a different issue. > So for now I don't think I can forget Gnu Screen: one screen to handle > a terminal with a shell where all my ncurse based applications can > work properly and another screen where emacs lives. > Your ncurses applications should behave fine under M-x term provided you have the correct terminfo information setup. Things can be a little more complex if you want to un ncurses programs over ssh on another host, but this can be fixed by adding the necessary terminfo data to the remote servers. Tim -- tcross (at) rapttech dot com dot au