Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line formatting when reading an entry #493

Open
bmp opened this issue Sep 5, 2023 · 3 comments
Open

Line formatting when reading an entry #493

bmp opened this issue Sep 5, 2023 · 3 comments

Comments

@bmp
Copy link

bmp commented Sep 5, 2023

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!

@johnhamelink
Copy link

johnhamelink commented Sep 8, 2023

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))))

@bmp
Copy link
Author

bmp commented Sep 11, 2023

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

@butter-radish
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants