update my-view-python

This commit is contained in:
2024-05-06 16:50:56 +02:00
parent 8b80ceda39
commit 156cec64fb
5 changed files with 2916 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<?xml-stylesheet href="latex-MnixaZ.css" type="text/css"?>
<?xml-stylesheet href="latex-qJ80sK.css" type="text/css"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="408.1542pt" height="191.8542pt" viewBox="-42.77742 -43.03674 408.1542 191.8542 ">
<g transform="translate(0, 148.81746 ) scale(1,-1) translate(0,43.03674 )">
<g stroke="#000" fill="#000">

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

2865
lisp/my/my-org-article.html Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -3,27 +3,59 @@
;;; Commentary:
;;; Code:
(defun my-view-python ()
"Three windows.
On the right side a *Anaconda* buffer with optionally
`virtual-auto-fill-mode' active and a *Python* buffer."
"Python IDE like view.
Language Server Support, Emacs built-in package `eglot'
Language Server Protocol, python package `python-lsp-server'
- install e.g. with: pip install \"python-lsp-server[all]\"
Syntax Checking, Emacs built-in package `flymake'
Four windows:
- left: file
- right
- top: help (`eldoc')
- middle: cross-references (`xref')
- bottom: python shell
"
(interactive)
(require 'python)
(unless (get-buffer (concat "*" python-shell-buffer-name "*"))
(run-python) ;; cursor is now inside the python buffer.
(other-window -1))
;; first make visiting file full and run eglot
(delete-other-windows)
(eglot-ensure)
;; split horizontal 0.6 - 0.4
(split-window-horizontally (truncate (* 0.6 (window-body-width))))
(other-window 1)
(switch-to-buffer (concat "*" python-shell-buffer-name "*"))
(switch-to-buffer (eldoc-doc-buffer))
(other-window -1)
)
(split-window-vertically) ;; both are python buffers now.
(switch-to-buffer "*Anaconda*")
(when (fboundp 'virtual-auto-fill-mode) (virtual-auto-fill-mode))
(other-window -1))
;; python old using anaconda
;; (defun my-view-python ()
;; "Three windows.
;; On the right side a *Anaconda* buffer with optionally
;; `virtual-auto-fill-mode' active and a *Python* buffer."
;; (interactive)
;; (require 'python)
;; (unless (get-buffer (concat "*" python-shell-buffer-name "*"))
;; (run-python) ;; cursor is now inside the python buffer.
;; (other-window -1))
;; (delete-other-windows)
;; (split-window-horizontally (truncate (* 0.6 (window-body-width))))
;; (other-window 1)
;; (switch-to-buffer (concat "*" python-shell-buffer-name "*"))
;; (split-window-vertically) ;; both are python buffers now.
;; (switch-to-buffer "*Anaconda*")
;; (when (fboundp 'virtual-auto-fill-mode) (virtual-auto-fill-mode))
;; (other-window -1))
(defun my-view-elisp ()
"Two windows side-by-side.

View File

@@ -115,6 +115,11 @@
*Export LaTeX* [[help:org-latex-remove-logfiles][Logfiles are removed]] (deactivate for debugging)
*Python*
IDE view ........ [[help:my-view-python][my-view-python]]
*Elisp*
[[help:eval-expression][Evaluate expression]] ........ =M-:= [[help:forward-sexp][Jump to next expression]] .. =C-M-f=

View File

@@ -10,7 +10,7 @@
;; https://github.com/joaotavora/eglot
;; connects to LSP
;; activate with `eglot'
;; after changing comfigurations run `eglot-reconnect'
;; after changing configurations run `eglot-reconnect'
;; follow documentation at point `eldoc-doc-buffer'
;; Language Server Protocol (LSP), python package `python-lsp-server'