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

Document which formats do and don't support linewrap #1689

Open
micahellison opened this issue Feb 23, 2023 · 0 comments
Open

Document which formats do and don't support linewrap #1689

micahellison opened this issue Feb 23, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation 📌 This can't go stale
Milestone

Comments

@micahellison
Copy link
Member

micahellison commented Feb 23, 2023

Edit: Let's not treat this as a bug. I don't want to mess with the --short behavior after all these years, in case people are reliant on it for parsing jrnl output. Instead, let's document which formats are supported and not supported by linewrap.


Diagnostic output

jrnl: v3.3
Python: 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)]
OS: Windows 10

Current Behavior

When running jrnl --short, the text isn't wrapped.

Expected Behavior

I would expect long titles to be wrapped with short because the config reference says the config value linewrap "controls the width of the output".

However... this behavior is probably also really old. If anyone is using \n to split jrnl --short output, they could have a bad time if we "fix" this for them. I'm open to compromises on this. For instance, we could close this issue as "won't fix" and document the current behavior better.

Repro Steps

>jrnl asdkfljahsdklfjhaskdlfjhaskldjfhaskldjfhaskldjfhaskldjfhklasdjfhklasjdfhklasjdfh askldjfhaksldjfhkasldjfhkalsjdfhaklsdjfhaklsjdfh  asdfkjahsdlkfjhasldkfjhaskldjfhaskldjfhalksdjfhklasdjfhklasjdfh asdklfjhasdklfjhaskldjfhaskldfhafd

>jrnl -1 --short
2023-02-23 07:52:54 AM asdkfljahsdklfjhaskdlfjhaskldjfhaskldjfhaskldjfhaskldjfhklasdjfhklasjdfhklasjdfh askldjfhaksldjfhkasldjfhkalsjdfhaklsdjfhaklsjdfh  asdfkjahsdlkfjhasldkfjhaskldjfhaskldjfhalksdjfhklasdjfhklasjdfh asdklfjhasdklfjhaskldjfhaskldfhafd

Debug output

DEBUG    root         Parsed args: Namespace(debug=True, preconfig_cmd=None, postconfig_cmd=None, filename=None, on_date=None, today_in_history=False, month=None, day=None, year=None, start_date=None, end_date=None, contains=None, strict=False, starred=False, limit=1, excluded=[], edit=False, delete=False, change_time=None, export=False, tags=False, short=True, config_override=[], config_file_path='', text=[])
DEBUG    root         Reading configuration from file C:\Users\micah\.config\jrnl\jrnl.yaml
DEBUG    root         Using configuration "{'colors': {'body': 'none', 'date': 'magenta', 'tags': 'yellow', 'title': 'cyan'}, 'default_hour': 9, 'default_minute': 0, 'display_format': None, 'editor': 'subl -w', 'encrypt': False, 'highlight': True, 'indent_character': '\ue621', 'journals': {**************}, 'linewrap': 'auto', 'tagsymbols': '#@', 'template': False, 'timeformat': '%F %r', 'version': 'v3.3'}"
DEBUG    root         Using journal name: default
DEBUG    root         Updating configuration with specific journal overrides {'encrypt': False, 'journal': 'C:\\Users\\micah\\Documents\\jrnl\\default.txt'}
DEBUG    root         opened PlainJournal with 5 entries
2023-02-23 07:52:54 AM asdkfljahsdklfjhaskdlfjhaskldjfhaskldjfhaskldjfhaskldjfhklasdjfhklasjdfhklasjdfh askldjfhaksldjfhkasldjfhkalsjdfhaklsdjfhaklsjdfh  asdfkjahsdlkfjhasldkfjhaskldjfhaskldjfhalksdjfhklasdjfhklasjdfh asdklfjhasdklfjhaskldjfhaskldfhafd

Other Information

Discovered while investigating #1191 (replace ansiwrap). The resolution to that issue could affect this one.

@micahellison micahellison added bug Something isn't working 🆕 New! labels Feb 23, 2023
@micahellison micahellison changed the title jrnl doesn't support linewrap with --short Document which formats do and don't support linewrap Feb 25, 2023
@micahellison micahellison added documentation Improvements or additions to documentation 📌 This can't go stale and removed bug Something isn't working 🆕 New! labels Feb 25, 2023
@micahellison micahellison added this to the Backlog milestone Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation 📌 This can't go stale
Projects
None yet
Development

No branches or pull requests

1 participant