On 2014-12-17 Wed 07:32, Eli Zaretskii wrote: >> In term.el, I found a function that does what I want >> (`term-window-width') but requiring term.el only to use this >> function seems inappropriate. Duplicating this function is not >> perfect either. > > That function is in term.el because term.el is its only user. We > might consider moving it to a more general place, but please describe > the use case where you needed it. I'm the author of a number of extensions for Helm (helm-bibtex, helm-dictionary, helm-mu). These extensions display the results of a search in the form of tables. See here for an example: https://github.com/tmalsburg/helm-bibtex/raw/master/screenshot.png I want to use the full number of available columns for displaying data but avoid line breaks at all cost because they would mess up the table layout. That's why I need a robust way to determine the maximal number of characters that I can put on a line. `term-window-width' is better at doing that then `window-width' because it corrects (window-width) in a number of special cases. (It's not perfect, though, because like `window-width' it ignores the size of the font in the window and pretends the window is using the default size.) Titus