Open bmp opened 1 year ago
The reason is because I refill every toot by default. Obviously in this case it'll give a bad output. Maybe we could have a refill option. And if you ask, the reason for the refill is to be able to add box around retoot. Else, very long lines are weird. Maybe I can also have my own refill function only for this case.
Same here. I had to change 2 to 5, for some reason, in this line
@csantosb But this does not fix the alignment issue, does it?
Yes, it does for me.
The alignment issue is not fixed but the status line is displayed in a single line when i use 6 or 5 instead of 2 as indicated in https://github.com/rougier/mastodon-alt/issues/10#issuecomment-1640168673
I think the alignment issue might be linked to the presence of a fringe on the left. I shoud align to the the right fringe (which is equal to right when no fringe I think)
I've noticed the same issue and find that it's most annoying when the toot contains bullet-pointed/enumerated lists, which each item in the list separated by a single line-break.
@rougier you mentioned this is to do with refilling the toot body – is there not a way to parse the text before refilling and add an extra line-break where the original text had one? I.e. \n
-> \n\n
first, and then after refilling, long-lines are truncated by a single-line break.
I suspect Emacs has certainly a function to do that but I don't know the name. For example, visual mode might be an option but I do not know the exact algorithm. Any suggestions welcome.
I tried a few things, but I actually find that simply replacing
(string-fill content (min (- (window-width) 2) fill-column))
with just
content
seems to fix this, with few ill effects compared to the prior situation. Of course, it persists inside boosted toots, but that seems reasonable enough for me at the moment.
I tried a few things, but I actually find that simply replacing
(string-fill content (min (- (window-width) 2) fill-column))
with just
content
seems to fix this, with few ill effects compared to the prior situation. Of course, it persists inside boosted toots, but that seems reasonable enough for me at the moment.
I can confirm the same.
What do you mean by "it persists inside boosted toots"?
When I first tried this change, it seemed as though the lines would break through the inner bounding box of a boosted toot. However, that does not actually seem to be the case -- it was probably an artefact of some a window-split or some other change. Basically, the fix works without any problems for me.
"Nicolas P. Rougier" @.***> writes:
What do you mean by "it persists inside boosted toots"?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
So maybe an option that points on refill, no-refill or user defined function might be the easiest, what do you think?
So maybe an option that points on refill, no-refill or user defined function might be the easiest, what do you think?
If you mean that there should be some (defvar mastodon-alt--toot-refill-p t)
, where we modify the code above so that we have
(if mastodon-alt--toot-refill-p
(string-fill content (min (- (window-width) 2) fill-column))
(content) )
then I am inclined to agree. Maybe there are still some bugs in the (content)
fix that haven't cropped up for me but will crop up for others.
Exactly. Care to make a PR?
OK, see the following (which includes a fix for the status line issue too): https://github.com/rougier/mastodon-alt/pull/23
Same here. I had to change 2 to 5, for some reason, in this line
this does for me
Line breaks seem to be removed sometimes, an example of this is visible with toots that have the Wordle diagram/attempts.
Here are the links to the two toots,
On Mastodon web,
On mastodon-alt,