Giter VIP home page Giter VIP logo

.emacs.d's People

Contributors

mpereira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

.emacs.d's Issues

About relative dates in org-ql and org-super-agenda

Hi there,

I saw this code in your config:

(let ((inhibit-read-only t))
  (with-current-buffer (get-buffer-create "*org-ql-complex*")
    (erase-buffer)
    (--each '(("Done today" #'closed-today)
              ("Done yesterday" #'closed-yesterday)
              ("Done this week" #'closed-this-week-before-yesterday)
              ("Done last week" #'closed-last-week)
              ("Done this month" #'closed-this-month))
      (--> (list (car it) (funcall (get-in '(1 1) it)
                                   (org-ql (org-agenda-files)
                                     (done)
                                     :sort (date)
                                     :markers t)))
           (list (car it) (--map (concat (org-ql-agenda--format-element it) "\n")
                                 (nth 1 it)))
           (insert (concat (car it) "\n" (apply #'concat (nth 1 it))) "\n")))
    (pop-to-buffer (current-buffer))))

And I saw that you wrote a little library of functions to support it. Very cool!

But I realized that that was only necessary because org-super-agenda doesn't support between dates. I have some prototype code that lets you do something like this:

(let ((org-super-agenda-groups
       '((:name "Done last week"
                :closed (between "last sunday" "last saturday"))
         (:name "Done this week"
                :closed (between "this sunday" "this saturday")))))
  (org-ql-agenda (org-agenda-files)
    (closed)
    :sort (date)))

Supporting "Done this month" would be a bit more complicated because of converting the relative date strings to absolute dates (my code uses GNU date, which doesn't support e.g. first of this month), but it should be doable.

Would you find this useful?

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.