The following sequence of commands shows that the number of columns in terminfo's database inside an Emacs shell buffer is not updated when the user decreases the size of the font with "C-x C--" (text-scale-adjust). It takes changing to anoter buffer and back for that to happen.

1. M-x shell                                   ;; Invoke a shell buffer
2. Issue shell command "tput cols"             ;; Query terminfo database for number of columns
3. Output: 168                                 ;; You may get something different depending on your setup
4. Press "C-x C--"                             ;; Decrease the default face height by one step
5. Issue shell command "tput cols" again
6. Output: 168                                 ;; Did not change but should have increased since text face has decreased
7. Press "C-x b RET"                           ;; Change to some other buffer
8. Press "C-x b RET" again                     ;; Change back to original *shell* buffer
9. Issue shell command "tput cols" for the 3rd time
10. Output: 192                                ;; The correct number of columns is finally shown

Thus, terminfo database was not updated when text face decreased, but it took a couple of buffer changes for that to happen.

GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23) of 2017-12-09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.