add to play button python buffer execution

This commit is contained in:
2026-04-08 20:11:54 +02:00
parent bf53e5cb45
commit 2f249d0979
2 changed files with 12 additions and 6 deletions

View File

@@ -2402,7 +2402,7 @@ a:link::selection, a:link::-moz-selection {
:package-version '(Org . "8.0")
:type 'string)
;;;###autoload
(put 'org-html-head 'safe-local-variable 'stringp)
(put 'my-org-article-html-head 'safe-local-variable 'stringp)
;;; Export functions
@@ -2425,6 +2425,7 @@ a:link::selection, a:link::-moz-selection {
(org-export-to-file 'article-html file async subtreep
visible-only body-only ext-plist)))
;;;###autoload
(defun my-org-article-help ()
"Open the `my-org-article' manual."
(interactive)

View File

@@ -179,11 +179,16 @@
(defun my-tool-bar-function-play (event)
"Run `C-c'."
(interactive "e")
(let ()
(pcase major-mode
('org-mode (org-ctrl-c-ctrl-c))
('python-mode
(pcase (car event)
('double-down-mouse-1
(run-python)
(my-python-shell-send-buffer-w-main))
(_ (my-python-shell-send-buffer-w-main))))
(_ (message "%s: %s" "not defined for this major-mode"
major-mode)) )))
major-mode)) ) )
(defvar my-tool-bar-button-play "Cc "
"Button to run `C-c'.")