Skip to content

Conversation

zaeph
Copy link
Member

@zaeph zaeph commented Jul 27, 2020

org-roam-scratch is a rewrite of org-roam-dailies which strives to implement useful behaviours from org-journal. The rationale is that org-journal can be a little inflexible (cf. bastibe/org-journal#278), and we wouldn't want to hijack its functions to do something that it wasn't designed to do, especially since we'd only be using a subset of the features.

Therefore, the project is indebted to @bastibe, and will strive to incorporate the ephemeral scratchings as defined by @andymatuschak in his Taxonomy of Note Types, and as demonstrated in a livestream he did.

@zaeph zaeph added the 1. enhancement Requests to add new functionality label Jul 27, 2020
@zaeph zaeph added this to the 1.2.2 milestone Jul 27, 2020
@zaeph zaeph self-assigned this Jul 27, 2020
@zaeph zaeph marked this pull request as draft July 27, 2020 08:58
@zaeph zaeph changed the title (feat): Implement org-roam-scratch Implement org-roam-scratch Jul 27, 2020
@zaeph zaeph force-pushed the scratch branch 3 times, most recently from cca187e to 92ca9f2 Compare July 27, 2020 18:29
@zaeph
Copy link
Member Author

zaeph commented Jul 28, 2020

Re: default variable change

'(("d" "daily" entry (function org-roam-capture--get-point)
"* %?"
:file-name "%<%Y-%m-%d>"
:head "#+title: %<%Y-%m-%d>"))

I think it makes more sense to have org-roam-dailies-today and co. be 'entry templates by default in order to replicate the traditional behaviour associated with org-capture. I'm going to write separate commands like org-roam-dailies-find-today to only go to the file, since I do not believe it's necessary to use org-capture in that scenario.

Mind you, it's still be possible to use 'plain templates with org-roam-dailies, and to have them return immediately with :immediate-finish t, but placing the cursor at an appropriate place would be complicated.

@zaeph zaeph force-pushed the scratch branch 2 times, most recently from a66a747 to 8585995 Compare July 28, 2020 23:25
@zaeph zaeph marked this pull request as ready for review July 28, 2020 23:25
@zaeph zaeph requested a review from jethrokuan July 29, 2020 00:00
@zaeph zaeph force-pushed the scratch branch 2 times, most recently from 129e391 to e201367 Compare July 29, 2020 00:05
@zaeph
Copy link
Member Author

zaeph commented Jul 29, 2020

PR is almost ready. I still need to define a rule for considering a file as a daily note. I'm thinking of using org-roam-dailies--file-to-date as a predicate. This way, people could have daily notes in multiple directories, and wouldn't have to declare those directories explicitly. There would be false positives with regular notes including a timestamp, but those would be limited. Other option is to add a metadata-tag for dailies which would contain the date.

…I'll think about this tomorrow.

@zaeph zaeph force-pushed the scratch branch 2 times, most recently from e197547 to 291b2be Compare July 29, 2020 23:55
@zaeph
Copy link
Member Author

zaeph commented Jul 30, 2020

PR is almost done. I just need to edit the changelog and a couple of other minor stuff.

@zaeph zaeph changed the title Implement org-roam-scratch Improve org-roam-dailies Aug 1, 2020
Copy link
Member

@jethrokuan jethrokuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything else looks fine for now, will have to think about how to decouple things from org-roam-capture.

@zaeph
Copy link
Member Author

zaeph commented Aug 7, 2020

Here's a quick demo of the new features:
https://youtu.be/1q9x2aZCJJ4

@lhindir
Copy link

lhindir commented Sep 27, 2020

Anything holding this up? It's kind of weird to see one of the few demo videos and then find out it's for unmerged features :)

@zaeph
Copy link
Member Author

zaeph commented Sep 29, 2020

I'm still bogged down in work, and I'd rather not announce any other ETA that I won't be able to meet. That being said, I'm growing more antsy with the days to come back and merge this, so it shouldn't be too-too long.

@zaeph zaeph added this to the 1.2.3 milestone Nov 7, 2020
zaeph added 4 commits November 9, 2020 14:25
Mimics ‘org-roam-capture--file-name-default’ and
‘org-roam-capture-ref--file-name-default’.
@zaeph
Copy link
Member Author

zaeph commented Nov 10, 2020

I've fixed the defcustom template in 0f81f5a.

Here are example templates:

(setq org-roam-dailies-capture-templates

      '(("d" "default" plain
         #'org-roam-capture--get-point
         "%?"
         :file-name "daily/%<%Y-%m-%d>"
         :head "#+title: %<%Y-%m-%d>\n\n"
         :unnarrowed t)

        ("a" "alternative template" entry
         #'org-roam-capture--get-point
         "* %?"
         :file-name "daily/%<%Y-%m-%d>"
         :head "#+title: %<%Y-%m-%d>\n\n* Foo"
         :olp ("Foo"))))

There are subtle difference (notably plain vs entry), but I think it's fairly powerful.

@jethrokuan I've elected to keep org-roam-dailies-capture--file-name-default and org-roam-dailies-capture--header-default for now because also have org-roam-capture--file-name-default and org-roam-capture--header-default. If we need to drop the former in former of a clever pcase, we might as well remove the others, and I'd rather do that in a separate PR, if need be.

@zaeph
Copy link
Member Author

zaeph commented Nov 10, 2020

I'll review everything in the morning, but I think we'll be good for a merge.

@jethrokuan
Copy link
Member

@jethrokuan I've elected to keep org-roam-dailies-capture--file-name-default and org-roam-dailies-capture--header-default for now because also have org-roam-capture--file-name-default and org-roam-capture--header-default. If we need to drop the former in former of a clever pcase, we might as well remove the others, and I'd rather do that in a separate PR, if need be.

sure, I'll drop them in a later PR.

@zaeph
Copy link
Member Author

zaeph commented Nov 10, 2020

Code is ready in 4ee1606.

I'm working on the doc to mention the new features (also those in #1239).

zaeph added 10 commits November 10, 2020 12:30
It was a nice alternative to the hack we have with :file-name, but it isn’t
all that necessarty for now.  I’ll review this when working on org-roam-flow,
since it’ll make better use of folders.
Otherwise, it clashes with the blurb which mentions isolation.
Also standardise the hyphenation to ‘daily-note’.
@zaeph zaeph merged commit 4f6eb28 into master Nov 10, 2020
@zaeph zaeph deleted the scratch branch November 10, 2020 13:31
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1. enhancement Requests to add new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants