Coder Social home page Coder Social logo

Show entries in Calendar about denote HOT 3 OPEN

x61 avatar x61 commented on September 3, 2024
Show entries in Calendar

from denote.

Comments (3)

protesilaos avatar protesilaos commented on September 3, 2024

from denote.

jonathanwilner avatar jonathanwilner commented on September 3, 2024

This is the code from org-journal that does it. It just adds the file to org-agenda-files. Considering that the use case is based on org-journal. restricting this to org-mode & org-agenda seems OK vs. a broader calendar.el / diary approach.

I believe this can be done right now via user-specific emacs lisp. It would certainly be cool to have it out-of-the-box from Denote, especially if it's linked to a specific silo or silos.

(defun org-journal--update-org-agenda-files ()
  "Adds the current and future journal files to `org-agenda-files'
containing TODOs, and cleans out past org-journal files."
  (when org-journal-enable-agenda-integration
    (let ((not-org-journal-agenda-files
           (seq-filter
            (lambda (fname)
              (not (string-match (org-journal--dir-and-file-format->pattern) fname)))
            (org-agenda-files)))
          (org-journal-agenda-files
           (let* ((future (org-journal--read-period 'future))
                  (beg (car future))
                  (end (cdr future)))
             (setcar (cdr beg) (1- (cadr beg))) ;; Include today; required for `org-journal--search-build-file-list'
             (when (< (nth 2 (decode-time (current-time))) org-extend-today-until)
               (setq beg (decode-time (apply #'encode-time `(0 59 -1 ,(nth 1 beg) ,(nth 0 beg) ,(nth 2 beg))))
                     beg (list (nth 4 beg) (nth 3 beg) (nth 5 beg))))
             (org-journal--search-build-file-list
              (org-journal--calendar-date->time beg)
              (org-journal--calendar-date->time end)))))
      (org-store-new-agenda-file-list (append not-org-journal-agenda-files
                                              org-journal-agenda-files)))))
`

from denote.

protesilaos avatar protesilaos commented on September 3, 2024

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.