Org-Agenda: Show Weekend Days (only)

I would like to have a custom agenda view on my org agenda that only shows weekends.

For example, when I open the [m] onth view (Mx org-Agenda avm), I see the current month. I would like to hide weekdays and show weekends. How can i do this?

0
source share
2 answers

Here is an interactive feature that shows the agenda for the current or upcoming weekend:

(defun org-next-weekend-agenda () "Produce an agenda view for the current or upcoming weekend from all files in variable `org-agenda-files'." (interactive) (let* ((day (string-to-number (format-time-string "%w"))) (offset (cond ((zerop day) -1) ; it Sunday (t (- 6 day)))) ; any other day (offset-string (cond ((>= offset 0) (concat "+" (number-to-string offset))) (t (number-to-string offset))))) (org-agenda-list nil offset-string 2))) 

There may be a way to do this like a regular agenda ... but I have not seen it.

0
source

Perhaps the best route to expand the main scheduling of the organizational agenda, rather than scheduling a view that is less efficient. This will allow you to add additional commands to the main menu of org agendas. This submission is configured using the variable org-agenda-custom-commands , which you can configure or set. This will allow you to add custom commands. For example, to view the following weekend:

 (add-to-list 'org-agenda-custom-commands '("W" "Weekend" ((agenda "" )) ( (org-agenda-overriding-header "WEEKEND") (org-agenda-span 2) (org-agenda-start-day "saturday") )) t) 

So then

Mx org-agenda sw

gives you next weekend. It is very typical to associate an org-agenda with Cc a . Thus, it becomes Cc a W.

0
source

All Articles