Sorry Michael I missed your answer.

2015-02-11 10:32 GMT+01:00 Michael Albinus <[email protected]>:

> [email protected] writes:
>
> Hi Jeremy,
>
> > "PAGER=\"\"" sets PAGER to the string "\"\"" which means the variable
> > is set and the program that use the PAGER environment variable tries
> > to run a command named "\"\"" and fail, like git for instance.
> > However, if we unset the variable ("PAGER=") then the pager is
> > undefined and most of the program will fallback to their default
> > behavior : the use of the less or more command.
> >
> > To really disable paging we have to set PAGER to the cat command.
>
> Isn't this rather an error in vc-git.el, et al? The relevant function
> there is
>
> (defun vc-git--call (buffer command &rest args)
>   ;; We don't need to care the arguments.  If there is a file name, it
>   ;; is always a relative one.  This works also for remote
>   ;; directories.  We enable `inhibit-null-byte-detection', otherwise
>   ;; Tramp's eol conversion might be confused.
>   (let ((inhibit-null-byte-detection t)
>         (coding-system-for-read vc-git-commits-coding-system)
>         (coding-system-for-write vc-git-commits-coding-system)
>         (process-environment (cons "PAGER=" process-environment)))
>     (apply 'process-file vc-git-program nil buffer nil command args)))
>
It has nothing to do with vc git.  Over a tramp ssh buffer run the M-x shell
command.  And then echo $PAGER. you will have "" which is totally wrong.
Plus if you run a git log command from the sell it will fail because it
cannot
find the "" command ...

Thanks,

Jérémy


> As you see, PAGER is set (and overwrites Tramp settings). Such changed
> process-environment is taken into account since Tramp 2.2.11.
>
> Best regards, Michael.
>
_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to