git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: emacs and git...

From
Randal L. Schwartz <merlyn@stonehenge.com>
Date
Mar 22, 2007, 15:57 UTC
Message-ID
<86lkhpmftt.fsf@blue.stonehenge.com>
In-Reply-To
<38b2ab8a0703220753s67809e87l76ffc57adb725898@mail.gmail.com>
>>>>> "Francis" == Francis Moreau <francis.moro@gmail.com> writes:

Francis> Hi, Francis> I guess it's a dumb...

Francis> I know that some of you work within emacs. I tried to use git iniside Francis> a emacs shell (M-x shell) and had a weid behaviour:

Francis> $ git diff Francis> WARNING: terminal is not fully functional Francis> - (press RETURN) Francis> diff --git a/.lde/bin/cmd-version b/.lde/bin/cmd-version.[m Francis> index a6ce3f8..687112d 100755.[m Francis> --- a/.lde/bin/cmd-version.[m Francis> +++ b/.lde/bin/cmd-version.[m Francis> @@ -54,7 +54,7 @@ gdb_version () {.[m Francis> [snip]

Francis> I'm not using diff color option.
Francis> Can anybody shed some light ?

I use M-x shell on a regular basis, and have learned to add the following three items to my .emacs wherever I'm at:

  (setenv "PAGER" "/bin/cat")
  (setenv "EDITOR" "/opt/emacs/bin/emacsclient") ; `which emacsclient`
  (server-start)

Unless you do the first line, programs that like to push things through "less" or "more" do some pretty nasty things. And those last two are nice, because you can use "git-commit" directly in the shell window, and it'll pop up an emacs buffer. Read up on emacs-server mode or you won't know how to get out of it though. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Previous: Matthieu MoyNext: Bernt Hansen
Message 3 of 17 in “emacs and git...”
  1. Francis MoreauMar 22, 2007
  2. Matthieu MoyMar 22, 2007
  3. Randal L. SchwartzMar 22, 2007
  4. Bernt HansenMar 22, 2007
  5. Francis MoreauMar 23, 2007
  6. Francis MoreauMar 23, 2007
  7. Randal L. SchwartzMar 23, 2007
  8. Francis MoreauMar 23, 2007
  9. Junio C HamanoMar 23, 2007
  10. Francis MoreauMar 23, 2007
  11. Junio C HamanoMar 23, 2007
  12. Francis MoreauMar 23, 2007
  13. Junio C HamanoMar 24, 2007
  14. Francis MoreauMar 24, 2007
  15. Francis MoreauMar 23, 2007
  16. Junio C HamanoMar 24, 2007
  17. Francis MoreauMar 24, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.