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

Assigning a number to each entry when viewing #1218

Closed
Mazino-Urek opened this issue Mar 20, 2021 · 5 comments
Closed

Assigning a number to each entry when viewing #1218

Mazino-Urek opened this issue Mar 20, 2021 · 5 comments

Comments

@Mazino-Urek
Copy link

Feature Request

Use Case/Motivation

What is the motivation / use case for changing the behavior?
By using jrnl -to today I can view all the entries of a Journal but editing or deleting(specially for a long one) one entry seems complex to me. It can be simplified.

Example Usage

When executing jrnl -to today jrnl can automatically assign Natural Number besides each entry 1,2,3...
It will work as an ID for each and every entry. By using this ID jrnl entry can be modified or deleted easily rather than doing the interactive --delete mode for one on one entry.

Other information

Thanks for this awesome software!

@Mazino-Urek Mazino-Urek added 🆕 New! enhancement New feature or request labels Mar 20, 2021
@micahellison
Copy link
Member

Hi there, thanks for kind words!

I'm not sure, but I think jrnl supports what you're asking for with the -n argument, which can also be substituted for a number, like jrnl -to today -5 which would display the last five entries leading up to today. I often just type in jrnl -1 to view my last entry, or jrnl -1 --edit to edit it. Is that what you're looking for, or did you envision something else?

@micahellison micahellison added needs more info Further information is requested and removed 🆕 New! labels Mar 20, 2021
@Mazino-Urek
Copy link
Author

Mazino-Urek commented Mar 20, 2021

It can be easier. For example, Journal now show entry like this.

2021-03-01 09:00 **************************
2021-03-03 09:00 **************************
2021-03-09 09:00 **************************
2021-03-15 09:00 **************************
2021-03-18 09:00 **************************
2021-03-20 09:00 **************************

I can use command jrnl -1 --edit to edit last entry, but what if I want to edit an entry from quite some time ago? Counting will be an inconvenience then.
What if jrnl entry looked like this:

2021-03-01 09:00 ************************** [6]
2021-03-03 09:00 ************************** [5]
2021-03-09 09:00 ************************** [4]
2021-03-15 09:00 ************************** [3]
2021-03-18 09:00 ************************** [2]
2021-03-20 09:00 ************************** [1]

I can now just use the number to modify or delete an entry easily even if the entry number is 165! It can be ascending or descending. Hope the idea is clear now.

@Mazino-Urek
Copy link
Author

It can also be like this for better allignment,

[6] 2021-03-01 09:00 ************************** 
[5] 2021-03-03 09:00 ************************** 
[4] 2021-03-09 09:00 ************************** 
[3] 2021-03-15 09:00 ************************** 
[2] 2021-03-18 09:00 ************************** 
[1] 2021-03-20 09:00 **************************

@micahellison
Copy link
Member

I see now, thanks for the added explanation. It's basically a dynamically-generated ordinal identifier for each entry, in descending order, displayed whenever the entry is displayed so you can easily pick it out for other jrnl operations.

We are thinking about adding unique identifiers to each entry eventually (see #519 and #949), which would likely conflict with this feature. I think, in the long run, implementing then exposing these unique identifiers to the user would be simpler, since the identifier for each entry would never change.

In the meantime, you can generally narrow down entries by chaining together additional search parameters. I usually mix and match -from, -to, and -contains to significantly reduce the number of entries that display.

@Mazino-Urek
Copy link
Author

Fair enough. Closing the issue then.

@wren wren removed the enhancement New feature or request label Mar 27, 2021
@micahellison micahellison removed the needs more info Further information is requested label Mar 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants