tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] disable paging with PAGER=cat


From: Michael Albinus
Subject: Re: [PATCH] disable paging with PAGER=cat
Date: Wed, 11 Feb 2015 10:32:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

address@hidden 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)))

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]