0

My agenda view shows duplicated items when they are created and scheduled in the same day, which litters this view:

screenshot

So for instance The item that was created today at 11:33 will show once with its creation timestamp, and then again without timestamp. I'd like to remove the former from the view and keep the latter.

EDIT

Thank y'all for your help.

As @erikstokes poined out, my question was a duplicated of this one. So the only solution I could think of is to make the timestamp inactive when capturing (creating) a note.

To this end I changed %T by %U in my capture template:

(setq org-capture-templates
      '(("t" "New Task" entry (file+headline agenda-path "Inbox")
         "* TODO %?\n  %U\n  %i\n")
        )
      )

I also customized org-agenda-time-grid as suggested in the answer by @NickD, which causes timestamps to be displayed in a more compact manner, in case they are shown.

(setq org-agenda-time-grid
      '((require-timed)
        "----------------"
        (800 1000 1200 1400 1600 1800 2000)))
  • Yes, indeed! I'm experiencing the same problem :( Though the solution there is far from optimal. I'd rather say to org mode "don't show timestamps if it doesn't belong to a scheduled item" – Damian Nadales Apr 7 at 7:32
  • Yes. See my edit ;) – Damian Nadales Apr 7 at 16:43
1

IIUC, you want to remove the time grid completely:

(setq org-agenda-use-time-grid nil)

If this variable is non-nil, then the grid is shown, but you can control (to some extent) the format of the grid entries by using the org-agenda-time-grid variable. The doc string for org-agenda-time-grid should provide some guidance on what you can do with it:

org-agenda-time-grid is a variable defined in ‘../org-mode/lisp/org-agenda.el’.
Its value is
((daily today require-timed)
 (800 1000 1200 1400 1600 1800 2000)
 "......" "----------------")

  You can customize this variable.

Documentation:
The settings for time grid for agenda display.
This is a list of four items.  The first item is again a list.  It contains
symbols specifying conditions when the grid should be displayed:

 daily         if the agenda shows a single day
 weekly        if the agenda shows an entire week
 today         show grid on current date, independent of daily/weekly display
 require-timed show grid only if at least one item has a time specification
 remove-match  skip grid times already present in an entry

The second item is a list of integers, indicating the times that
should have a grid line.

The third item is a string which will be placed right after the
times that have a grid line.

The fourth item is a string placed after the grid times.  This
will align with agenda items.

In particular, the remove-match setting might be what you want:

 (setq org-agenda-time-grid '((today remove-match) (800 1000 1200 1400 1600 1800 2000) "......" "----------------"))

although that keeps the entry in the grid and gets rid of the other entry.

| improve this answer | |
  • Thanks. This doesn't seem to work. I tried (setq org-agenda-time-grid nil) and even some options as mentioned in the docstring, but the timestamped items keep on showing :/ – Damian Nadales Apr 7 at 7:33
  • 1
    Sorry - I used the wrong variable for that case. You should set org-agenda-use-time-grid to nil if you want to get rid of the time grid completely. I'll fix the answer. – NickD Apr 9 at 1:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.