Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

git diff output - terminal is not fully functional

1,135 views
Skip to first unread message

Andreas Röhler

unread,
Aug 17, 2010, 6:10:41 AM8/17/10
to help-gn...@gnu.org
Hi,

with `git diff' from an shell inside Emacs,
output stops at every diff-line,
reporting its line.

Also I get a

"WARNING: terminal is not fully functional

Assume it's a common known issue...

BTW from bazaar diff runs smoothly...

What to do?

Thanks

Andreas

Andrea Crotti

unread,
Aug 17, 2010, 7:55:20 AM8/17/10
to help-gn...@gnu.org
Andreas Röhler <andreas...@online.de> writes:

Well you probably don't want to use git diff in a shell, there are many
external packages that does it much better (for example magit).

The "problem" is that git diff calls a pager (less probably) and the
shell in emacs is not a full terminal emulator.

There is also M-x term which is closer, but it doesn't make so much
sense in my opinion..


Andreas Röhler

unread,
Aug 17, 2010, 8:59:17 AM8/17/10
to help-gn...@gnu.org
Am 17.08.2010 13:55, schrieb Andrea Crotti:
> Andreas Röhler<andreas...@online.de> writes:
>
>> Hi,
>>
>> with `git diff' from an shell inside Emacs,
>> output stops at every diff-line,
>> reporting its line.
>>
>> Also I get a
>>
>> "WARNING: terminal is not fully functional
>>
>> Assume it's a common known issue...
>>
>> BTW from bazaar diff runs smoothly...
>>
>> What to do?
>>
>> Thanks
>>
>> Andreas
>
> Well you probably don't want to use git diff in a shell, there are many
> external packages that does it much better (for example magit).

Hi,

thanks and sorry,
just want to use it in a shell:

while exploring something new or not so common, I'll not run into bugs
from emacs-scripts, have all feature indendent from implementation etc.

Also I use shell-scripts, which might be started from inside Emacs more
conveniently again.

I'll have look at magit anyway, thanks for the tip.

>
> The "problem" is that git diff calls a pager (less probably) and the
> shell in emacs is not a full terminal emulator.
>
> There is also M-x term which is closer, but it doesn't make so much
> sense in my opinion..
>
>
>

Wonder why bazaar is able to cope with this. There should be a way to
provide this for git too.

Andreas

Erik Iverson

unread,
Aug 17, 2010, 10:00:30 AM8/17/10
to Andreas Röhler, help-gn...@gnu.org
On 08/17/2010 07:59 AM, Andreas Röhler wrote:
> Am 17.08.2010 13:55, schrieb Andrea Crotti:
>> Andreas Röhler<andreas...@online.de> writes:
>>
>>> Hi,
>>>
>>> with `git diff' from an shell inside Emacs,
>>> output stops at every diff-line,
>>> reporting its line.
>>>
>>> Also I get a
>>>
>>> "WARNING: terminal is not fully functional
>>>
>>> Assume it's a common known issue...
>>>
>>> BTW from bazaar diff runs smoothly...
>>>
>>> What to do?
>>>

Just do:

git-config --global core.pager ""


Andrea Crotti

unread,
Aug 17, 2010, 10:13:07 AM8/17/10
to help-gn...@gnu.org
Andreas Röhler <andreas...@easy-emacs.de> writes:

>
> Hi,
>
> thanks and sorry,
> just want to use it in a shell:
>
> while exploring something new or not so common, I'll not run into bugs
> from emacs-scripts, have all feature indendent from implementation
> etc.
>
> Also I use shell-scripts, which might be started from inside Emacs
> more conveniently again.
>
> I'll have look at magit anyway, thanks for the tip.
>

Yes sure I'm not saying it's bad to use a terminal in emacs, just saying
that for this tasks there are much better instruments..

I normally have many shells open outside of emacs, mostly because to
compile I use M-x compile and when I have to launch a short command I
just use M-!, which is much faster then going in the shell...

> Wonder why bazaar is able to cope with this. There should be a way to
> provide this for git too.
>
> Andreas

Strange that I didn't find any option in git diff to disable the
automatic "paging", but it should be possible...


Andreas Röhler

unread,
Aug 17, 2010, 12:25:45 PM8/17/10
to help-gn...@gnu.org

Thanks,

unfortunatly it has no effect.
Also editing file config in .git fails.
While setting is recognised by --list

:(

Erik Iverson

unread,
Aug 17, 2010, 12:36:31 PM8/17/10
to Andreas Röhler, help-gn...@gnu.org

>>>>> with `git diff' from an shell inside Emacs,
>>>>> output stops at every diff-line,
>>>>> reporting its line.
>>>>>
>>>>> Also I get a
>>>>>
>>>>> "WARNING: terminal is not fully functional
>>
>> git-config --global core.pager ""
>>
>>

> unfortunatly it has no effect.
> Also editing file config in .git fails.
> While setting is recognised by --list

Well it definitely works for me, so something
else must be going on. What does your global
~/.gitconfig look like?

Mine is :

[user]
name = Erik Iverson
email = us...@email.com
[core]
editor = emacs
pager =

Which version of git are you running?

Andreas Röhler

unread,
Aug 17, 2010, 12:49:08 PM8/17/10
to help-gn...@gnu.org

git version 1.5.2.4

See three config-files

.gitconfig in ~/

config in ~/.git

config in ~/org-mode/.git


Contents in this order:

[user]
name = Andreas Roehler
email = andreas...@online.de
[core]

pager =

;;;;;;;;


[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true

;;;;;;;

[core]
bare = false
filemode = true
logallrefupdates = true
repositoryformatversion = 0
whitespace = false
[remote "origin"]
url = git://repo.or.cz/org-mode.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master

;;;;;;,

BTW whitespace = false has been added in these essay today, has no
visible effect so far.

Thanks

Andreas

Erik Iverson

unread,
Aug 17, 2010, 12:54:21 PM8/17/10
to Andreas Röhler, help-gn...@gnu.org

Andreas Röhler wrote:
> Am 17.08.2010 18:36, schrieb Erik Iverson:
>>
>>>>>>> with `git diff' from an shell inside Emacs,
>>>>>>> output stops at every diff-line,
>>>>>>> reporting its line.
>>>>>>>
>>>>>>> Also I get a
>>>>>>>
>>>>>>> "WARNING: terminal is not fully functional
>>>>
>>>> git-config --global core.pager ""
>>>>
>>>>
>>
>>> unfortunatly it has no effect.
>>> Also editing file config in .git fails.
>>> While setting is recognised by --list
>>
>> Well it definitely works for me, so something
>> else must be going on. What does your global
>> ~/.gitconfig look like?
>>
>> Mine is :
>>
>> [user]
>> name = Erik Iverson
>> email = us...@email.com
>> [core]
>> editor = emacs
>> pager =
>>
>> Which version of git are you running?
>>
>
> git version 1.5.2.4

I'm using git version 1.7.1, could very well be the difference?

Andreas Röhler

unread,
Aug 17, 2010, 1:21:19 PM8/17/10
to help-gn...@gnu.org

Hmm, maybe.

For the moment

git diff | tee

solves it...

Thanks all commenting

Andreas

--
https://code.launchpad.net/~a-roehler/python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/


Kevin Rodgers

unread,
Aug 18, 2010, 10:54:40 AM8/18/10
to help-gn...@gnu.org
Erik Iverson wrote:
> On 08/17/2010 07:59 AM, Andreas Röhler wrote:
>> Am 17.08.2010 13:55, schrieb Andrea Crotti:
>>> Andreas Röhler<andreas...@online.de> writes:
>>>
>>>> Hi,
>>>>
>>>> with `git diff' from an shell inside Emacs,
>>>> output stops at every diff-line,
>>>> reporting its line.
>>>>
>>>> Also I get a
>>>>
>>>> "WARNING: terminal is not fully functional
>>>>
>>>> Assume it's a common known issue...
>>>>
>>>> BTW from bazaar diff runs smoothly...
>>>>
>>>> What to do?
>>>>
>
> Just do:
>
> git-config --global core.pager ""

Andreas' problem seems to be caused by the terminal emulation provided
by Emacs' shell.

In any case, rather than configuring each tool, you can set the PAGER
environment variable for your shell when it's run under Emacs in the
~/.emacs_SHELLNAME file. I use PAGER=cat.

--
Kevin Rodgers
Denver, Colorado, USA


Andreas Röhler

unread,
Aug 18, 2010, 11:58:32 AM8/18/10
to help-gn...@gnu.org

Thats it, thanks!

Andreas

0 new messages