[patches against bzr master attached (hopefully!)] hi, i believe this is a bug in comint-read-input-ring. shell-mode sets a buffer-local version of comint-read-input-size which is effectively ignored due to comint-read-input-ring's use of '(with-temp-buffer ...' . i've lost ~40000 line bash history on more than one occasion over the last several years and am elated to have finally pinned the problem on something (very loosely) related to this issue is the question of why the default of 'comint-input-history-ignore' is set to anything at all? it's currently "^#", and therefore without having pro-actively made any changes to their emacs setup, a user's shell history (for instance) doesn't emerge unscathed from a trip through comint if it contains comments. if modifying this default touches too many other comint uses, perhaps an override in shell-mode.el? cheers, Pete