From dce296f4df30db2388e5ac883750fe7e7308af6d Mon Sep 17 00:00:00 2001 From: Rafal Date: Wed, 7 May 2025 10:17:17 +0200 Subject: [PATCH] Pare poprawek --- init.el | 118 ++++++++++++++++++++------------------------------------ 1 file changed, 42 insertions(+), 76 deletions(-) diff --git a/init.el b/init.el index 93c07a4..53ad2b2 100644 --- a/init.el +++ b/init.el @@ -622,6 +622,9 @@ Missing packages are automatically installed." "l n" 'display-line-numbers-mode "j s" 'jupyter-run-server-repl "j a" 'jupyter-repl-associate-buffer + "p s" 'run-python + "p b" 'python-shell-send-buffer + "p r" 'python-shell-send-region "s r" 'query-replace "e l" 'flycheck-list-errors "n n" 'narrow-to-region @@ -646,6 +649,7 @@ Missing packages are automatically installed." " s" "Search&Replace" " o" "Org" " m" "Macro" + " p" "Python" ) @@ -820,93 +824,55 @@ Missing packages are automatically installed." - ;; (defun build123d () - ;; "Automatyzacja workflow: uruchomienie Jupyter Lab, OCP VSCode i konfiguracja REPL." - ;; (interactive) - ;; ;; Przejdź do pliku simrig.py - ;; (let ((file-path (if (eq system-type 'windows-nt) - ;; ;; "C:/Users/paluc/OneDrive/Dokumenty/simrig2/simrig.py" - ;; ;; "C:/Users/paluc/OneDrive/Dokumenty/frezarka/frezarka.py" - ;; "C:/Users/paluc/OneDrive/Dokumenty/Box_Arduino_Adrian/box.py" - ;; ;; "C:/Users/paluc/OneDrive/Dokumenty/uchwytBaterii/uchwyt.py" - ;; ;; "/home/pali112/Dokumenty/simrig2/simrig.py" - ;; ;; "/home/pali112/Dokumenty/Uchwyt_Myszki/uchwyt.py" - ;; ;; "/home/pali112/Dokumenty/Box_Adriana/box.py" - ;; ;; "/home/pali112/Dokumenty/Box_Adriana_Arduino/box.py" - ;; "/home/pali112/Dokumenty/ipadFreecad/ipad.py" - ;; ;; "/home/pali112/Dokumenty/uchwyt_baterii/uchwyt.py" - - ;; ))) - - - ;; (find-file file-path) - ;; ;; Otwórz eshell 1 i uruchom Jupyter Lab - ;; (let ((eshell-buffer-name "*eshell-1*")) - ;; (eshell 1)) - ;; (sleep-for 1) ;; Czekaj na aktywację pipenv shell - ;; (evil-insert-state) - ;; (insert "jupyter lab") - ;; (eshell-send-input) - ;; (sleep-for 1) ;; Czekaj na aktywację pipenv shell - ;; ;; Przejdź do eshell 2 i uruchom Python -m ocp_vscode - ;; (let ((eshell-buffer-name "*eshell-2*")) - ;; (eshell)) - ;; (sleep-for 1) ;; Czekaj na aktywację pipenv shell - ;; (evil-insert-state) - ;; (insert "python -m ocp_vscode") - ;; (eshell-send-input) - ;; (sleep-for 1) ;; Czekaj na aktywację pipenv shell - ;; ;; Powróć do pliku simrig.py - ;; (find-file file-path) - ;; ;; Uruchom jupyter-run-server-repl i pozwól użytkownikowi potwierdzić wartości interaktywnie - ;; (call-interactively 'jupyter-run-server-repl) - ;; (sleep-for 1) ;; Czekaj na aktywację pipenv shell - ;; (find-file file-path) - ;; (call-interactively 'jupyter-repl-associate-buffer) - ;; ;; Otwórz stronę w przeglądarce - ;; (browse-url "http://localhost:3939/viewer"))) - - - - - -(defun build123d () + (defun build123d () "Automatyzacja workflow: uruchomienie Jupyter Lab, OCP VSCode i konfiguracja REPL." (interactive) - (let ((path "/home/pali112/Dokumenty/ipadFreecad/ipad.py")) ; <-- wpisz tu dowolną ścieżkę - - ;; Otwórz plik - (find-file path) + ;; Przejdź do pliku simrig.py + (let ((file-path (if (eq system-type 'windows-nt) + ;; "C:/Users/paluc/OneDrive/Dokumenty/simrig2/simrig.py" + ;; "C:/Users/paluc/OneDrive/Dokumenty/frezarka/frezarka.py" + "C:/Users/paluc/OneDrive/Dokumenty/Box_Arduino_Adrian/box.py" + ;; "C:/Users/paluc/OneDrive/Dokumenty/uchwytBaterii/uchwyt.py" + ;; "/home/pali112/Dokumenty/simrig2/simrig.py" + ;; "/home/pali112/Dokumenty/Uchwyt_Myszki/uchwyt.py" + ;; "/home/pali112/Dokumenty/Box_Adriana/box.py" + ;; "/home/pali112/Dokumenty/Box_Arduino_Adrian/box.py" + "/home/pali112/Dokumenty/buildtraing/bracket2.py" + ;; "/home/pali112/Dokumenty/ipadFreecad/ipad.py" + ;; "/home/pali112/Dokumenty/uchwyt_baterii/uchwyt.py" - ;; Eshell 1: Jupyter Lab + ))) + + + (find-file file-path) + ;; Otwórz eshell 1 i uruchom Jupyter Lab (let ((eshell-buffer-name "*eshell-1*")) - (eshell 1) - (sleep-for 1) - (evil-insert-state) - (insert "jupyter lab") - (eshell-send-input)) - - ;; Eshell 2: python -m ocp_vscode + (eshell 1)) + (sleep-for 1) ;; Czekaj na aktywację pipenv shell + (evil-insert-state) + (insert "jupyter lab") + (eshell-send-input) + (sleep-for 1) ;; Czekaj na aktywację pipenv shell + ;; Przejdź do eshell 2 i uruchom Python -m ocp_vscode (let ((eshell-buffer-name "*eshell-2*")) - (eshell) - (sleep-for 1) - (evil-insert-state) - (insert "python -m ocp_vscode") - (eshell-send-input)) - - ;; REPL - (sleep-for 1) - (find-file path) + (eshell)) + (sleep-for 1) ;; Czekaj na aktywację pipenv shell + (evil-insert-state) + (insert "python -m ocp_vscode") + (eshell-send-input) + (sleep-for 1) ;; Czekaj na aktywację pipenv shell + ;; Powróć do pliku simrig.py + (find-file file-path) + ;; Uruchom jupyter-run-server-repl i pozwól użytkownikowi potwierdzić wartości interaktywnie (call-interactively 'jupyter-run-server-repl) - (sleep-for 1) + (sleep-for 1) ;; Czekaj na aktywację pipenv shell + (find-file file-path) (call-interactively 'jupyter-repl-associate-buffer) - - ;; Przeglądarka + ;; Otwórz stronę w przeglądarce (browse-url "http://localhost:3939/viewer"))) - (defun remote-nadpisz () "Fetch changes from remote, reset local branch, and clean untracked files." (interactive)