GithubHelp home page GithubHelp logo

Idea/Adding "past" notes about denote HOT 9 CLOSED

protesilaos avatar protesilaos commented on September 14, 2024
Idea/Adding "past" notes

from denote.

Comments (9)

protesilaos avatar protesilaos commented on September 14, 2024

I wonder wether it would make sense to have such an option during the creation of the note

It does make sense and I will make it happen. Just need to think how best to accomplish it. More to follow.

from denote.

protesilaos avatar protesilaos commented on September 14, 2024

Just added the denote-date command. It wasn't easy as Denote was designed around the assumption that the time is always the current one. I think I tested everything, but please test it as much as you can as well.

Thank you!

The commit:

  commit d5b62c4e58d7898ab77926ea23ea94834c281999
  Author: Protesilaos Stavrou <[email protected]>
  Date:   Thu Jun 16 12:09:33 2022 +0300
  
      Add denote-date command (notes for past date)
      
      Thanks to user svnsbck for suggesting the idea in issue 15 over at the
      GitHub repo: <https://github.com/protesilaos/denote/issues/15>.
  
   README.org |  30 +++++++++++++----
   denote.el  | 107 +++++++++++++++++++++++++++++++++++++++++++++++++------------
   2 files changed, 110 insertions(+), 27 deletions(-)

from denote.

svnsbck avatar svnsbck commented on September 14, 2024

Nice! I have tested this with "normal" notes and there it does seem to work as expected.

I have then tried to incorporate this into the journal-workflow, but only with limited success. :-)

(defun my-old-journal () "Create a journal entry with a past date" (interactive) (let ((denote-directory "~/Documents/journal/")) (denote (denote--date-prompt) ; ask for date (denote--title-prompt) ;Ask for title "journal")))
I tried placing the date-prompt at different places, without success either.
I had the feeling that it should work, but didn't Needless to say I'm missing something obvious here.

from denote.

protesilaos avatar protesilaos commented on September 14, 2024

Nice! I have tested this with "normal" notes and there it does seem to work as expected.

Very well!

I have then tried to incorporate this into the journal-workflow, but only with limited success. :-)

No worries! I was planning to expand the manual.

This one asks for a date and a title:

(defun my-denote-journal-with-date (date title)
  "Ask for DATE and TITLE to write a journal entry.

Read the doc string of `denote-date' on what a valid DATE is."
  (interactive
   (list
    (denote--date-prompt)
    (denote--title-prompt)))
  (when-let ((d (denote--valid-date date))
             (id (format-time-string denote--id-format d))
             ((denote--barf-duplicate-id id)))
    (denote--prepare-note title "journal" nil d id)))

And this one just for a date:

(defun my-denote-journal-with-date (date)
  "Ask for DATE to write a journal entry.

Read the doc string of `denote-date' on what a valid DATE input is.

The title of the note is something like Tuesday 17 June 2020,
though you can modify the `format-time-string' specifiers as
described in its doc string."
  (interactive (list (denote--date-prompt)))
  (when-let ((d (denote--valid-date date))
             (id (format-time-string denote--id-format d))
             ((denote--barf-duplicate-id id)))
    (denote--prepare-note
     (format-time-string "%A %e %B %Y" d)
     "journal" nil d id)))

from denote.

protesilaos avatar protesilaos commented on September 14, 2024

Also expanded the manual. Please let me know if you need some extra tweak but are not sure how to do it.

I will now close this issue. Thanks again!

from denote.

svnsbck avatar svnsbck commented on September 14, 2024

Oh, that is great. Thanks a lot.

from denote.

protesilaos avatar protesilaos commented on September 14, 2024

You are welcome!

By the way, in the manual's Acknowledgements I reference your screen name as that is all I see here. Maybe I can add the full name instead?

from denote.

svnsbck avatar svnsbck commented on September 14, 2024

Absolutely! As you just say it I figured that I have not set this up :-) . My bad, just changed that. But it would Sven Seebeck, just in case things don't update here. Thanks a lot!

from denote.

protesilaos avatar protesilaos commented on September 14, 2024

Done! Thank you!

from denote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.