Jrnl: No way to have "." in the middle of a title

Created on 9 May 2020  路  6Comments  路  Source: jrnl-org/jrnl

Bug report

Hello! Thank you for reporting an issue!
If you would fill out the below points, that would make our process a whole lot easier!

  • Please tell us about your environment:

    • Jrnl version: (run jrnl -v): jrnl version v2.4.1
    • How you installed Jrnl: pipx install jrnl
    • Operating system [MacOS, Linux, Windows?]: macOS
  • What is the current behavior?

There is no way to prevent jrnl from breaking on

  • Please provide the steps to reproduce and if possible a minimal demo of the problem

Run jrnl to create a new entry:

$ jrnl

In your editor, enter:

TIL that `. script` is equivalent to `source script`


Broken behavior: a newline is inserted after the first ..

$ jrnl -n 1
2020-05-09 11:51 TIL that `.
| script` is equivalent to `source script`
|
| But `. script` is more portable
  • What is the expected behavior?

. should only be considered the end of the title if it actually ends a sentence.

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

This is possibly a regression of https://github.com/jrnl-org/jrnl/issues/360 .

bug

Most helpful comment

We should remove the parsing of a period for the title. The first linebreak already denotes the title in the absence of a period. I think only using the linebreak gives the user better control of their journal.

All 6 comments

We should remove the parsing of a period for the title. The first linebreak already denotes the title in the absence of a period. I think only using the linebreak gives the user better control of their journal.

Agreed--that would solve this problem and I think it's better behavior more generally.

I create most of my entries from the command line. And I really like the ability to have titles for them. I hope you can preserve that when you change the parsing of editor-created entries.

@ms82494 Even if the parsing of the first period is removed, you would still be able to use linebreaks, e.g. jrnl 'This is the title\nThis is the content'

How embarrassing! It never even occurred to me to use escape characters in the entries.

@ms82494 I preserve this functionality in PR #958.
It breaks the title by sentence terminals(period, question mark, exclamation etc) when there is no newline in the entry. If there is a newline, then it assumes that it was produced from the editor and breaks by newline. Typing a \n by hand is one of the most unnatural things you can do in a program that places great emphasis on natural language.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bjornasm picture bjornasm  路  8Comments

marekkowalczyk picture marekkowalczyk  路  5Comments

arisAlexis picture arisAlexis  路  4Comments

g-berthiaume picture g-berthiaume  路  3Comments

MarkWh1te picture MarkWh1te  路  5Comments