#3837: [PATCH] Add width expando for external filters
--------------------------+----------------------
  Reporter:  flatcap      |      Owner:  mutt-dev
      Type:  enhancement  |     Status:  new
  Priority:  minor        |  Milestone:
 Component:  display      |    Version:  1.6.0
Resolution:               |   Keywords:  patch
--------------------------+----------------------

Comment (by kevin8t8):

 dgc wrote:
 > The filter should still have a controlling tty even if it's not on
 > stdin.  {{{tput cols </dev/tty}}} ?

 I'm not very knowledgeably about this area, so please feel free to add
 your input if you have some time.

 I'm guessing this patch may have been brought on because of the sidebar
 patch.  In that case, if the filter correctly figured out cols, it would
 be wider than the actual width of the pager.  But I'm just guessing.

 flatcap wrote:
 > Sorry, this isn't helpful.
 >
 > *You* need to make the decision.
 >
 > Pick the solution that you're prepared to merge,
 > and I'll change the patch.

 I need to play around some to know the right decision.  (And if I have to
 do that myself, I might as well just write the patch myself.)

 My concern is whether setting COLUMNS allows the autoviewers to change
 output width by themselves, without needing any adjustment in the mailcap
 file.  If so, then there is some merit to using that environment variable
 and we could try doing it tightly around the filter call.

 If not, and the mailcap file has to be changed manually to check for an
 environment variable, then it may be easier to just globally set a
 different environment variable (e.g. MUTT_PAGER_COLS) inside
 mutt_reflow_windows().  We can't do that with COLUMNS because that
 variable has an effect on ncurses itself and can goof mutt up, along with
 other external attachment viewers.

--
Ticket URL: <https://dev.mutt.org/trac/ticket/3837#comment:9>
Mutt <http://www.mutt.org/>
The Mutt mail user agent

Reply via email to