[neomutt-devel] Feature: Compose Preview Message

Ismael Bouya ismael at bouya.org
Mon Dec 2 17:58:10 CET 2024


Thanks, it’s a nice feature!

I made some tests with it, most of what seems lacking is already mentionned
as "later" in the PR, so no need to repeat. Two points:
- (cosmetic) The attachment section starts with
  "-- Attachments" (one space)
  while the "preview" section starts with
  "--Preview" (no space)

- The preview is not "the message", but whatever is "first" in the list
  of attachment items (usually the message, true). If you move around
  the attachments in the list, it doesn’t refresh immediately. But if
  you switch screen (by pressing "?" followed by "q" for instance) then
  the preview will refresh.
  Could maybe "the first inline attachment" be shown? Or "the file
  currently highlighted in the attachments list"?
  Not sure what’s the best option here, a pdf preview for instance looks
  kind of garbage :p

  Maybe the best option would be to show whatever the pager shows in
  normal conditions? (is that feasible?) So a PDF preview would look
  like

  [-- Attachment #2: Blabla.pdf --]
  [-- Type: application/pdf, Encoding: base64, Size: 133K --]

  (whatever your mailcap shows)

  And maybe we could gain a better preview (with colors and wrapping)
  for free just with that?

(Mon, Dec 02, 2024 at 04:31:40PM +0000) Richard Russon :
> Hi Devs!
> 
> I've just merged a new feature, written by Dennis Schön (@roccoblues).
> 
>     #4437 - Show message preview in compose view 
>     https://github.com/neomutt/neomutt/pull/4437
> 
> Many thanks!
> 
> This is a new feature and it's still under development.
> If you find any problems, or you'd like to help improve it, please let us know.
> 
> Note: It's enabled by default, but will be disabled for release.
> 
> FlatCap / Rich
> 
> ---
> 
> NeoMutt shows you a preview of the message you are about to send in the Compose Dialog.
> 
> New Config:
> 
> # Show the message preview above the attachments list.
> # By default it is shown below it.
> set compose_preview_above_attachments = no
> 
> # Hide the preview if it has fewer than this number of rows
> set compose_preview_min_rows = 5
> 
> # Display a preview of the message body in the Compose window
> set compose_show_preview = yes
> 
> New Compose Functions:
> 
> - <preview-page-down> (default binding: <PageDown>)
> - <preview-page-up>   (default binding: <PageUp>)
> 
> Limitations:
> 
> - Pager displays simple text, no colour or attributes
> - Text wrapping is not supported



-- 
Ismael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mailman.neomutt.org/pipermail/neomutt-devel-neomutt.org/attachments/20241202/aafd8479/attachment.sig>


More information about the neomutt-devel mailing list