2

First, let me say that I tried to search around for an answer to this (and I will clarify where those failed).

So my problem is that when I enter the daily for for agenda, M-x Org-Agenda a, I see duplicated tasks for what I believe is anything with a deadline or scheduled timestamp.

All tasks shown in view have a timestamp

I have tested this, and it seems normal TODOs get neglected where as anything with a timestamp, with a TODO or without, get presented twice in my daily agenda.

Removed deadline from study guide, no longer shown as result

I have tried using M-x customize variable org-agenda-todo-ignore-timestamp, which successfully eliminates duplicates at the cost of not showing any items with a scheduled/deadline time stamp, which I would still like to see in my agenda view. Though it doesn't apply here, I also checked to see if M-x customize variable org-agenda-todo-list-sublevels was responsible.

Any ideas? I'm fairly new to org-mode and its various related functions/minor modes, so I very well could just be misusing the agenda function. I am currently using emacs24.5 but experienced it also while using emacs24.3. I'm also attaching the only code in my init.el file that involves org-mode directly besides some capture templates and use-package declarations.

I really appreciate the help!

init.el code:

;---------key bindings---------------------------

(define-key global-map "\C-cc" 'org-capture)

;--------------org mode----------------------------
(desktop-save-mode 1)
(setq org-agenda-files '(""))
(setq org-agenda-files
  (mapcar 'abbreviate-file-name
      (split-string
    (shell-command-to-string "find ~/Tresors/Personal/org-mode -name \"*.org\"") "\n")))
(setq line-spacing '0.25)
(setq org-log-done 'time)
(setq org-default-notes-file (concat "~/Tresors/Personal/org-mode/notes.org"))
(setq org-journal-dir "~/Tresors/Personal/journal/"); note, org mode takes CcCj, CcCf,CcCb (i think as mode specific only, but fyi incase universal)
(setq org-startup-indented t)
(setq org-hide-leading-stars t)

1 Answer 1

6

solved my problem myself.

First, I had duplicate setq org-agenda-files, which obviously isn't good to start with. That wasn't the core of the problem, however.

By default, org-agenda doesn't search all sub-directories for .org files, so I tried that function as a work around. For further clarification, the documentation on orgmode.org states specifically

The information to be shown is normally collected from all agenda files, the files listed in the variable org-agenda-files. If a directory is part of this list, all files with the extension .org in this directory will be part of the list.

The immediate cause of my problem was using a recursive function to search for .org files. This just caused weirdness to happen.

Solution: You can set multiple directories for the org-agenda-files variable one after the other in quotes separated only with a space, which I implemented as such:

(setq org-agenda-files '("~/Parent/Parent/org-mode/notes" "~/Parent/Parent/org-mode/to-dos" "~/Parent/Parent/org-mode/references"))

All directories are now accounted for and are showing their relevant tasks on my agenda without duplicates! Hope this helps anyone else who bumps into the same silly mistake.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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