-
Notifications
You must be signed in to change notification settings - Fork 306
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
Handling of newline in body text #417
Comments
Do you use |
I see the same issue here. To confirm that it is not caused by any setting in org-mode, here is a screenshot of a file with two paragraphs seen in Emacs' fundamental mode. The first paragraph is not filled (it's just one long line), while the second is. In orgzly, the first paragraph looks OK and the second has line feeds at the "wrong" places. |
Thanks, so that's definitely just line wrapping then. There's not enough horizontal space to display entire line. If you rotate the phone, it might fit. Support for horizontal scrolling would fix this. See #74. |
On my phone, 80 character lines do fit with the screen rotated if the font is set to small. On the other hand, it sounds like horizontal scrolling would not solve the issue in portrait mode, with default size fonts or smaller phones. Instead, users would need to scroll horizontally to read every line of text. This would make the app hard to use for example when reading a recipe written with org-chef while cooking. A solution could be for the paragraphs (and maybe other markup elements ?) to be interpreted from the org markup, rather than displaying the raw text on screen. |
Is this an orgzly issue or an |
Actually I disagree with @nevenz and also with the "feature" label. It's a bug. Paragraphs that consist of lines with newlines at the end get mangled in display and are hard to read - not because screens are too small, but because they're treated as lines with newline, not as paragraphs. |
Emacs doesn't do this either. You can
Right, we can't modify user's data, only display it differently in the app. It could be |
I think Emacs behaviour is not comparable here, not least because Emacs gives you
And line-initial whitespace; some users format their org-mode text blocks like this:
In Orgzly these paragraphs can become quite awkward to read as soon as your screen is too narrow to accommodate the line length. Zooming, horizontal scrolling etc. would make it a bit easier on the eyes at least. But it would lead to awkward user interaction, e.g. when scrolling you'd have to scroll right and left all the time to read every line.
I agree that inside tables & similar constructs the approach probably wouldn't work. But for a start it would already be useful enough for text and maybe list paragraphs, which I guess is like 99% of most people's org-mode content. If you encounter a table within a paragraph, that's usually an indicator that the paragraph ends :) |
Yes, I'm mostly concerned about modifying text from Orgzly. I don't think that's the option.
Another example: If I resize Emacs window, text is not modified if it can't fit the screen anymore.
It's probably better to handle this when parsing the org file for the first time like it's done for planning times and drawers here (either by detecting it or using a preference). It's different from paragraphs as it's very closely related to org's (configurable) format. If you were to use JSON (for example) you wouldn't have indenting issue, but you'd still have new-lines/paragraphs in |
I agree that Orgzly shouldn't modify the file just to format it in a pretty way. In Emacs, if you don't work in In Orgzly it should be presentation-only, like enabling
Thanks for the code example, that's very useful. Some Emacs modes, like Enriched mode, have a distinction between soft and hard newlines. Soft newlines are what occurs inside paragraphs (and can be reflowed). Hard newlines are all other newlines and remain. It's up to the Emacs mode to decide how to treat them. Maybe there would be a way to distinguish, during parsing, some newlines that are semantically "soft", and offer the option to visually reflow them inside the paragraph during display. |
If I have a heading like this
it is displayed in orglzy like this
So, every line-break seems to be regarded as the start of a new paragraph. Instead it should be regarded as normal white-space. I feel like I'm doing something wrong. Don't people fill their org-files anymore ?
By the way, thank you for your very useful program.
The text was updated successfully, but these errors were encountered: