elfeed icon indicating copy to clipboard operation
elfeed copied to clipboard

Line formatting when reading an entry

Open bmp opened this issue 1 year ago • 3 comments

Hello,

Line breaks and formatting seems to break when I open a window to read an entry in elfeed, here are two screenshots to explain what I mean.

  1. With two frames: Screenshot from 2023-09-05 13-56-09

  2. Here it is when it is the only frame, elfeed-read-entry

I have golden ratio enabled if that is useful information.

Thank you!

bmp avatar Sep 05 '23 08:09 bmp

You could try using an unfill function to reformat the text so it's on one line per paragraph, then let Emacs handle the line-wrapping. I use olivetti-mode to center the text in the buffer.

I have this which might be helpful:

(use-package unfill
  :straight t
  :config
  (defun jjh/unfill-buffer ()
    "Loop through all the paragraphs in this buffer and unfill them."
    (interactive)
    (goto-char (point-min))
    (while (not (eobp))
      (condition-case ex (unfill-paragraph)
        (error
         (message "Skipping Paragraph: %s" ex)))
      (forward-paragraph))))

johnhamelink avatar Sep 08 '23 16:09 johnhamelink

Thank you for this approach, I use writeroom-mode and tried olivetti for this and disabled golden-ratio too, but have the same problem!

bmp avatar Sep 11 '23 06:09 bmp

With Olivetti and Elfeed, refreshing Elfeed-show (with 'g') fixes the improper line-breaks (and incorrectly-sized, cut-off images). The following function does it automatically whenever you open an entry in Elfeed-show.

(defun elfeed-olivetti (buff)
  (switch-to-buffer buff)
  (olivetti-mode)
  (elfeed-show-refresh))
(setq elfeed-show-entry-switch 'elfeed-olivetti)

butter-radish avatar Nov 01 '23 07:11 butter-radish