nonsequitur/inf-ruby — pull request #39 by edslocomb (2013-11-16 22:13:02+00:00)
Title: fix PAGER setting

Setting PAGER to (executable-find "cat") does not work on my system (OSX 10.9/tmux 1.8/bash 3.2.51/emacs 24.3.1), for a rails 3.2.15 project using hirb 0.7.1 on the console. I have 'export PAGER="less"' in my .bashrc (which I use on systems running several different *NIX variants)

The error results from the console producing:

WARNING: terminal is not fully functional
- (press RETURN)

on any input; thus any attempt to pass anything to the console without an extra RETURN will hang.

*ANY* of the following in inf-ruby.el will result in this error:

(setenv "PAGER" "/bin/cat")
;; yes, /bin/cat *does* exist on the system...

(setenv "PAGER" (executable-find "cat"))
;; (executable-find "cat") evaluates to "/bin/cat"

(setenv "PAGER" nil)
;; which unsets PAGER

(setenv "PAGER")
;; which also unsets PAGER

The *only* PAGER setting I've been able to find that works is "cat".