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

Change temporary file names for better text editor integration #1080

Closed
delventhalz opened this issue Nov 13, 2020 · 1 comment · Fixed by #1139
Closed

Change temporary file names for better text editor integration #1080

delventhalz opened this issue Nov 13, 2020 · 1 comment · Fixed by #1139
Labels
enhancement New feature or request 📌 This can't go stale

Comments

@delventhalz
Copy link

delventhalz commented Nov 13, 2020

Feature Request

When using jrnl with a text editor, a temporary file is created with the name jrnl12345.txt, where 12345 is a random identifier. Rather than a random filename with a generic file extension, consider one of the two following changes:

  • A fixed filename such as JRNL_ENTRY (this matches git's behavior in a similar context)
  • Or, a unique file extension such as .jrnl

If backwards compatibility is a concern, this change could be implemented as an optional config setting.

Use Case/Motivation

Although there is not much syntax in these temporary jrnl entry files, it would still be nice to highlight the title line and tags. Like using a text editor to write commit messages for git, the extra context from syntax highlighting would make the input process clearer and more pleasant.

Unfortunately the current temporary files, with their random names and plain text file extension, are quite difficult to distinguish in many editors. Something either more predictable or with a unique file extension would be much simpler to target with custom editor settings and plugins.

Other information

I am most interested in this change in order to hook into custom syntax highlighting, but I imagine it would be useful for other text editor integrations as well down the road.

@delventhalz delventhalz added 🆕 New! enhancement New feature or request labels Nov 13, 2020
@micahellison
Copy link
Member

Hi there, thanks for filing this enhancement.

@wren and I talked about this and we like the .jrnl extension as a default. It doesn't seem to be used by any other program we can identify, so it could fit this syntax highlighting concern quite nicely for all sorts of editors.

Issue #1059 is very similar to this also, but I think that issue is more about customization rather than defaults, so I'd like to keep both of these open as separate issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 📌 This can't go stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants