[[https://melpa.org/#/org-upcoming-modeline][https://melpa.org/packages/org-upcoming-modeline-badge.svg]] [[https://stable.melpa.org/#/org-upcoming-modeline][https://stable.melpa.org/packages/org-upcoming-modeline-badge.svg]]
This package shows you the next upcoming org appointment in your modeline.
You can left-click on it to go to it, right-click for a menu of actions, middle-click to temporarily hide it.
[[file:org-upcoming-modeline.gif][file:org-upcoming-modeline.gif]]
** MELPA If you use [[https://melpa.org/][MELPA]], you can do =M-x list-packages=, find =org-upcoming-modeline= in the list and hit =i x=.
** Manual Just put =org-upcoming-modeline.el= somewhere in =load-path=.
(use-package org-upcoming-modeline :after org ; if you don't want it to start until org has been loaded :load-path "~/src/org-upcoming-modeline" ; if you installed manually :config (org-upcoming-modeline-mode))
** Advanced You can generate a description of all the avaiable functionalites and display it from GNU Emacs by doing =M-x customize-group RET org-upcoming-modeline=.
Here is a non-exhaustive list of some =org-upcoming-modeline= functionalities:
=org-upcoming-modeline-ignored-keywords= allows you to exclude TODO states. Example excluding "BACKLOG" and "NEXT" states:
(setq org-upcoming-modeline-ignored-keywords '("BACKLOG" "NEXT")
=org-upcoming-modeline-format= allows you to modify the displaying format of the elements around the appointment time (=time-string=) and the appointment title (=heading=). Example replacing the alarm clock icon with a calendar icon, and replacing =:= with =-=:
(setq org-upcoming-modeline-format (lambda (ms mh) (format "🗓 %s - %s" ms mh)))
=org-upcoming-modeline-days-ahead= allows you to fix the number of days to look into the future (1 by default). Example looking for 15 days ahead:
(setq org-upcoming-modeline-days-ahead 15)
=org-upcoming-modeline-trim= allows you to fix the number of characters displayed for the appointment title (=heading=), it is 20 by default. Exemple removing the trimming:
(setq org-upcoming-modeline-trim nil)
Related packages
** appt
=appt= is not itself integrated with org-mode, but if you do =(add-hook 'org-finalize-agenda-hook #'org-agenda-to-appt)= it will add appointments from that agenda to your list of future warnings, and warn when you're getting closer. But the modeline just says "App't in 15 min." (it doesn't show the name of the event, and there's no org-integration). However, by default it will keep popping up a small window with the event name for you every so often when the event is getting near.
In comparison, this package doesn't require you to open (the correct) =org-agenda= first; it shows the actual org heading and adds org-specific "actions" that you can select for the event. And since it uses =org-ql=, it'll automatically remove the event (after a short idle delay) if you remove it from your org file.