组织模式:折叠问题(在当前行上找不到匹配的项目)



我在macOS(brew bark Emacs mac-spacemacs图标(上使用Emacs(doom Emacs(时遇到了一个奇怪的问题:我偶尔无法折叠标题。我可以展开它,然后显示它的子项,然而,当我尝试折叠它时,我会收到消息"在当前行上找不到匹配的项目"。有时,在切换到另一个应用程序并返回选项卡后,它会再次工作,当我按下Tab键时,消息行显示"FOLDED"one_answers"CHILDREN"。

它也适用于某些组织文件,但不适用于其他组织文件。我不知道他们之间有什么区别。

我刚刚意识到,当我有一个不活动的时间戳作为标题时,按一次tab键会显示孩子们,但再按一次只会在括号之间跳跃。。。

这是我的配置:

;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones:
;;
;; + `doom-font'
;; + `doom-variable-pitch-font'
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
;;   presentations or streaming.
;;
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
;; font string. You generally only need these two:
(setq doom-font (font-spec :family "Meslo LG M for Powerline"
:size 12))
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-gruvbox)
;; Enable visual line mode per default for text files
(add-hook! 'text-mode-hook 'turn-on-visual-line-mode)
;; Enable org-autolist
(add-hook 'org-mode-hook (lambda () (org-autolist-mode)))
;; Org mode configuration
(setq org-directory "~/org")
(setq org-default-clock-file (concat org-directory "/clock.org"))
(after! org
(setq org-agenda-files (list org-directory))
(setq org-default-notes-file (concat org-directory "/inbox.org"))
(setq org-task-file (concat org-directory "/tasks.org"))
(setq org-log-into-drawer t)
(setq org-log-done nil)
(setq org-image-actual-width (/ (display-pixel-width) 3))
(setq org-todo-keywords
'((sequence "TODO(t)" "IN-PROGRESS(i!)" "WAITING(@w)" "|"
"DONE(d!)" "CANCELED(@c)")))
(setq org-todo-keyword-faces
'(
("TODO" . (:foreground "#fb4933" :weight bold))
("IN-PROGRESS" . (:foreground "#fabd2f" :weight bold))
("WAITING" . (:foreground "#fe8019" :weight bold))
("DONE" . (:foreground "#8ec07c" :weight bold))
("CANCELED" . (:foreground "#83a598" :weight bold))
)
)
(setq org-capture-templates
`(("r" "Weekly report" entry (file+headline org-default-clock-file "Clock")
,(concat "** Woche %<%V>n"
"*** Gesamtn"
"#+BEGIN: clocktable :scope agenda :maxlevel 20 :block 2020-W%<%V> :step week :stepskip0 tn"
"#+END:n"
"*** Tagen"
"#+BEGIN: clocktable :scope agenda :maxlevel 20 :block 2020-W%<%V> :step day :stepskip0 tn"
"#+END:"
)
)))
(setq org-startup-indented t)
(setq org-clock-persist 'history)
(org-clock-persistence-insinuate)
(setq org-duration-format (quote h:mm))
(setq org-refile-targets '((org-agenda-files :maxlevel . 10)))
(setq org-goto-interface 'outline-path-completion)
(defvar org-created-property-name "CREATED"
"The name of the org-mode property that stores the creation date of the entry")
(defun org-set-created-property (&optional active NAME)
"Set a property on the entry giving the creation time.
By default the property is called CREATED. If given the `NAME'
argument will be used instead. If the property already exists, it
will not be modified."
(interactive)
(let* ((created (or NAME org-created-property-name))
(fmt (if active "<%s>" "[%s]"))
(now  (format fmt (format-time-string "%Y-%m-%d %a %H:%M"))))
(unless (org-entry-get (point) created nil)
(org-set-property created now))))
;; Key mappings
(map! :leader
(:prefix ("o" . "org")
:desc "Goto"                      "g" 'org-goto
:desc "Insert inactive timestamp" "!" 'org-time-stamp-inactive
:desc "Update dynamic block"      "u" 'org-dblock-update
:desc "Todo list"                 "t" 'org-todo-list
:desc "Agenda"                    "a" 'org-agenda
:desc "Tag search"                "m" 'org-tags-view
:desc "Search org headlines"      "h" #'+default/org-notes-headlines
:desc "Search org files"          "s" #'+default/org-notes-search
:desc "Refile"                    "r" 'org-refile
:desc "Browse notes"              "f" #'+default/browse-notes
:desc "Search notes for symbol"   "." #'+default/search-notes-for-symbol-at-point
:desc "Org capture"               "n" #'org-capture
(:prefix ("c" . "clock")
:desc "Clock in" "i" 'org-clock-in
:desc "Clock out" "o" 'org-clock-out
:desc "Jump to last clock" "l" (lambda () (interactive) (setq current-prefix-arg '(4)) (org-clock-goto))
:desc "Jump to active clock" "j" 'org-clock-goto)
(:prefix ("p" . "properties")
:desc "Set CREATED property"      "c" 'org-set-created-property)
))
)
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t)
;; Key unmappings
(map! :leader "n" nil)
(map! :leader "o" nil)

由于与邪恶的跳跃项目。我通过重新绑定标签修复了它:

(map! :after evil-org
:map org-mode-map
:desc "org-cycle" :n [tab] #'org-cycle)

最新更新