Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placing cursor on top of group heading changes the keymap and replaces the org-agenda buffer with a calendar when pressed j both on Spacemacs and Doom Emacs #239

Closed
onurcanbektas opened this issue Jan 15, 2023 · 3 comments

Comments

@onurcanbektas
Copy link

onurcanbektas commented Jan 15, 2023

Here is the steps that I take:

  1. Open org-agenda
    1
  2. Move to the next line with j
    image
  3. Now I press j again and the org-agenda buffer is replaced with a calendar.
    3
    And when I mean "replaced", I mean the content of the org-agenda buffer has changed. The calendar on the picture is just text that I can modify and delete. When I look at the command logs, I see that once the cursor is on top of the group heading (Research in this case), the active keymap changes also. That is why pressing j` doesn't make the cursor move to the next line.

I have the same problem both in Spacemacs and Doom emacs.
Here are my config files for the doom emacs.


(add-hook 'org-agenda-mode-hook 'evil-org-agenda-mode)
(use-package! org-super-agenda
  :after org-agenda
  :init
  (setq org-agenda-files '("~/junction/brain/todo.org"
                           "~/junction/brain/todo.proj_axolotl_rulands_yun.org"
                           "~/junction/brain/todo.proj_smarticles_rulands.org"
                           "~/junction/brain/todo.proj_reversible_graining_bektas.org"))
  (defun my-redo-all-agenda-buffers ()
    (interactive)
    (dolist (buffer (buffer-list))
      (with-current-buffer buffer
        (when (derived-mode-p 'org-agenda-mode)
          (org-agenda-redo t)))))
  (setq org-todo-sort-order '("INTR" "PROG" "NEXT" "TODO" "WAITING" "DONE"))
  (defun my:user-todo-sort (a b)
    "Sort todo based on which I want to see first"
    (when-let ((state-a (get-text-property 14 'todo-state a))
               (state-b (get-text-property 14 'todo-state b))
               (cmp (--map (cl-position-if (lambda (x)
                                             (equal x it))
                                           org-todo-sort-order)
                           (list state-a state-b))))
      (cond ((apply '> cmp) 1)
            ((apply '< cmp) -1)
            (t nil))))
  (setq org-agenda-cmp-user-defined 'my:user-todo-sort)
  (setq org-agenda-sorting-strategy '(user-defined-up))

  (setq org-agenda-time-grid
        '((daily today require-timed)
          ()
          "......"
          "------"
          ))
  (setq org-agenda-skip-scheduled-if-done t)
  (setq org-agenda-skip-deadline-if-done t)
  (setq org-agenda-include-deadlines t)
  (setq org-agenda-include-diary t)
  (setq org-agenda-block-separator nil)
  (setq org-agenda-compact-blocks t)
  (setq org-agenda-start-with-log-mode t)
  (setq org-agenda-log-mode-items '(closed clock state))
  (setq org-agenda-span 'day)

  (setq org-agenda-custom-commands
        '(("q" "Super zaen view"
           ((agenda "" ((org-agenda-span 'day)
                        (org-super-agenda-groups
                         '((:name "Today"
                            :time-grid t
                            :date today
                            :todo "TODAY"
                            :scheduled today
                            :order 1)
                           (:name "Future scheduled"
                            :scheduled future
                            :order 3)
                           (:name "Future deadline"
                            :deadline future
                            :order 4)
                           (:name "Overdue"
                            :deadline past
                            :order 2)
                           ))))
            (alltodo "" ((org-agenda-overriding-header "")
                         (org-super-agenda-groups
                          '((:name "Next to do"
                             :todo "next"
                             :priority "A"
                             :order 3)
                            (:name "Now"
                             :tag "now"
                             :priority "A"
                             :order 2)
                            (:name "Ideas"
                             :tag "idea"
                             :priority "B"
                             :order 9)
                            (:name "To read"
                             :tag "read"
                             :order 27)
                            (:name "Organisational work"
                             :tag "organisational"
                             :order 12)
                            (:name "Write down"
                             :tag "write"
                             :order 20)
                            (:name "Meetings"
                             :tag "meeting"
                             :order 30)
                            (:name "question"
                             :tag "question"
                             :order 10)
                            (:name "Research"
                             :tag "research"
                             :order 4)
                            (:name "Paper work"
                             :tag "paperwork"
                             :order 60)
                            (:name "trivial"
                             :priority<= "C"
                             :tag ("trivial" "unimportant")
                             :todo ("SOMEDAY")
                             :order 90)
                            (:discard (:tag ("Chore" "Routine" "Daily")))))))))))

  :config
  (org-super-agenda-mode)

  )

(defun toggle-window-dedicated ()
  "Toggle whether the current active window is dedicated or not"
  (interactive)
  (message
   (if (let (window (get-buffer-window (current-buffer)))
         (set-window-dedicated-p window
                                 (not (window-dedicated-p window))))
       "Window '%s' is dedicated"
     "Window '%s' is normal")
   (current-buffer)))


@onurcanbektas onurcanbektas changed the title Placing cursor on top of group keyworsd changes the keymap and replaces the org-agenda buffer with a calendar both on Spacemacs and Doom Emacs Placing cursor on top of group heading changes the keymap and replaces the org-agenda buffer with a calendar when pressed j both on Spacemacs and Doom Emacs Jan 15, 2023
@alphapapa
Copy link
Owner

The issue you're reporting is the responsibility of Doom, Spacemacs, and/or your personal configuration, not this package. See also the package evil-collection.

@FrostyX
Copy link

FrostyX commented Jan 20, 2023

I was dealing with same issue just yesterday and found @alphapapa's suggestion from som other discussion:

(setq org-super-agenda-header-map (make-sparse-keymap))

Worked perfectly.

@onurcanbektas
Copy link
Author

@FrostyX ah thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants