Browse Source

org.el (org-speed-command-activate): Don't activate speed commands within blocks

* org.el (org-speed-command-activate): Don't activate speed
commands within blocks.

Thanks to Sébastien Vauban for reporting this.
Bastien Guerry 12 năm trước cách đây
mục cha
commit
7c8e854d9c
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      lisp/org.el

+ 5 - 1
lisp/org.el

@@ -18829,7 +18829,11 @@ If not, return to the original position and throw an error."
   "Hook for activating single-letter speed commands.
 `org-speed-commands-default' specifies a minimal command set.
 Use `org-speed-commands-user' for further customization."
-  (when (or (and (bolp) (looking-at org-outline-regexp))
+  (when (or (and (bolp) (looking-at org-outline-regexp)
+		 ;; FIXME org-speed-commands-forbidden-blocks?
+		 (not (org-in-block-p
+		       '("src" "example" "verse" "html"
+			 "latex" "ascii" "beamer" "odt"))))
 	    (and (functionp org-use-speed-commands)
 		 (funcall org-use-speed-commands)))
     (cdr (assoc keys (append org-speed-commands-user