* Re: What I'm missing when using M-x shell [not found] <mailman.19125.1221236437.18990.help-gnu-emacs@gnu.org> @ 2008-09-12 17:34 ` Dan Espen 2008-09-13 8:27 ` Francis Moreau [not found] ` <mailman.19169.1221294471.18990.help-gnu-emacs@gnu.org> 2008-09-12 17:59 ` Oleksandr Gavenko ` (3 subsequent siblings) 4 siblings, 2 replies; 42+ messages in thread From: Dan Espen @ 2008-09-12 17:34 UTC (permalink / raw) To: help-gnu-emacs "Francis Moreau" <francis.moro@gmail.com> writes: > Hello, > > I'm still trying to do all my jobs inside emacs but I'm missing a couple > things. > > The first one is what I can't do anymore when working with a shell/terminal > inside emacs. ... > Am I missing something ? Maybe. I do all my work inside emacs except for browsing and 3270 emulation. I've used M-x shell in the past but not for many years. Compiles are M-x compile, greps are M-x grep, ls is dired, email is MH-E. Maybe most emacs users aren't that committed to M-x shell and it's friends. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-12 17:34 ` What I'm missing when using M-x shell Dan Espen @ 2008-09-13 8:27 ` Francis Moreau 2008-09-15 7:32 ` Jonathan Groll [not found] ` <mailman.19169.1221294471.18990.help-gnu-emacs@gnu.org> 1 sibling, 1 reply; 42+ messages in thread From: Francis Moreau @ 2008-09-13 8:27 UTC (permalink / raw) To: Dan Espen; +Cc: help-gnu-emacs [ please CC me when replying to me ] On Fri, Sep 12, 2008 at 7:34 PM, Dan Espen <daneNO@more.mk.spamtelcordia.com> 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 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. 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 ;) So I don't think you can realistically get rid of a shell > Maybe most emacs users aren't that committed to M-x shell and > it's friends. Probably. 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. Thanks -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-13 8:27 ` Francis Moreau @ 2008-09-15 7:32 ` Jonathan Groll 2008-09-15 8:42 ` Francis Moreau 0 siblings, 1 reply; 42+ messages in thread From: Jonathan Groll @ 2008-09-15 7:32 UTC (permalink / raw) To: help-gnu-emacs On Sat, Sep 13, 2008 at 10:27:47AM +0200, Francis Moreau wrote: >[ please CC me when replying to me ] > >On Fri, Sep 12, 2008 at 7:34 PM, Dan Espen ><daneNO@more.mk.spamtelcordia.com> 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 > >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. > >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 ;) > >So I don't think you can realistically get rid of a shell > >> Maybe most emacs users aren't that committed to M-x shell and >> it's friends. > >Probably. > >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. > On the subject of GNU screen and emacs: Bill Clementson wrote a good entry on using emacsclient and screen - http://bc.tech.coop/blog/071001.html Regarding mutt with emacs, there is a page on the emacswiki you may want to read: http://www.emacswiki.org/cgi-bin/emacs-en/MuttInEmacs It may also possibly be necessary to adjust the colour scheme used in .muttrc: http://www.mail-archive.com/mutt-users@mutt.org/msg21810.html Personally, I have been using gnu-screen with an emacs server running in one window and mutt in another window, based on what Bill Clementson wrote. Regards, Jonathan ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-15 7:32 ` Jonathan Groll @ 2008-09-15 8:42 ` Francis Moreau 2008-09-15 9:05 ` Francis Moreau 0 siblings, 1 reply; 42+ messages in thread From: Francis Moreau @ 2008-09-15 8:42 UTC (permalink / raw) To: Jonathan Groll; +Cc: help-gnu-emacs Hello. On Mon, Sep 15, 2008 at 9:32 AM, Jonathan Groll <lists@groll.co.za> wrote: > > On the subject of GNU screen and emacs: Bill Clementson wrote a good > entry on using emacsclient and screen - > http://bc.tech.coop/blog/071001.html Thanks ! That was interesting. I actually had a similar concern but come up with a different solution. I use desktop in my main projects directory and in my home directory. When starting emacs in one of those directories, I start an emacs server whose name is exported through a environment variable. This variable has a different value depending on the desktop I used. After that in my bashrc I do: export EDITOR="emacsclient -s $EMACS_SERVER_NAME" and that's it. Each time I start a term in emacs and start an application that uses EDITOR, it start an emacsclient in the ritght emacs desktop. But I agree this solution works only inside an emacs term unlike the solution you pointed out. But that's my first step in "do it all in emacs !" ;) And as the author said with emacs tty-muti-support, this is now useless. > > Regarding mutt with emacs, there is a page on the emacswiki you may > want to read: > http://www.emacswiki.org/cgi-bin/emacs-en/MuttInEmacs > > It may also possibly be necessary to adjust the colour scheme used in > .muttrc: > http://www.mail-archive.com/mutt-users@mutt.org/msg21810.html > > Personally, I have been using gnu-screen with an emacs server running > in one window and mutt in another window, based on what Bill > Clementson wrote. Thanks again but I'm planning to get rid of mutt and to use either gnus or mh-e. I need to test both of them first to get an opinion. -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-15 8:42 ` Francis Moreau @ 2008-09-15 9:05 ` Francis Moreau 0 siblings, 0 replies; 42+ messages in thread From: Francis Moreau @ 2008-09-15 9:05 UTC (permalink / raw) To: Jonathan Groll; +Cc: help-gnu-emacs On Mon, Sep 15, 2008 at 10:42 AM, Francis Moreau <francis.moro@gmail.com> wrote: > But I agree this solution works only inside an emacs term unlike the > solution you pointed out. But that's my first step in "do it all in emacs !" > OK I tried the solution you pointed out for all emacsclient started outside an emacs session and it works great ! Thanks. -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
[parent not found: <mailman.19169.1221294471.18990.help-gnu-emacs@gnu.org>]
* Re: What I'm missing when using M-x shell [not found] ` <mailman.19169.1221294471.18990.help-gnu-emacs@gnu.org> @ 2008-09-13 15:42 ` Dan Espen 2008-09-13 16:43 ` Francis Moreau 2008-09-14 4:02 ` Tim X 1 sibling, 1 reply; 42+ messages in thread From: Dan Espen @ 2008-09-13 15:42 UTC (permalink / raw) To: help-gnu-emacs "Francis Moreau" <francis.moro@gmail.com> writes: > [ please CC me when replying to me ] > > On Fri, Sep 12, 2008 at 7:34 PM, Dan Espen > <daneNO@more.mk.spamtelcordia.com> 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 First, the make is always run as M-x compile. In my case, the most likely outcome from M-x compile is that I'll be correcting syntax errors. Since I've run M-x compile, M-x next-error becomes really useful. So, no make from the command line for me. I'm got a big fan of running under gdb. If I did want to run under gdb a lot, I'd probably figure out Emacs gdb. Typically my make target is not just a compile but a compile and test and check results. No need to send myself an email since the M-x compile clearly shows whether the compile/test worked. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-13 15:42 ` Dan Espen @ 2008-09-13 16:43 ` Francis Moreau 2008-09-13 17:32 ` Thierry Volpiatto 0 siblings, 1 reply; 42+ messages in thread From: Francis Moreau @ 2008-09-13 16:43 UTC (permalink / raw) To: Dan Espen; +Cc: help-gnu-emacs On Sat, Sep 13, 2008 at 5:42 PM, Dan Espen <daneNO@more.mk.spamtelcordia.com> wrote: > "Francis Moreau" <francis.moro@gmail.com> writes: > >> [ please CC me when replying to me ] >> >> On Fri, Sep 12, 2008 at 7:34 PM, Dan Espen >> <daneNO@more.mk.spamtelcordia.com> 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 > > First, the make is always run as M-x compile. > > In my case, the most likely outcome from M-x compile is > that I'll be correcting syntax errors. Since I've run > M-x compile, M-x next-error becomes really useful. > > So, no make from the command line for me. > > I'm got a big fan of running under gdb. > If I did want to run under gdb a lot, I'd probably figure out > Emacs gdb. > > Typically my make target is not just a compile but a compile > and test and check results. No need to send myself > an email since the M-x compile clearly shows whether the > compile/test worked. > That was just a (silly) example where scripting can be powerful and can't be replace by some M-x <cmd> or whatever... -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-13 16:43 ` Francis Moreau @ 2008-09-13 17:32 ` Thierry Volpiatto 2008-09-13 19:14 ` Francis Moreau 0 siblings, 1 reply; 42+ messages in thread From: Thierry Volpiatto @ 2008-09-13 17:32 UTC (permalink / raw) To: Francis Moreau; +Cc: help-gnu-emacs, Dan Espen "Francis Moreau" <francis.moro@gmail.com> writes: > On Sat, Sep 13, 2008 at 5:42 PM, Dan Espen > <daneNO@more.mk.spamtelcordia.com> wrote: >> "Francis Moreau" <francis.moro@gmail.com> writes: >> >>> [ please CC me when replying to me ] >>> >>> On Fri, Sep 12, 2008 at 7:34 PM, Dan Espen >>> <daneNO@more.mk.spamtelcordia.com> 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 >> >> First, the make is always run as M-x compile. >> >> In my case, the most likely outcome from M-x compile is >> that I'll be correcting syntax errors. Since I've run >> M-x compile, M-x next-error becomes really useful. >> >> So, no make from the command line for me. >> >> I'm got a big fan of running under gdb. >> If I did want to run under gdb a lot, I'd probably figure out >> Emacs gdb. >> >> Typically my make target is not just a compile but a compile >> and test and check results. No need to send myself >> an email since the M-x compile clearly shows whether the >> compile/test worked. >> > > That was just a (silly) example where scripting can be powerful and > can't be replace by some M-x <cmd> or whatever... Did you try using a window manager that work correctly with emacs+shell like stumpwm or rat-poison. I am using stumpwm and i am really happy with it. I can switch to a shell at anytime just like in emacs. Have also a look at eev:(you may like that if you are a fan of shell) http://angg.twu.net/eev-article.html and try to eval from anywhere in emacs (C-x C-e) for example: (find-sh "ps -u $USER | grep emacs | awk '{print $1}'") Try also to use M-x ansi-term that is much better than term. You can run many shell in emacs and more. -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-13 17:32 ` Thierry Volpiatto @ 2008-09-13 19:14 ` Francis Moreau 2008-09-13 19:50 ` Thierry Volpiatto 0 siblings, 1 reply; 42+ messages in thread From: Francis Moreau @ 2008-09-13 19:14 UTC (permalink / raw) To: Thierry Volpiatto; +Cc: help-gnu-emacs, Dan Espen Hello, On Sat, Sep 13, 2008 at 7:32 PM, Thierry Volpiatto <thierry.volpiatto@gmail.com> wrote: > Did you try using a window manager that work correctly with emacs+shell > like stumpwm or rat-poison. > I am using stumpwm and i am really happy with it. > I can switch to a shell at anytime just like in emacs. > No I haven't and I don't think I will have some spare time to try them. For now I'm using Screen with emacs and it works ok. > Have also a look at eev:(you may like that if you are a fan of shell) > > http://angg.twu.net/eev-article.html > > and try to eval from anywhere in emacs (C-x C-e) for example: > > (find-sh "ps -u $USER | grep emacs | awk '{print $1}'") > Interesting thanks. > Try also to use M-x ansi-term that is much better than term. I haven't seen any differences. Maybe because they both use an 'eterm-color' terminal. > You can run many shell in emacs and more. That's the problem I think. Too many way to achieve the main goal. Why not doing one implementation and doing it well ? -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-13 19:14 ` Francis Moreau @ 2008-09-13 19:50 ` Thierry Volpiatto 0 siblings, 0 replies; 42+ messages in thread From: Thierry Volpiatto @ 2008-09-13 19:50 UTC (permalink / raw) To: Francis Moreau; +Cc: help-gnu-emacs, Dan Espen "Francis Moreau" <francis.moro@gmail.com> writes: > Hello, > > On Sat, Sep 13, 2008 at 7:32 PM, Thierry Volpiatto > <thierry.volpiatto@gmail.com> wrote: >> Did you try using a window manager that work correctly with emacs+shell >> like stumpwm or rat-poison. >> I am using stumpwm and i am really happy with it. >> I can switch to a shell at anytime just like in emacs. >> > > No I haven't and I don't think I will have some spare time to try them. > > For now I'm using Screen with emacs and it works ok. > >> Have also a look at eev:(you may like that if you are a fan of shell) >> >> http://angg.twu.net/eev-article.html >> >> and try to eval from anywhere in emacs (C-x C-e) for example: >> >> (find-sh "ps -u $USER | grep emacs | awk '{print $1}'") >> > > Interesting thanks. > >> Try also to use M-x ansi-term that is much better than term. > > I haven't seen any differences. Maybe because they both use an > 'eterm-color' terminal. > >> You can run many shell in emacs and more. > > That's the problem I think. > > Too many way to achieve the main goal. > Why not doing one implementation and doing it well ? No, what i mean is that with M-x term, you can run only one shell. with ansi-term you can start more than one. *ansi-term*<2> *ansi-term*<3> etc... -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell [not found] ` <mailman.19169.1221294471.18990.help-gnu-emacs@gnu.org> 2008-09-13 15:42 ` Dan Espen @ 2008-09-14 4:02 ` Tim X 1 sibling, 0 replies; 42+ messages in thread From: Tim X @ 2008-09-14 4:02 UTC (permalink / raw) To: help-gnu-emacs "Francis Moreau" <francis.moro@gmail.com> writes: > [ please CC me when replying to me ] > > On Fri, Sep 12, 2008 at 7:34 PM, Dan Espen > <daneNO@more.mk.spamtelcordia.com> 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 ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell [not found] <mailman.19125.1221236437.18990.help-gnu-emacs@gnu.org> 2008-09-12 17:34 ` What I'm missing when using M-x shell Dan Espen @ 2008-09-12 17:59 ` Oleksandr Gavenko 2008-09-13 8:29 ` Francis Moreau [not found] ` <mailman.19170.1221294576.18990.help-gnu-emacs@gnu.org> 2008-09-13 6:10 ` rustom ` (2 subsequent siblings) 4 siblings, 2 replies; 42+ messages in thread From: Oleksandr Gavenko @ 2008-09-12 17:59 UTC (permalink / raw) To: help-gnu-emacs Francis Moreau wrote: > 4/ There's no readline "yank-last-arg" function which inserts the last > argument to the previous commands Is the feature useful? In C-x shell you can move cursor to select any previous typing and pressing M-> to back to writing command. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-12 17:59 ` Oleksandr Gavenko @ 2008-09-13 8:29 ` Francis Moreau [not found] ` <mailman.19170.1221294576.18990.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 42+ messages in thread From: Francis Moreau @ 2008-09-13 8:29 UTC (permalink / raw) To: gavenkoa; +Cc: help-gnu-emacs Hello, On Fri, Sep 12, 2008 at 7:59 PM, Oleksandr Gavenko <gavenkoa@gmail.com> wrote: > Francis Moreau wrote: >> >> 4/ There's no readline "yank-last-arg" function which inserts the last >> argument to the previous commands > > Is the feature useful? > In C-x shell you can move cursor to select any previous typing and pressing > M-> to back to writing command. > Do you realize how many key pressings you're doing to do what you described ? In my use case I only press one time. -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
[parent not found: <mailman.19170.1221294576.18990.help-gnu-emacs@gnu.org>]
* Re: What I'm missing when using M-x shell [not found] ` <mailman.19170.1221294576.18990.help-gnu-emacs@gnu.org> @ 2008-09-15 18:32 ` Oleksandr Gavenko 0 siblings, 0 replies; 42+ messages in thread From: Oleksandr Gavenko @ 2008-09-15 18:32 UTC (permalink / raw) To: help-gnu-emacs Francis Moreau пишет: > Hello, > > On Fri, Sep 12, 2008 at 7:59 PM, Oleksandr Gavenko <gavenkoa@gmail.com> wrote: >> Francis Moreau wrote: >>> 4/ There's no readline "yank-last-arg" function which inserts the last >>> argument to the previous commands >> Is the feature useful? >> In C-x shell you can move cursor to select any previous typing and pressing >> M-> to back to writing command. >> > > Do you realize how many key pressings you're doing to do what you described ? > > In my use case I only press one time. > Using key typo depend of your task. I write sh, C, Java related type of files, often on Windows (at work) and so I do not need remember specials key binding for a such task, I construct it from that I know. If you need more than 3 time for a 10 second period do such task you have reason. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell [not found] <mailman.19125.1221236437.18990.help-gnu-emacs@gnu.org> 2008-09-12 17:34 ` What I'm missing when using M-x shell Dan Espen 2008-09-12 17:59 ` Oleksandr Gavenko @ 2008-09-13 6:10 ` rustom 2008-09-13 8:36 ` Francis Moreau 2008-09-13 8:08 ` Livin Stephen 2008-09-13 22:43 ` Chris F.A. Johnson 4 siblings, 1 reply; 42+ messages in thread From: rustom @ 2008-09-13 6:10 UTC (permalink / raw) To: help-gnu-emacs On Sep 12, 9:20 pm, "Francis Moreau" <francis.m...@gmail.com> wrote: > Hello, > > I'm still trying to do all my jobs inside emacs but I'm missing a couple > things. > > The first one is what I can't do anymore when working with a shell/terminal > inside emacs. > > 1/ Most applications based on ncurse behave strangely when using > M-x term > > 2/ Although M-x shell has history reference completions, it doesn't complete > for '!#:<n>'. But '!!:<n>' works fine though. > > 3/ There's no readline "reverse-search-history" function (C-r) which does > an _incremental_ search; > > 4/ There's no readline "yank-last-arg" function which inserts the last > argument to the previous commands > > 5/ emacs doesn't expand shell variable when hitting <TAB> > > Am I missing something ? > > Thanks > -- > Francis shell's inadequacies in emacs are well known. eshell often works better ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-13 6:10 ` rustom @ 2008-09-13 8:36 ` Francis Moreau 0 siblings, 0 replies; 42+ messages in thread From: Francis Moreau @ 2008-09-13 8:36 UTC (permalink / raw) To: rustom; +Cc: help-gnu-emacs Hello, On Sat, Sep 13, 2008 at 8:10 AM, rustom <rustompmody@gmail.com> wrote: > > shell's inadequacies in emacs are well known. Do you have any pointers that describes them ? > eshell often works better I just try history reference completion, and it's even worse... thanks -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell [not found] <mailman.19125.1221236437.18990.help-gnu-emacs@gnu.org> ` (2 preceding siblings ...) 2008-09-13 6:10 ` rustom @ 2008-09-13 8:08 ` Livin Stephen 2008-09-13 9:00 ` Francis Moreau ` (2 more replies) 2008-09-13 22:43 ` Chris F.A. Johnson 4 siblings, 3 replies; 42+ messages in thread From: Livin Stephen @ 2008-09-13 8:08 UTC (permalink / raw) To: help-gnu-emacs On Sep 12, 9:20 pm, "Francis Moreau" <francis.m...@gmail.com> wrote: > Hello, > > I'm still trying to do all my jobs inside emacs but I'm missing a couple > things. > > The first one is what I can't do anymore when working with a shell/terminal > inside emacs. > > 1/ Most applications based on ncurse behave strangely when using > M-x term > > 2/ Although M-x shell has history reference completions, it doesn't complete > for '!#:<n>'. But '!!:<n>' works fine though. > > 3/ There's no readline "reverse-search-history" function (C-r) which does > an _incremental_ search; > > 4/ There's no readline "yank-last-arg" function which inserts the last > argument to the previous commands > > 5/ emacs doesn't expand shell variable when hitting <TAB> > > Am I missing something ? > > Thanks > -- > Francis Hi, FM. I too found M-x term to initially fall terribly short - but not anymore :) YMMV, but I had to "export TERM=xterm" in my ~/.bashrc to make M-x term work as per expectations... - i.e. to be usable for everyday use: on my Mac I'm perfectly happy with it's behaviour now! (previous value in M-x term term used to show $TERM to be eterm-color or something like that) After this change my man-pages, etc don't look like their full of odd characters (especiallly when trying to print single-quotes), nor is man-page text underlined randomly . This TERM change definitely took care of at least issues 3/, and 5/ which you mention - I have both "C-r" history-search and "TAB"-completion of shell-vars AND file-names working. Cheers --livin.stephen ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-13 8:08 ` Livin Stephen @ 2008-09-13 9:00 ` Francis Moreau 2008-09-13 11:21 ` Livin Stephen Sharma 2008-09-13 12:22 ` David Hansen 2008-09-14 2:20 ` Tim X 2 siblings, 1 reply; 42+ messages in thread From: Francis Moreau @ 2008-09-13 9:00 UTC (permalink / raw) To: Livin Stephen; +Cc: help-gnu-emacs Hello, On Sat, Sep 13, 2008 at 10:08 AM, Livin Stephen <livin.stephen@gmail.com> wrote: > > YMMV, but I had to "export TERM=xterm" in my ~/.bashrc to make M-x > term work as per expectations... hmm I'm probably missing something here but why exporting TERM=xterm would change anything since it is already if you're using a window manager. > - i.e. to be usable for everyday use: on my Mac I'm perfectly happy > with it's behaviour now! ah ok you're using a Mac, so that explains probably why you need to export TERM > (previous value in M-x term term used to show $TERM to be eterm-color > or something like that) > yes and that should be again the case. Let see: $ TERM=xterm emacs < M-x term> $ echo $TERM eterm-color I don't understand how you did that. > After this change my man-pages, etc don't look like their full of odd > characters (especiallly when trying to print single-quotes), nor is > man-page text underlined randomly . did you try to start mutt for example ? > This TERM change definitely took care of at least issues 3/, and 5/ > which you mention > - I have both "C-r" history-search and "TAB"-completion of shell-vars > AND file-names working. I don't think so, I'm talking about expansion, not completion for issue 5) Thanks -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-13 9:00 ` Francis Moreau @ 2008-09-13 11:21 ` Livin Stephen Sharma 2008-09-13 14:27 ` Francis Moreau 0 siblings, 1 reply; 42+ messages in thread From: Livin Stephen Sharma @ 2008-09-13 11:21 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 1790 bytes --] 2008/9/13 Francis Moreau <francis.moro@gmail.com> > Hello, > > On Sat, Sep 13, 2008 at 10:08 AM, Livin Stephen <livin.stephen@gmail.com> > wrote: > > > > YMMV, but I had to "export TERM=xterm"... > > hmm I'm probably missing something here but why exporting TERM=xterm > would change anything since it is already if you're using a window > manager. > > > - i.e. to be usable for everyday use... > > ah ok you're using a Mac, so that explains probably why you need to export > TERM Actually, without exporting TERM, I saw emacs' term to show it to be "eterm-color": the need to export it was to get it to be "xterm" instead. > > > (previous value in... > > > yes and that should be again the case. Let see: > > $ TERM=xterm emacs > < M-x term> > $ echo $TERM > eterm-color > > I don't understand how you did that. I set TERM=xterm ***in my /home/<user>/.bashrc*** (**not** on the command-line prior to invoking emacs). My only guess is that When "M-x term" starts up a shell (/bin/bash for me) it would 'load' the .bashrc file from my home directory. Maybe that way you'd wouldn't get "eterm-color" within M-x term. Worth a shot ? > > > After this change my man-pages, etc don't look like their full of odd > > characters (especiallly when trying to print single-quotes), nor is > > man-page text underlined randomly . > > did you try to start mutt for example ? No, I don't use mutt, so I can't comment on that :) . > > > This TERM change definitely took care of at least issues 3/, and 5/ > > which you mention > > - I have both "C-r" history-search and "TAB"-completion of shell-vars > > AND file-names working. > > I don't think so, I'm talking about expansion, not completion for issue 5) Yes, I misunderstood that. -- LSS > > Thanks > -- > Francis > [-- Attachment #2: Type: text/html, Size: 3340 bytes --] ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-13 11:21 ` Livin Stephen Sharma @ 2008-09-13 14:27 ` Francis Moreau 0 siblings, 0 replies; 42+ messages in thread From: Francis Moreau @ 2008-09-13 14:27 UTC (permalink / raw) To: Livin Stephen Sharma; +Cc: help-gnu-emacs On Sat, Sep 13, 2008 at 1:21 PM, Livin Stephen Sharma <livin.stephen@gmail.com> wrote: > > I set TERM=xterm ***in my /home/<user>/.bashrc*** > (**not** on the command-line prior to invoking emacs). > My only guess is that When "M-x term" starts up a shell (/bin/bash for me) > it would 'load' the .bashrc file from my home directory. Maybe that way > you'd wouldn't get "eterm-color" within M-x term. Worth a shot ? Ah ok. But you're claiming your terminal has xterm capabilites whereas M-x term has probably not. I don't know why it improves thing for you though. And no, I tried this and it doesn't improve anything. -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-13 8:08 ` Livin Stephen 2008-09-13 9:00 ` Francis Moreau @ 2008-09-13 12:22 ` David Hansen 2008-09-14 2:20 ` Tim X 2 siblings, 0 replies; 42+ messages in thread From: David Hansen @ 2008-09-13 12:22 UTC (permalink / raw) To: help-gnu-emacs On Sat, 13 Sep 2008 01:08:19 -0700 (PDT) Livin Stephen wrote: > I too found M-x term to initially fall terribly short - but not > anymore :) > > YMMV, but I had to "export TERM=xterm" in my ~/.bashrc to make M-x > term work as per expectations... > - i.e. to be usable for everyday use: on my Mac I'm perfectly happy > with it's behaviour now! You should install the terminfo stuff from /etc/e. The emacs term for sure is different from an xterm. David ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-13 8:08 ` Livin Stephen 2008-09-13 9:00 ` Francis Moreau 2008-09-13 12:22 ` David Hansen @ 2008-09-14 2:20 ` Tim X 2008-09-15 7:56 ` Livin Stephen 2 siblings, 1 reply; 42+ messages in thread From: Tim X @ 2008-09-14 2:20 UTC (permalink / raw) To: help-gnu-emacs Livin Stephen <livin.stephen@gmail.com> writes: > On Sep 12, 9:20 pm, "Francis Moreau" <francis.m...@gmail.com> wrote: >> Hello, >> >> I'm still trying to do all my jobs inside emacs but I'm missing a couple >> things. >> >> The first one is what I can't do anymore when working with a shell/terminal >> inside emacs. >> >> 1/ Most applications based on ncurse behave strangely when using >> M-x term >> >> 2/ Although M-x shell has history reference completions, it doesn't complete >> for '!#:<n>'. But '!!:<n>' works fine though. >> >> 3/ There's no readline "reverse-search-history" function (C-r) which does >> an _incremental_ search; >> >> 4/ There's no readline "yank-last-arg" function which inserts the last >> argument to the previous commands >> >> 5/ emacs doesn't expand shell variable when hitting <TAB> >> >> Am I missing something ? >> >> Thanks >> -- >> Francis > > > Hi, FM. > I too found M-x term to initially fall terribly short - but not > anymore :) > > YMMV, but I had to "export TERM=xterm" in my ~/.bashrc to make M-x > term work as per expectations... > - i.e. to be usable for everyday use: on my Mac I'm perfectly happy > with it's behaviour now! > > > (previous value in M-x term term used to show $TERM to be eterm-color > or something like that) > > After this change my man-pages, etc don't look like their full of odd > characters (especiallly when trying to print single-quotes), nor is > man-page text underlined randomly . > > This TERM change definitely took care of at least issues 3/, and 5/ > which you mention > - I have both "C-r" history-search and "TAB"-completion of shell-vars > AND file-names working. > I think the reason you got better results setting the term to xterm rather than eterm-color is to do with terminfo. There are many programs that when executed check the terminfo database to find out what the capabilities of the terminal are. Often, a program will drop back to a 'dumb' terminal setting if the terminal returned by $TERM is not in the terminfo database. IIRC, eterm-color is not set in the terminfo database on most systems, so when you run a program, it cannot determine what the capabilities/characteristics of the terminal your running under are. Setting the TERM variable to xterm probably gives resonable results because the capabilities are similar. However, you would probably get even better results by adding eterm-color to your terminfo database. I think you will find the relevant information in the Emacs etc/e directory. I'm surprised setting TERM=xterm and exporting it prior to running M-x term works at all. The TERM setting is (I think) set as part of the startup (see term.el). I'm assuming what you are doing is issuing an export TERM=xterm or something similar once you have started M-x term? On my system, Debian, I've put the eterm-color terminfo file in /etc/terminfo/e/ and I don't seem to have many of the problems being reported under M-x term. For example, if I enter echo $T and hit tab, it is completed to echo $TERM. HTH Tim -- tcross (at) rapttech dot com dot au ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-14 2:20 ` Tim X @ 2008-09-15 7:56 ` Livin Stephen 2008-09-15 8:49 ` Francis Moreau 0 siblings, 1 reply; 42+ messages in thread From: Livin Stephen @ 2008-09-15 7:56 UTC (permalink / raw) To: help-gnu-emacs On Sep 14, 7:20 am, Tim X <t...@nospam.dev.null> wrote: > ..... > > I think the reason you got better results setting the term to xterm > rather than eterm-color is to do with terminfo. > > ... > > Tim > > -- > tcross (at) rapttech dot com dot au Tim, Thanks for a very informative post! This is something I'll check out myself. Tim, Francis, ... I know some keyboard shortcuts (like M-t, C-k, C-r) that work in, say bash, but I always thought of them as emacs-ish shortcuts conveniently available there. Then seeing the man-page for 'bash' i came across 'Readline' which seems to actually provide these shortcuts and functions. So my question is: How do you invoke commands like (yank-last-arg) in any shell [ not just emacs' term ] if they don't have a keybinding ? For example, invoke 'kill-word' without using the shortcut key 'M-d'. Is this possible ? [ Posting here so as to not start another term/shell thread ] ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-15 7:56 ` Livin Stephen @ 2008-09-15 8:49 ` Francis Moreau 0 siblings, 0 replies; 42+ messages in thread From: Francis Moreau @ 2008-09-15 8:49 UTC (permalink / raw) To: Livin Stephen; +Cc: help-gnu-emacs Hello, On Mon, Sep 15, 2008 at 9:56 AM, Livin Stephen <livin.stephen@gmail.com> wrote: > ... I know some keyboard shortcuts (like M-t, C-k, C-r) that work in, > say bash, but I always thought of them as emacs-ish shortcuts > conveniently available there. Then seeing the man-page for 'bash' i > came across 'Readline' which seems to actually provide these shortcuts > and functions. > > So my question is: > How do you invoke commands like (yank-last-arg) in any shell [ not > just emacs' term ] if they don't have a keybinding ? > For example, > invoke 'kill-word' without using the shortcut key 'M-d'. Is this > possible ? I don't think you can but I'm really not sure. The only thing I know for sure is that you can use ~/.inputrc to map some binding with realdine functions. But this is well described in bash man page. -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell [not found] <mailman.19125.1221236437.18990.help-gnu-emacs@gnu.org> ` (3 preceding siblings ...) 2008-09-13 8:08 ` Livin Stephen @ 2008-09-13 22:43 ` Chris F.A. Johnson 2008-09-14 18:30 ` Francis Moreau [not found] ` <mailman.19221.1221417026.18990.help-gnu-emacs@gnu.org> 4 siblings, 2 replies; 42+ messages in thread From: Chris F.A. Johnson @ 2008-09-13 22:43 UTC (permalink / raw) To: help-gnu-emacs On 2008-09-12, Francis Moreau wrote: ... > 4/ There's no readline "yank-last-arg" function which inserts the last > argument to the previous commands C-up -- Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com> =================================================================== Author: Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-13 22:43 ` Chris F.A. Johnson @ 2008-09-14 18:30 ` Francis Moreau 2008-09-14 18:40 ` Thierry Volpiatto [not found] ` <mailman.19222.1221417839.18990.help-gnu-emacs@gnu.org> [not found] ` <mailman.19221.1221417026.18990.help-gnu-emacs@gnu.org> 1 sibling, 2 replies; 42+ messages in thread From: Francis Moreau @ 2008-09-14 18:30 UTC (permalink / raw) To: cfajohnson; +Cc: help-gnu-emacs On Sun, Sep 14, 2008 at 12:43 AM, Chris F.A. Johnson <cfajohnson@gmail.com> wrote: > On 2008-09-12, Francis Moreau wrote: > ... >> 4/ There's no readline "yank-last-arg" function which inserts the last >> argument to the previous commands > > C-up > really ? could you tell me on which function this is binded ? thanks -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-14 18:30 ` Francis Moreau @ 2008-09-14 18:40 ` Thierry Volpiatto [not found] ` <mailman.19222.1221417839.18990.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 42+ messages in thread From: Thierry Volpiatto @ 2008-09-14 18:40 UTC (permalink / raw) To: Francis Moreau; +Cc: cfajohnson, help-gnu-emacs "Francis Moreau" <francis.moro@gmail.com> writes: > On Sun, Sep 14, 2008 at 12:43 AM, Chris F.A. Johnson > <cfajohnson@gmail.com> wrote: >> On 2008-09-12, Francis Moreau wrote: >> ... >>> 4/ There's no readline "yank-last-arg" function which inserts the last >>> argument to the previous commands >> >> C-up >> > > really ? > > could you tell me on which function this is binded ? <C-up> runs the command comint-previous-input -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France ^ permalink raw reply [flat|nested] 42+ messages in thread
[parent not found: <mailman.19222.1221417839.18990.help-gnu-emacs@gnu.org>]
* Re: What I'm missing when using M-x shell [not found] ` <mailman.19222.1221417839.18990.help-gnu-emacs@gnu.org> @ 2008-09-14 18:55 ` Barry Margolin 2008-09-14 20:28 ` Francis Moreau 0 siblings, 1 reply; 42+ messages in thread From: Barry Margolin @ 2008-09-14 18:55 UTC (permalink / raw) To: help-gnu-emacs In article <mailman.19222.1221417839.18990.help-gnu-emacs@gnu.org>, Thierry Volpiatto <thierry.volpiatto@gmail.com> wrote: > "Francis Moreau" <francis.moro@gmail.com> writes: > > > On Sun, Sep 14, 2008 at 12:43 AM, Chris F.A. Johnson > > <cfajohnson@gmail.com> wrote: > >> On 2008-09-12, Francis Moreau wrote: > >> ... > >>> 4/ There's no readline "yank-last-arg" function which inserts the last > >>> argument to the previous commands > >> > >> C-up > >> > > > > really ? > > > > could you tell me on which function this is binded ? > > <C-up> runs the command comint-previous-input But that yanks the whole command line, not just the last argument. I still the shell's history features for !$ and !*. The nice thing is that Emacs recognizes them and substitutes them into its history list, so that if I use commands like C-up it will yank them with the appropriate values. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group *** ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-14 18:55 ` Barry Margolin @ 2008-09-14 20:28 ` Francis Moreau 2008-09-14 20:41 ` Francis Moreau 0 siblings, 1 reply; 42+ messages in thread From: Francis Moreau @ 2008-09-14 20:28 UTC (permalink / raw) To: Barry Margolin; +Cc: help-gnu-emacs On Sun, Sep 14, 2008 at 8:55 PM, Barry Margolin <barmar@alum.mit.edu> wrote: > In article <mailman.19222.1221417839.18990.help-gnu-emacs@gnu.org>, > Thierry Volpiatto <thierry.volpiatto@gmail.com> wrote: >> >> <C-up> runs the command comint-previous-input > > But that yanks the whole command line, not just the last argument. > Actually thinking about it, it should be quite easy to achieve this: just create a key binding to evaluate "!$<TAB>" sequence. -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-14 20:28 ` Francis Moreau @ 2008-09-14 20:41 ` Francis Moreau 0 siblings, 0 replies; 42+ messages in thread From: Francis Moreau @ 2008-09-14 20:41 UTC (permalink / raw) To: Barry Margolin; +Cc: help-gnu-emacs On Sun, Sep 14, 2008 at 10:28 PM, Francis Moreau <francis.moro@gmail.com> wrote: > On Sun, Sep 14, 2008 at 8:55 PM, Barry Margolin <barmar@alum.mit.edu> wrote: >> In article <mailman.19222.1221417839.18990.help-gnu-emacs@gnu.org>, >> Thierry Volpiatto <thierry.volpiatto@gmail.com> wrote: >>> >>> <C-up> runs the command comint-previous-input >> >> But that yanks the whole command line, not just the last argument. >> > > Actually thinking about it, it should be quite easy to achieve this: > just create a key binding to evaluate "!$<TAB>" sequence. > well to be more accurate we should create 'something' that evaluate to !-1:$ when call for the first time. If a second call is done without any <RETURN> key press then evaluate to !-2:$ etc... Though I dunno how to write that in elisp.. -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
[parent not found: <mailman.19221.1221417026.18990.help-gnu-emacs@gnu.org>]
* Re: What I'm missing when using M-x shell [not found] ` <mailman.19221.1221417026.18990.help-gnu-emacs@gnu.org> @ 2008-09-14 18:33 ` Chris F.A. Johnson 2008-09-14 18:50 ` Drew Adams ` (2 more replies) 0 siblings, 3 replies; 42+ messages in thread From: Chris F.A. Johnson @ 2008-09-14 18:33 UTC (permalink / raw) To: help-gnu-emacs On 2008-09-14, Francis Moreau wrote: > On Sun, Sep 14, 2008 at 12:43 AM, Chris F.A. Johnson ><cfajohnson@gmail.com> wrote: >> On 2008-09-12, Francis Moreau wrote: >> ... >>> 4/ There's no readline "yank-last-arg" function which inserts the last >>> argument to the previous commands >> >> C-up >> > > really ? > > could you tell me on which function this is binded ? <C-up> runs the command comint-previous-input -- Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com> =================================================================== Author: Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) ^ permalink raw reply [flat|nested] 42+ messages in thread
* RE: What I'm missing when using M-x shell 2008-09-14 18:33 ` Chris F.A. Johnson @ 2008-09-14 18:50 ` Drew Adams 2008-09-14 20:01 ` Francis Moreau [not found] ` <mailman.19228.1221422522.18990.help-gnu-emacs@gnu.org> 2 siblings, 0 replies; 42+ messages in thread From: Drew Adams @ 2008-09-14 18:50 UTC (permalink / raw) To: cfajohnson, help-gnu-emacs > >>> 4/ There's no readline "yank-last-arg" function which > >>> inserts the last argument to the previous commands > >> > >> C-up > > > > really ? > > > > could you tell me on which function this is binded ? > > <C-up> runs the command comint-previous-input FWIW, if you use Icicles, then `C-c TAB' in any comint (aka shell) mode lets you cycle past inputs or complete against them (with regexp/substring completion etc.). And `C-c `' also does these things (but differently). http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Other_Search_Commands#IciclesShe ll ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-14 18:33 ` Chris F.A. Johnson 2008-09-14 18:50 ` Drew Adams @ 2008-09-14 20:01 ` Francis Moreau 2008-09-15 10:26 ` Bernardo Bacic [not found] ` <mailman.19228.1221422522.18990.help-gnu-emacs@gnu.org> 2 siblings, 1 reply; 42+ messages in thread From: Francis Moreau @ 2008-09-14 20:01 UTC (permalink / raw) To: cfajohnson; +Cc: help-gnu-emacs On Sun, Sep 14, 2008 at 8:33 PM, Chris F.A. Johnson <cfajohnson@gmail.com> wrote: > On 2008-09-14, Francis Moreau wrote: >> On Sun, Sep 14, 2008 at 12:43 AM, Chris F.A. Johnson >><cfajohnson@gmail.com> wrote: >>> On 2008-09-12, Francis Moreau wrote: >>> ... >>>> 4/ There's no readline "yank-last-arg" function which inserts the last >>>> argument to the previous commands >>> >>> C-up >>> >> >> really ? >> >> could you tell me on which function this is binded ? > > <C-up> runs the command comint-previous-input > no this paste the whole command line, I'm asking for the last _argument_ -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-14 20:01 ` Francis Moreau @ 2008-09-15 10:26 ` Bernardo Bacic 0 siblings, 0 replies; 42+ messages in thread From: Bernardo Bacic @ 2008-09-15 10:26 UTC (permalink / raw) To: help-gnu-emacs >>> >>> could you tell me on which function this is binded ? >> <C-up> runs the command comint-previous-input >> > > no this paste the whole command line, I'm asking for the last _argument_ > FWIW (probably bash specific) M-x shell $ ls -l notes.txt -rw-rw---- 1 user user 196307 2008-09-14 21:29 notes.txt $ ls $_ notes.txt $ echo $_ notes.txt ^ permalink raw reply [flat|nested] 42+ messages in thread
[parent not found: <mailman.19228.1221422522.18990.help-gnu-emacs@gnu.org>]
* Re: What I'm missing when using M-x shell [not found] ` <mailman.19228.1221422522.18990.help-gnu-emacs@gnu.org> @ 2008-09-14 20:27 ` Chris F.A. Johnson 2008-09-15 6:32 ` Francis Moreau 0 siblings, 1 reply; 42+ messages in thread From: Chris F.A. Johnson @ 2008-09-14 20:27 UTC (permalink / raw) To: help-gnu-emacs On 2008-09-14, Francis Moreau wrote: > On Sun, Sep 14, 2008 at 8:33 PM, Chris F.A. Johnson ><cfajohnson@gmail.com> wrote: >> On 2008-09-14, Francis Moreau wrote: >>> On Sun, Sep 14, 2008 at 12:43 AM, Chris F.A. Johnson >>><cfajohnson@gmail.com> wrote: >>>> On 2008-09-12, Francis Moreau wrote: >>>> ... >>>>> 4/ There's no readline "yank-last-arg" function which inserts the last >>>>> argument to the previous commands >>>> >>>> C-up >>>> >>> >>> really ? >>> >>> could you tell me on which function this is binded ? >> >> <C-up> runs the command comint-previous-input >> > > no this paste the whole command line, I'm asking for the last _argument_ (defun last-arg () "" (interactive) (comint-previous-input 1) (search-backward " ") (kill-line) (comint-next-input 2) (yank) ) -- Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com> =================================================================== Author: Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-14 20:27 ` Chris F.A. Johnson @ 2008-09-15 6:32 ` Francis Moreau 2008-09-15 10:35 ` Francis Moreau 2008-09-15 11:38 ` Thierry Volpiatto 0 siblings, 2 replies; 42+ messages in thread From: Francis Moreau @ 2008-09-15 6:32 UTC (permalink / raw) To: cfajohnson; +Cc: help-gnu-emacs On Sun, Sep 14, 2008 at 10:27 PM, Chris F.A. Johnson <cfajohnson@gmail.com> wrote: > On 2008-09-14, Francis Moreau wrote: >> no this paste the whole command line, I'm asking for the last _argument_ > > (defun last-arg () "" (interactive) > (comint-previous-input 1) > (search-backward " ") > (kill-line) > (comint-next-input 2) > (yank) > ) > Even though I don't speak (yet) elisp, it does seem that if I call last-arg() several times then this yanks always the same arg... Try in an xterm to use M-. to see what I'm talkng about. Thanks -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-15 6:32 ` Francis Moreau @ 2008-09-15 10:35 ` Francis Moreau 2008-09-15 11:38 ` Thierry Volpiatto 1 sibling, 0 replies; 42+ messages in thread From: Francis Moreau @ 2008-09-15 10:35 UTC (permalink / raw) To: cfajohnson; +Cc: help-gnu-emacs On Mon, Sep 15, 2008 at 8:32 AM, Francis Moreau <francis.moro@gmail.com> wrote: > On Sun, Sep 14, 2008 at 10:27 PM, Chris F.A. Johnson > <cfajohnson@gmail.com> wrote: >> On 2008-09-14, Francis Moreau wrote: >>> no this paste the whole command line, I'm asking for the last _argument_ >> >> (defun last-arg () "" (interactive) >> (comint-previous-input 1) >> (search-backward " ") >> (kill-line) >> (comint-next-input 2) >> (yank) >> ) >> > > Even though I don't speak (yet) elisp, it does seem that if I call > last-arg() several times then this yanks always the same arg... > > Try in an xterm to use M-. to see what I'm talkng about. > Actually I'm wondering why not doing in M-x shell a char mode present in M-x term shell. I found it very convenient. -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-15 6:32 ` Francis Moreau 2008-09-15 10:35 ` Francis Moreau @ 2008-09-15 11:38 ` Thierry Volpiatto 2008-09-15 12:10 ` Francis Moreau 1 sibling, 1 reply; 42+ messages in thread From: Thierry Volpiatto @ 2008-09-15 11:38 UTC (permalink / raw) To: Francis Moreau; +Cc: cfajohnson, help-gnu-emacs "Francis Moreau" <francis.moro@gmail.com> writes: > On Sun, Sep 14, 2008 at 10:27 PM, Chris F.A. Johnson > <cfajohnson@gmail.com> wrote: >> On 2008-09-14, Francis Moreau wrote: >>> no this paste the whole command line, I'm asking for the last _argument_ >> >> (defun last-arg () "" (interactive) >> (comint-previous-input 1) >> (search-backward " ") >> (kill-line) >> (comint-next-input 2) >> (yank) >> ) >> > > Even though I don't speak (yet) elisp, it does seem that if I call > last-arg() several times then this yanks always the same arg... > > Try in an xterm to use M-. to see what I'm talkng about. May be what you are looking for... in M-x shell: ,---- | C-c . ==> comint-insert-previous-argument `---- and with ansi-term ==> the command M-. work it have the same behavior than in my urxvt -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-15 11:38 ` Thierry Volpiatto @ 2008-09-15 12:10 ` Francis Moreau 2008-09-15 13:00 ` Thierry Volpiatto 0 siblings, 1 reply; 42+ messages in thread From: Francis Moreau @ 2008-09-15 12:10 UTC (permalink / raw) To: Thierry Volpiatto; +Cc: cfajohnson, help-gnu-emacs On Mon, Sep 15, 2008 at 1:38 PM, Thierry Volpiatto <thierry.volpiatto@gmail.com> wrote: > "Francis Moreau" <francis.moro@gmail.com> writes: > >> On Sun, Sep 14, 2008 at 10:27 PM, Chris F.A. Johnson >> <cfajohnson@gmail.com> wrote: >>> On 2008-09-14, Francis Moreau wrote: >>>> no this paste the whole command line, I'm asking for the last _argument_ >>> >>> (defun last-arg () "" (interactive) >>> (comint-previous-input 1) >>> (search-backward " ") >>> (kill-line) >>> (comint-next-input 2) >>> (yank) >>> ) >>> >> >> Even though I don't speak (yet) elisp, it does seem that if I call >> last-arg() several times then this yanks always the same arg... >> >> Try in an xterm to use M-. to see what I'm talkng about. > > May be what you are looking for... > > in M-x shell: > ,---- > | C-c . ==> comint-insert-previous-argument > `---- > Damn yes it is ! While at it, do you have any idea if it's possible to switch between char/line mode in M-x shell ? Thanks -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-15 12:10 ` Francis Moreau @ 2008-09-15 13:00 ` Thierry Volpiatto 2008-09-15 13:13 ` Francis Moreau 0 siblings, 1 reply; 42+ messages in thread From: Thierry Volpiatto @ 2008-09-15 13:00 UTC (permalink / raw) To: Francis Moreau; +Cc: cfajohnson, help-gnu-emacs "Francis Moreau" <francis.moro@gmail.com> writes: > On Mon, Sep 15, 2008 at 1:38 PM, Thierry Volpiatto > <thierry.volpiatto@gmail.com> wrote: >> "Francis Moreau" <francis.moro@gmail.com> writes: >> >>> On Sun, Sep 14, 2008 at 10:27 PM, Chris F.A. Johnson >>> <cfajohnson@gmail.com> wrote: >>>> On 2008-09-14, Francis Moreau wrote: >>>>> no this paste the whole command line, I'm asking for the last _argument_ >>>> >>>> (defun last-arg () "" (interactive) >>>> (comint-previous-input 1) >>>> (search-backward " ") >>>> (kill-line) >>>> (comint-next-input 2) >>>> (yank) >>>> ) >>>> >>> >>> Even though I don't speak (yet) elisp, it does seem that if I call >>> last-arg() several times then this yanks always the same arg... >>> >>> Try in an xterm to use M-. to see what I'm talkng about. >> >> May be what you are looking for... >> >> in M-x shell: >> ,---- >> | C-c . ==> comint-insert-previous-argument >> `---- >> > > Damn yes it is ! > > While at it, do you have any idea if it's possible to switch between char/line > mode in M-x shell ? I don't know that, what is the equivalent in an xterm, and what is that for ? -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: What I'm missing when using M-x shell 2008-09-15 13:00 ` Thierry Volpiatto @ 2008-09-15 13:13 ` Francis Moreau 0 siblings, 0 replies; 42+ messages in thread From: Francis Moreau @ 2008-09-15 13:13 UTC (permalink / raw) To: Thierry Volpiatto; +Cc: cfajohnson, help-gnu-emacs On Mon, Sep 15, 2008 at 3:00 PM, Thierry Volpiatto <thierry.volpiatto@gmail.com> wrote: > "Francis Moreau" <francis.moro@gmail.com> writes: >> While at it, do you have any idea if it's possible to switch between char/line >> mode in M-x shell ? > > I don't know that, what is the equivalent in an xterm, and what is that > for ? > no it's part of M-x term. Basically all you type in char mode is sent to the terminal (except C-c). -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
* What I'm missing when using M-x shell @ 2008-09-12 16:20 Francis Moreau 0 siblings, 0 replies; 42+ messages in thread From: Francis Moreau @ 2008-09-12 16:20 UTC (permalink / raw) To: gnu-emacs-help Hello, I'm still trying to do all my jobs inside emacs but I'm missing a couple things. The first one is what I can't do anymore when working with a shell/terminal inside emacs. 1/ Most applications based on ncurse behave strangely when using M-x term 2/ Although M-x shell has history reference completions, it doesn't complete for '!#:<n>'. But '!!:<n>' works fine though. 3/ There's no readline "reverse-search-history" function (C-r) which does an _incremental_ search; 4/ There's no readline "yank-last-arg" function which inserts the last argument to the previous commands 5/ emacs doesn't expand shell variable when hitting <TAB> Am I missing something ? Thanks -- Francis ^ permalink raw reply [flat|nested] 42+ messages in thread
end of thread, other threads:[~2008-09-15 18:32 UTC | newest] Thread overview: 42+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <mailman.19125.1221236437.18990.help-gnu-emacs@gnu.org> 2008-09-12 17:34 ` What I'm missing when using M-x shell Dan Espen 2008-09-13 8:27 ` Francis Moreau 2008-09-15 7:32 ` Jonathan Groll 2008-09-15 8:42 ` Francis Moreau 2008-09-15 9:05 ` Francis Moreau [not found] ` <mailman.19169.1221294471.18990.help-gnu-emacs@gnu.org> 2008-09-13 15:42 ` Dan Espen 2008-09-13 16:43 ` Francis Moreau 2008-09-13 17:32 ` Thierry Volpiatto 2008-09-13 19:14 ` Francis Moreau 2008-09-13 19:50 ` Thierry Volpiatto 2008-09-14 4:02 ` Tim X 2008-09-12 17:59 ` Oleksandr Gavenko 2008-09-13 8:29 ` Francis Moreau [not found] ` <mailman.19170.1221294576.18990.help-gnu-emacs@gnu.org> 2008-09-15 18:32 ` Oleksandr Gavenko 2008-09-13 6:10 ` rustom 2008-09-13 8:36 ` Francis Moreau 2008-09-13 8:08 ` Livin Stephen 2008-09-13 9:00 ` Francis Moreau 2008-09-13 11:21 ` Livin Stephen Sharma 2008-09-13 14:27 ` Francis Moreau 2008-09-13 12:22 ` David Hansen 2008-09-14 2:20 ` Tim X 2008-09-15 7:56 ` Livin Stephen 2008-09-15 8:49 ` Francis Moreau 2008-09-13 22:43 ` Chris F.A. Johnson 2008-09-14 18:30 ` Francis Moreau 2008-09-14 18:40 ` Thierry Volpiatto [not found] ` <mailman.19222.1221417839.18990.help-gnu-emacs@gnu.org> 2008-09-14 18:55 ` Barry Margolin 2008-09-14 20:28 ` Francis Moreau 2008-09-14 20:41 ` Francis Moreau [not found] ` <mailman.19221.1221417026.18990.help-gnu-emacs@gnu.org> 2008-09-14 18:33 ` Chris F.A. Johnson 2008-09-14 18:50 ` Drew Adams 2008-09-14 20:01 ` Francis Moreau 2008-09-15 10:26 ` Bernardo Bacic [not found] ` <mailman.19228.1221422522.18990.help-gnu-emacs@gnu.org> 2008-09-14 20:27 ` Chris F.A. Johnson 2008-09-15 6:32 ` Francis Moreau 2008-09-15 10:35 ` Francis Moreau 2008-09-15 11:38 ` Thierry Volpiatto 2008-09-15 12:10 ` Francis Moreau 2008-09-15 13:00 ` Thierry Volpiatto 2008-09-15 13:13 ` Francis Moreau 2008-09-12 16:20 Francis Moreau
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.