kilka poprawek i dodane makro

This commit is contained in:
pali112 2025-01-14 18:03:51 +01:00
parent 27f918b2e2
commit d2ed4e7136
1 changed files with 40 additions and 3 deletions

43
init.el
View File

@ -59,6 +59,14 @@ Missing packages are automatically installed."
(winum-mode)) (winum-mode))
;; ----------------------------
;; Konfiguracja yasnippet
;; ----------------------------
(use-package yasnippet (use-package yasnippet
:ensure t :ensure t
:config :config
@ -71,6 +79,7 @@ Missing packages are automatically installed."
;; ---------------------------- ;; ----------------------------
;; Konfiguracja org-mode ;; Konfiguracja org-mode
;; ---------------------------- ;; ----------------------------
@ -329,8 +338,7 @@ Missing packages are automatically installed."
"o r" 'org-clock-report "o r" 'org-clock-report
"g a" 'magit-remote-add "g a" 'magit-remote-add
"f f" 'find-file "f f" 'find-file
"b b" 'switch-to-buffer "b l" 'ibuffer
"b m" 'buffer-menu
"b w" 'buffer-menu-open "b w" 'buffer-menu-open
"t t" 'treemacs "t t" 'treemacs
"t a" 'treemacs-add-project-to-workspace "t a" 'treemacs-add-project-to-workspace
@ -414,7 +422,7 @@ Missing packages are automatically installed."
:ensure t :ensure t
:hook (python-mode . blacken-mode) :hook (python-mode . blacken-mode)
:config :config
(setq blacken-line-length 75)) (setq blacken-line-length 88))
;; ---------------------------- ;; ----------------------------
@ -461,3 +469,32 @@ Missing packages are automatically installed."
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
) )
(put 'narrow-to-region 'disabled nil) (put 'narrow-to-region 'disabled nil)
;; ----------------------------
;; Moje makra
;; ----------------------------
(defun build123d ()
"Automatyzacja workflow: uruchomienie Jupyter Lab, OCP VSCode i konfiguracja REPL."
(interactive)
;; Przejdź do pliku simrig.py
(find-file "~/Dokumenty/simrig2/simrig.py") ;; Zmień na poprawną ścieżkę do pliku
;; Otwórz eshell 1 i uruchom Jupyter Lab
(eshell 1)
(insert "jupyter lab")
(eshell-send-input)
;; Przejdź do eshell 2 i uruchom Python -m ocp_vscode
(eshell 2)
(insert "python -m ocp_vscode")
(eshell-send-input)
;; Powróć do pliku simrig.py
(find-file "~/Dokumenty/simrig2/simrig.py")
;; Uruchom jupyter-run-server-repl i pozwól użytkownikowi potwierdzić wartości interaktywnie
(call-interactively 'jupyter-run-server-repl)
;; Powróć do pliku simrig.py
(find-file "~/Dokumenty/simrig2/simrig.py")
;; Przypisz bufor do Jupyter REPL
(call-interactively 'jupyter-repl-associate-buffer))