reddit / emacs

Help GNUS show article fullscreen

ottertino415 · 2022-02-16 21:44
I'm trying to get GNUS to show article fullscreen after select on summary screen. I found out about gnus-buffer-configuration variable where is configuration of how screen should by displayed. I also found gnus-add-configuration function to modify. I tried to set article settings to: (article (vertical 1.0 (article 1.0 point))) But when I try to open article I get gnus-summary-show-thread: Args out of range: 0 and empty buffer is open in fullscreen. I also tried without point: (article (vertical 1.0 (article 1.0))) since I got same error when I tried to reset to default and I forgot to delete points from behind the article: (gnus-add-configuration '(article (vertical 1.0 (summary 0.25 point) (article 1.0 point)))) I also tried to get (summary 0) but that was some other error and I thing it also does not make much sense. Anybody tried similar thing? How to setup GNUS to open article fullscreen? EDIT: I tried to debug gnus a little bit and I find out that responsible function for shoving thread is gnus-summary-show-thread, but can't understand what exactly it is doing, from mi point of view I see only some tinkering with cursor position and something called overlays: (defun gnus-summary-show-thread () "Show thread subtrees. Returns nil if no thread was there to be shown." (interactive nil gnus-summary-mode) (let* ((orig (point)) (end (point-at-eol)) (end (or (gnus-summary--inv end) (gnus-summary--inv (1- end)))) ;; Leave point at bol (beg (progn (beginning-of-line) (if (bobp) (point) (1- (point))))) (eoi (and end (next-single-char-property-change end 'invisible)))) (when eoi (remove-overlays beg eoi 'invisible 'gnus-sum) (goto-char orig) (gnus-summary-position-point) eoi)))
simbledress · 2022-02-19 09:50
Try: (gnus-add-configuration '(article (horizontal 1.0 (vertical 1.0 (article 1.0)))))
ottertino415 · 2022-02-20 14:41
Thank you for your response, sadly this did not helped
simbledress · 2022-02-23 05:15
I see. It works for me, I'm using emacs 27.2. Btw, the appropriate function isn't `gnus-summary-show-thread`, it's `gnus-configure-frame` which you can call directly to test - see the section 'Window Layout' in the Gnus manual.
ottertino415 · 2022-02-27 21:57
thank you, sorry for latter response, but was waiting till I find time to debug that function, I tried several times but had not enougth time to play around with it
ottertino415 · 2022-03-04 14:14
I think that I understand the problem, I look closer at `gnus-summary-scroll-up` and find out that it is calling `gnus-configure-frame` and then `gnus-summary-show-thread` while show thread assumes that current active buffer is summary buffer and tries to move cursor but when I configure to show just article in same window, it automatically change focus to new article and crashes show thread on moving cursor, I tried to make own function to show article without calling show thread and it works, but after it shows article it scroll one blank page behind article
ottertino415 · 2022-03-04 14:30
Thank you for assistance, I resolved it by creating own function to show article, problem was that it configured windows and then assumed that summary buffer is still focused and tried to move cursor, which did not worked, so I copied original function and removed that cursor movement and rebind it to `RET` in summary buffer: ``` (defun gnus-summary-scroll-up-same-window (lines) "Own implementation of scroll up to show article in same window" (interactive "p" gnus-summary-mode) (gnus-configure-windows 'article) (gnus-summary-select-article nil nil 'pseudo)) ```