|
@@ -124,6 +124,7 @@ Stars are put in group 1 and the trimmed body in group 2.")
|
|
|
(declare-function org-clock-sum-current-item "org-clock" (&optional tstart))
|
|
|
|
|
|
(declare-function org-babel-tangle-file "ob-tangle" (file &optional target-file lang))
|
|
|
+(declare-function org-babel-do-in-edit-buffer "ob-core" (&rest body))
|
|
|
(declare-function orgtbl-mode "org-table" (&optional arg))
|
|
|
(declare-function org-clock-out "org-clock" (&optional switch-to-state fail-quietly at-time))
|
|
|
(declare-function org-beamer-mode "ox-beamer" ())
|
|
@@ -201,7 +202,6 @@ and then loads the resulting file using `load-file'. With prefix
|
|
|
arg (noninteractively: 2nd arg) COMPILE the tangled Emacs Lisp
|
|
|
file to byte-code before it is loaded."
|
|
|
(interactive "fFile to load: \nP")
|
|
|
- (require 'ob-core)
|
|
|
(let* ((age (lambda (file)
|
|
|
(float-time
|
|
|
(time-subtract (current-time)
|
|
@@ -19215,6 +19215,7 @@ boundaries."
|
|
|
(org-defkey org-mode-map "\C-c\C-k" 'org-kill-note-or-show-branches)
|
|
|
(org-defkey org-mode-map "\C-c#" 'org-update-statistics-cookies)
|
|
|
(org-defkey org-mode-map [remap open-line] 'org-open-line)
|
|
|
+(org-defkey org-mode-map [remap comment-dwim] 'org-comment-dwim)
|
|
|
(org-defkey org-mode-map [remap forward-paragraph] 'org-forward-paragraph)
|
|
|
(org-defkey org-mode-map [remap backward-paragraph] 'org-backward-paragraph)
|
|
|
(org-defkey org-mode-map "\C-m" 'org-return)
|
|
@@ -20502,6 +20503,13 @@ If `org-special-ctrl-o' is nil, just call `open-line' everywhere."
|
|
|
(t
|
|
|
(open-line n))))
|
|
|
|
|
|
+(defun org-comment-dwim (arg)
|
|
|
+ (interactive "*P")
|
|
|
+ "Call `comment-dwim' within a source edit buffer if needed"
|
|
|
+ (if (org-in-src-block-p)
|
|
|
+ (org-babel-do-in-edit-buffer (call-interactively #'comment-dwim))
|
|
|
+ (call-interactively #'comment-dwim)))
|
|
|
+
|
|
|
(defun org-return (&optional indent)
|
|
|
"Goto next table row or insert a newline.
|
|
|
Calls `org-table-next-row' or `newline', depending on context.
|
|
@@ -22602,9 +22610,7 @@ major mode."
|
|
|
(skip-chars-backward " \r\t\n")
|
|
|
(line-beginning-position))
|
|
|
(point))))
|
|
|
- (progn
|
|
|
- (require 'ob-core)
|
|
|
- (org-babel-do-in-edit-buffer (call-interactively #'comment-dwim)))
|
|
|
+ (org-babel-do-in-edit-buffer (call-interactively #'comment-dwim))
|
|
|
(beginning-of-line)
|
|
|
(if (looking-at "\\s-*$") (delete-region (point) (point-at-eol))
|
|
|
(open-line 1))
|
|
@@ -22628,9 +22634,7 @@ strictly within a source block, use appropriate comment syntax."
|
|
|
(skip-chars-backward " \r\t\n")
|
|
|
(line-beginning-position))
|
|
|
end)))
|
|
|
- (progn
|
|
|
- (require 'ob-core)
|
|
|
- (org-babel-do-in-edit-buffer (call-interactively #'comment-dwim)))
|
|
|
+ (org-babel-do-in-edit-buffer (call-interactively #'comment-dwim))
|
|
|
(save-restriction
|
|
|
;; Restrict region
|
|
|
(narrow-to-region (save-excursion (goto-char beg)
|