Issues with screenshoting long buffers #7
Labels
No Label
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: tec/screenshot.el#7
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When I screenshot
org-mode
buffers, it will cut off content after a certain length like so ...My current workaround is quite silly, I will keep repeating the content until the screenshot expands to fit more content and crop out the rest. Example of screenshot size expanding ...
I have also been running into this for a while but been unable to consistently reproduce until now, it occurs when the
Maximum width
is too small and lines wrapScreenshot with
Maximum width
set to the default120
Screenshot with
Maximum width
set to400
Could this be happening in org buffers when the width of the plain text exceeds the maximum but the displayed doesn't?
Mmm, there's a known issue where line wrapping isn't accounted for — not because I don't care about line wrapping, I just don't know how to determine how many lines are wrapped. If anyone has an idea, I'd love to hear.
Line wrapping is now accounted for as of
dac727e98e
. There's a different issue with the posframe maximum height, but that can be another issue if anybody wants to raise it.In my testing for #10 I've run into some issues with short screenshots, and just in general
In addition also seems to be truncating the whole buffer (even with
-W
set to 120 to avoid line wrapping, it still wraps)Thanks for those samples. I'll see if that matches what I see.
Seems like the line wrapping was slightly under-counted in the last example, but other than that it seems fine my end 🤔.
With the blank line examples, it's worth notice I've recently made trailing whitespace trimming more aggressive.
Interesting, with no blank lines I'm able to get this results (No. lines 1 -5) using
All taken using these settings,
Would it be system related?
I'm running Fedora release 36 with Gnome 42.4 and X11.
I've moved over to a vanilla config to hopefully make it reproducible for you.
The cause of this issue was not obvious to me, so it's been slightly forgotten about, but thanks for the vanilla example. If/when I do finally get to this, I expect that to be a big help.
@Jake-Moss in the recent batch of development I've done (a whole bunch of improvements 🎉) I may have run into what's causing this. Can you try tweaking the font size and seeing if there's a certain size where the sizing "matches"? It seems the posframe size is calculated based on the size of the active window at the time, not the font size of the buffer about to be shown.
There's also the issue of the posframe not being able to be generated as larger than the display, which it used to be able to do.
Since these issues are both posframe related, @tumashu might you be able to give any advice here?
Thanks for your work on this, I've done a bit of testing and you were bang on that there was a good font size that worked.
For me 9 works (sometimes). Unfortunately I've found it also seems to be dependent on the size of my current emacs frame, though that may be related to the "larger than display" issue you mentioned as making the frame larger doesn't effect the output.
I've got a series of screenshots below using this buffer
Maximised (title bar still visible), 14 (default font size)
Full screen gnome bar and title bar not visible, 14 (default font size)
Not maximised width, but maximised height, 14
smaller window, 14
maximised, title bar and gnome bar visible, 9
full screen, 9
full height, 9
smaller window, 9
Interestingly I couldn't see a difference between maximised and fullscreen.
As a side note, changing the font size to 9 has actually fixed this on my wayland + pgtk build. Previously if the font was too large the screenshot would only contain the background.