{"thread":{"id":"7353","subject":"emacs and git...","startedAt":"2007-03-22T14:53:26Z","lastAt":"2007-03-24T15:12:02Z","messageCount":17,"participants":["Francis Moreau","Matthieu Moy","Randal L. Schwartz","Bernt Hansen","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"37737","messageId":"38b2ab8a0703220753s67809e87l76ffc57adb725898@mail.gmail.com","threadId":"7353","inReplyTo":null,"subject":"emacs and git...","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2007-03-22T14:53:26Z","receivedAt":"2007-03-22T14:53:26Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"Hi,\n\nI guess it's a dumb...\n\nI know that some of you work within emacs. I tried to use git iniside\na emacs shell (M-x shell) and had a weid behaviour:\n\n$ git diff\nWARNING: terminal is not fully functional\n-  (press RETURN)\ndiff --git a/.lde/bin/cmd-version b/.lde/bin/cmd-version\u001b[m\nindex a6ce3f8..687112d 100755\u001b[m\n--- a/.lde/bin/cmd-version\u001b[m\n+++ b/.lde/bin/cmd-version\u001b[m\n@@ -54,7 +54,7 @@ gdb_version () {\u001b[m\n[snip]\n\nI'm not using diff color option.\n\nCan anybody shed some light ?\n\nthanks\n-- \nFrancis\n"},{"id":"37738","messageId":"vpqr6rhwa4s.fsf@olympe.imag.fr","threadId":"7353","inReplyTo":"38b2ab8a0703220753s67809e87l76ffc57adb725898@mail.gmail.com","subject":"Re: emacs and git...","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2007-03-22T15:50:11Z","receivedAt":"2007-03-22T15:50:11Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"\"Francis Moreau\" <francis.moro@gmail.com> writes:\n\n> Hi,\n>\n> I guess it's a dumb...\n>\n> I know that some of you work within emacs. I tried to use git iniside\n> a emacs shell (M-x shell) and had a weid behaviour:\n\nDVC has an embryo of a git mode (development not active at the\nmoment).\n\n  http://download.gna.org/dvc/\n\nThere's also a git.el which I didn't try yet.\n\n-- \nMatthieu\n"},{"id":"37739","messageId":"86lkhpmftt.fsf@blue.stonehenge.com","threadId":"7353","inReplyTo":"38b2ab8a0703220753s67809e87l76ffc57adb725898@mail.gmail.com","subject":"Re: emacs and git...","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2007-03-22T15:57:18Z","receivedAt":"2007-03-22T15:57:18Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Francis\" == Francis Moreau <francis.moro@gmail.com> writes:\n\nFrancis> Hi,\nFrancis> I guess it's a dumb...\n\nFrancis> I know that some of you work within emacs. I tried to use git iniside\nFrancis> a emacs shell (M-x shell) and had a weid behaviour:\n\nFrancis> $ git diff\nFrancis> WARNING: terminal is not fully functional\nFrancis> -  (press RETURN)\nFrancis> diff --git a/.lde/bin/cmd-version b/.lde/bin/cmd-version.[m\nFrancis> index a6ce3f8..687112d 100755.[m\nFrancis> --- a/.lde/bin/cmd-version.[m\nFrancis> +++ b/.lde/bin/cmd-version.[m\nFrancis> @@ -54,7 +54,7 @@ gdb_version () {.[m\nFrancis> [snip]\n\nFrancis> I'm not using diff color option.\n\nFrancis> Can anybody shed some light ?\n\nI use M-x shell on a regular basis, and have learned to add the following\nthree items to my .emacs wherever I'm at:\n\n  (setenv \"PAGER\" \"/bin/cat\")\n  (setenv \"EDITOR\" \"/opt/emacs/bin/emacsclient\") ; `which emacsclient`\n  (server-start)\n\nUnless you do the first line, programs that like to push things through \"less\"\nor \"more\" do some pretty nasty things.  And those last two are nice, because\nyou can use \"git-commit\" directly in the shell window, and it'll pop up an\nemacs buffer.  Read up on emacs-server mode or you won't know how to get out\nof it though. :)\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"37751","messageId":"878xdp9owo.fsf@gollum.intra.norang.ca","threadId":"7353","inReplyTo":"86lkhpmftt.fsf@blue.stonehenge.com","subject":"Re: emacs and git...","fromName":"Bernt Hansen","fromEmail":"bernt@norang.ca","sentAt":"2007-03-22T17:19:35Z","receivedAt":"2007-03-22T17:19:35Z","isPatch":false,"sender":{"key":"bernt@norang.ca","avatar":null},"body":"I use M-x term instead of shell mode to interact with git.  That works\nfine for me.\n\nC-c C-j and C-c C-k switches between line and character mode so the\nregular emacs control sequences are not sent directly to the term\nsession.\n \n-Bernt\n"},{"id":"37784","messageId":"38b2ab8a0703230026r41e9431an362d14fdabb8b9d@mail.gmail.com","threadId":"7353","inReplyTo":"878xdp9owo.fsf@gollum.intra.norang.ca","subject":"Re: emacs and git...","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2007-03-23T07:26:09Z","receivedAt":"2007-03-23T07:26:09Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"On 3/22/07, Bernt Hansen <bernt@norang.ca> wrote:\n> I use M-x term instead of shell mode to interact with git.  That works\n> fine for me.\n>\n\nyes that works for me too but I'm wondering why it doesn't for shell mode...\n\nthanks\n-- \nFrancis\n"},{"id":"37785","messageId":"38b2ab8a0703230029h7f3faa95u1e2ccb6a9ee4be5e@mail.gmail.com","threadId":"7353","inReplyTo":"86lkhpmftt.fsf@blue.stonehenge.com","subject":"Re: emacs and git...","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2007-03-23T07:29:17Z","receivedAt":"2007-03-23T07:29:17Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"On 3/22/07, Randal L. Schwartz <merlyn@stonehenge.com> wrote:\n>\n> I use M-x shell on a regular basis, and have learned to add the following\n> three items to my .emacs wherever I'm at:\n>\n>   (setenv \"PAGER\" \"/bin/cat\")\n>   (setenv \"EDITOR\" \"/opt/emacs/bin/emacsclient\") ; `which emacsclient`\n>   (server-start)\n>\n> Unless you do the first line, programs that like to push things through \"less\"\n> or \"more\" do some pretty nasty things.\n\nthe funny thing is that the following command in emacs' shell actually\ndo nothing.\n\n$ PAGE=cat git diff HEAD^\n$\n\n>  And those last two are nice, because\n> you can use \"git-commit\" directly in the shell window, and it'll pop up an\n> emacs buffer.  Read up on emacs-server mode or you won't know how to get out\n> of it though. :)\n>\n\nyep I already do that.\n\n-- \nFrancis\n"},{"id":"37786","messageId":"864poch0xl.fsf@blue.stonehenge.com","threadId":"7353","inReplyTo":"38b2ab8a0703230029h7f3faa95u1e2ccb6a9ee4be5e@mail.gmail.com","subject":"Re: emacs and git...","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2007-03-23T07:30:14Z","receivedAt":"2007-03-23T07:30:14Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Francis\" == Francis Moreau <francis.moro@gmail.com> writes:\n\nFrancis> $ PAGE=cat git diff HEAD^\n\nPAGE?  or PAGER?\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"37791","messageId":"38b2ab8a0703230132j64cf0b94x7c210593f3f31387@mail.gmail.com","threadId":"7353","inReplyTo":"864poch0xl.fsf@blue.stonehenge.com","subject":"Re: emacs and git...","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2007-03-23T08:32:50Z","receivedAt":"2007-03-23T08:32:50Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"On 3/23/07, Randal L. Schwartz <merlyn@stonehenge.com> wrote:\n> >>>>> \"Francis\" == Francis Moreau <francis.moro@gmail.com> writes:\n>\n> Francis> $ PAGE=cat git diff HEAD^\n>\n> PAGE?  or PAGER?\n>\n\nPAGER\n\nBut I actually know it doesn't print anything, because I put 'HEAD'\ninstead of 'HEAD^', sorry for the wrong alert.\n\nCan't git make 'cat' the default pager when run on a dumb terminal ?\n\nthanks\n-- \nFrancis\n"},{"id":"37792","messageId":"7vtzwcqqf9.fsf@assigned-by-dhcp.cox.net","threadId":"7353","inReplyTo":"38b2ab8a0703230132j64cf0b94x7c210593f3f31387@mail.gmail.com","subject":"Re: emacs and git...","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-23T09:07:06Z","receivedAt":"2007-03-23T09:07:06Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Francis Moreau\" <francis.moro@gmail.com> writes:\n\n> Can't git make 'cat' the default pager when run on a dumb terminal ?\n\nIIRC, `more` works on a dumb terminal.\n\nBut using PAGER=cat is a longstanding and widely used trick\namong Emacs old timers, predating the EDITOR=emacsclient, which\nis even nicer.  I would highly recommend it.  These two\nenvironment variables make running *everything* in compilation\nmode (or shell buffer) so much nicer than otherwise.\n"},{"id":"37800","messageId":"38b2ab8a0703230254x585ff89fp3e425b08cac56900@mail.gmail.com","threadId":"7353","inReplyTo":"7vtzwcqqf9.fsf@assigned-by-dhcp.cox.net","subject":"Re: emacs and git...","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2007-03-23T09:54:51Z","receivedAt":"2007-03-23T09:54:51Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"On 3/23/07, Junio C Hamano <junkio@cox.net> wrote:\n> \"Francis Moreau\" <francis.moro@gmail.com> writes:\n>\n> > Can't git make 'cat' the default pager when run on a dumb terminal ?\n>\n> IIRC, `more` works on a dumb terminal.\n>\n\nyes it does although the behaviour is a bit weird. Not all screen is used.\n\n> But using PAGER=cat is a longstanding and widely used trick\n> among Emacs old timers, predating the EDITOR=emacsclient, which\n> is even nicer.  I would highly recommend it.  These two\n> environment variables make running *everything* in compilation\n> mode (or shell buffer) so much nicer than otherwise.\n>\n\nI think I'm going to give a try PAGER=more and EDITOR=emacsclient\nconfig with shell buffer and see if it can fit well my git usage.\n\nI tried to use term mode but it's pretty annoying to switch between\n'line' and 'char' mode all the time.\n\nBTW Junio, just out of curiosity, do you use shell or term mode ?\n-- \nFrancis\n"},{"id":"37801","messageId":"38b2ab8a0703230256l5be8a558oe1daa6c5cd2ea16f@mail.gmail.com","threadId":"7353","inReplyTo":"7vtzwcqqf9.fsf@assigned-by-dhcp.cox.net","subject":"Re: emacs and git...","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2007-03-23T09:56:20Z","receivedAt":"2007-03-23T09:56:20Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"On 3/23/07, Junio C Hamano <junkio@cox.net> wrote:\n> \"Francis Moreau\" <francis.moro@gmail.com> writes:\n>\n> > Can't git make 'cat' the default pager when run on a dumb terminal ?\n>\n> IIRC, `more` works on a dumb terminal.\n>\n\nBTW why not making 'more' the default on a dumb term instead of 'less' ?\n-- \nFrancis\n"},{"id":"37802","messageId":"7vaby4qnhk.fsf@assigned-by-dhcp.cox.net","threadId":"7353","inReplyTo":"38b2ab8a0703230254x585ff89fp3e425b08cac56900@mail.gmail.com","subject":"Re: emacs and git...","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-23T10:10:31Z","receivedAt":"2007-03-23T10:10:31Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Francis Moreau\" <francis.moro@gmail.com> writes:\n\n> BTW Junio, just out of curiosity, do you use shell or term mode ?\n\nNeither.  Almost all of my external command session inside Emacs\nis done in compilation mode.  I even bind \"C-x c\" to \"compile\".\n"},{"id":"37829","messageId":"38b2ab8a0703231029m4b010686t4428158013b4acbc@mail.gmail.com","threadId":"7353","inReplyTo":"7vaby4qnhk.fsf@assigned-by-dhcp.cox.net","subject":"Re: emacs and git...","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2007-03-23T17:29:48Z","receivedAt":"2007-03-23T17:29:48Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"On 3/23/07, Junio C Hamano <junkio@cox.net> wrote:\n> \"Francis Moreau\" <francis.moro@gmail.com> writes:\n>\n> > BTW Junio, just out of curiosity, do you use shell or term mode ?\n>\n> Neither.  Almost all of my external command session inside Emacs\n> is done in compilation mode.  I even bind \"C-x c\" to \"compile\".\n>\n\nhm do you also run all git commands in this mode ??\n-- \nFrancis\n"},{"id":"37868","messageId":"7v1wjfm0d8.fsf@assigned-by-dhcp.cox.net","threadId":"7353","inReplyTo":"38b2ab8a0703231029m4b010686t4428158013b4acbc@mail.gmail.com","subject":"Re: emacs and git...","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-24T09:55:47Z","receivedAt":"2007-03-24T09:55:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Francis Moreau\" <francis.moro@gmail.com> writes:\n\n> On 3/23/07, Junio C Hamano <junkio@cox.net> wrote:\n>> \"Francis Moreau\" <francis.moro@gmail.com> writes:\n>>\n>> > BTW Junio, just out of curiosity, do you use shell or term mode ?\n>>\n>> Neither.  Almost all of my external command session inside Emacs\n>> is done in compilation mode.  I even bind \"C-x c\" to \"compile\".\n>>\n>\n> hm do you also run all git commands in this mode ??\n\nWhich ones do you specifically have in mind to have trouble\nwith?\n"},{"id":"37869","messageId":"7vwt17kls8.fsf@assigned-by-dhcp.cox.net","threadId":"7353","inReplyTo":"38b2ab8a0703230256l5be8a558oe1daa6c5cd2ea16f@mail.gmail.com","subject":"Re: emacs and git...","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-24T09:56:07Z","receivedAt":"2007-03-24T09:56:07Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Francis Moreau\" <francis.moro@gmail.com> writes:\n\n> On 3/23/07, Junio C Hamano <junkio@cox.net> wrote:\n>> \"Francis Moreau\" <francis.moro@gmail.com> writes:\n>>\n>> > Can't git make 'cat' the default pager when run on a dumb terminal ?\n>>\n>> IIRC, `more` works on a dumb terminal.\n>\n> BTW why not making 'more' the default on a dumb term instead of 'less' ?\n\nIsn't that so 80'ish?\n"},{"id":"37882","messageId":"38b2ab8a0703240810t5f607d9dwf51cdf4896bdc5b3@mail.gmail.com","threadId":"7353","inReplyTo":"7v1wjfm0d8.fsf@assigned-by-dhcp.cox.net","subject":"Re: emacs and git...","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2007-03-24T15:10:20Z","receivedAt":"2007-03-24T15:10:20Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"On 3/24/07, Junio C Hamano <junkio@cox.net> wrote:\n> \"Francis Moreau\" <francis.moro@gmail.com> writes:\n> > hm do you also run all git commands in this mode ??\n>\n> Which ones do you specifically have in mind to have trouble\n> with?\n>\n\nwell none in peculiar (since I now use PAGER=more), I'm just suprised\nyou're using compilation mode for all your commands.\n\nthanks\n-- \nFrancis\n"},{"id":"37883","messageId":"38b2ab8a0703240812g9c6ad73p960684c13545af74@mail.gmail.com","threadId":"7353","inReplyTo":"7vwt17kls8.fsf@assigned-by-dhcp.cox.net","subject":"Re: emacs and git...","fromName":"Francis Moreau","fromEmail":"francis.moro@gmail.com","sentAt":"2007-03-24T15:12:02Z","receivedAt":"2007-03-24T15:12:02Z","isPatch":false,"sender":{"key":"francis.moro@gmail.com","avatar":null},"body":"On 3/24/07, Junio C Hamano <junkio@cox.net> wrote:\n> \"Francis Moreau\" <francis.moro@gmail.com> writes:\n>\n> > On 3/23/07, Junio C Hamano <junkio@cox.net> wrote:\n> >> \"Francis Moreau\" <francis.moro@gmail.com> writes:\n> >>\n> >> > Can't git make 'cat' the default pager when run on a dumb terminal ?\n> >>\n> >> IIRC, `more` works on a dumb terminal.\n> >\n> > BTW why not making 'more' the default on a dumb term instead of 'less' ?\n>\n> Isn't that so 80'ish?\n>\n>\n\nIt simply avoids this kind of output when running `git-diff` from\nshell mode for example:\n\n+\u001b[m\n+Basic bisect commands: start, bad, good\u001b[m\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[m\n \u001b[m\n The way you use it is:\u001b[m\n \u001b[m\n ------------------------------------------------\u001b[m\n $ git bisect start\u001b[m\n-$ git bisect bad                       # Current version is bad\u001b[m\n-$ git bisect good v2.6.13-rc2          # v2.6.13-rc2 was the last version\u001b[m\n-                                       # tested that was good\u001b[m\n+$ git bisect bad                 # Current version is bad\u001b[m\n+$ git bisect good v2.6.13-rc2    # v2.6.13-rc2 was the last version\u001b[m\n+                                 # tested that was good\u001b[m\n ------------------------------------------------\u001b[m\n \u001b[m\n-When you give at least one bad and one good versions, it will\u001b[m\n-bisect the revision tree and say something like:\u001b[m\n+When you give at least one bad and one good versions, it will bisect\u001b[m\n+the revision tree and say something like:\u001b[m\n \u001b[m\n-- \nFrancis\n"}]}