update my-org-toggle-elements
This commit is contained in:
@@ -313,29 +313,32 @@ print it in the message buffer."
|
|||||||
;; https://emacs.stackexchange.com/questions/7375/can-i-format-cells-in-an-org-mode-table-differently-depending-on-a-formula
|
;; https://emacs.stackexchange.com/questions/7375/can-i-format-cells-in-an-org-mode-table-differently-depending-on-a-formula
|
||||||
(require 'ov)
|
(require 'ov)
|
||||||
|
|
||||||
(setq my-org-latex-preview nil)
|
(setq my-org-hide-elements nil)
|
||||||
(defun my-org-toggle-elements ()
|
(defun my-org-hide-elements ()
|
||||||
"Toggle hiding/showing of org emphasize markers."
|
"Hide org elements."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
(setq org-hide-emphasis-markers t)
|
||||||
(if org-hide-emphasis-markers
|
(setq org-link-descriptive t)
|
||||||
(set-variable 'org-hide-emphasis-markers nil)
|
|
||||||
(set-variable 'org-hide-emphasis-markers t))
|
|
||||||
(setq org-link-descriptive (not org-link-descriptive))
|
|
||||||
(org-restart-font-lock)
|
(org-restart-font-lock)
|
||||||
|
|
||||||
(org-toggle-inline-images)
|
(org-toggle-inline-images)
|
||||||
|
(org-latex-preview '(16))
|
||||||
;; (org-latex-preview)
|
(setq my-org-hide-elements t)
|
||||||
(if my-org-latex-preview
|
)
|
||||||
;; switch off
|
(defun my-org-show-elements ()
|
||||||
(let ()
|
"Show org elements."
|
||||||
(set-variable 'my-org-latex-preview nil)
|
(interactive)
|
||||||
(org-latex-preview '(64)))
|
(setq org-hide-emphasis-markers nil)
|
||||||
;; switch on
|
(setq org-link-descriptive nil)
|
||||||
(set-variable 'my-org-latex-preview t)
|
(org-restart-font-lock)
|
||||||
(org-latex-preview '(16)))
|
(org-toggle-inline-images)
|
||||||
|
(org-latex-preview '(64))
|
||||||
|
(setq my-org-hide-elements nil)
|
||||||
|
)
|
||||||
|
(defun my-org-toggle-elements ()
|
||||||
|
"Toggle hiding/showing org elements."
|
||||||
|
(interactive)
|
||||||
|
(if my-org-hide-elements (my-org-hide-elements) (my-org-show-elements))
|
||||||
|
(setq my-org-hide-elements (not my-org-hide-elements))
|
||||||
;; (org-mode-restart)
|
;; (org-mode-restart)
|
||||||
)
|
)
|
||||||
(define-key org-mode-map (kbd "C-c C-x C-e") 'my-org-toggle-elements)
|
(define-key org-mode-map (kbd "C-c C-x C-e") 'my-org-toggle-elements)
|
||||||
@@ -410,7 +413,7 @@ Used in `my-org-table-list-of-range-to-list'"
|
|||||||
(setq from-column (string-to-number (match-string 2 desc))) ;; 2nd parentheses match from string-match
|
(setq from-column (string-to-number (match-string 2 desc))) ;; 2nd parentheses match from string-match
|
||||||
(setq to-row (string-to-number (match-string 3 desc))) ;; 3rd parentheses match from string-match
|
(setq to-row (string-to-number (match-string 3 desc))) ;; 3rd parentheses match from string-match
|
||||||
(setq to-column (string-to-number (match-string 4 desc))) ;; 4th parentheses match from string-match
|
(setq to-column (string-to-number (match-string 4 desc))) ;; 4th parentheses match from string-match
|
||||||
(loop for i upfrom to-row downto from-row ;; push prepends
|
(cl-loop for i upfrom to-row downto from-row ;; push prepends
|
||||||
do
|
do
|
||||||
(cl-loop for j upfrom to-column downto from-column
|
(cl-loop for j upfrom to-column downto from-column
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user