aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2025-02-15 23:11:24 +0100
committerOscar Najera <hi@oscarnajera.com>2025-02-15 23:11:24 +0100
commit05e326ec99e895d83e68965366551fbca7c592da (patch)
treef95b6a421c74d91b87dc73b672719e9b521952f7
parent81468c846507642b70695cec19eca513ae861775 (diff)
downloaddotfiles-05e326ec99e895d83e68965366551fbca7c592da.tar.gz
dotfiles-05e326ec99e895d83e68965366551fbca7c592da.tar.bz2
dotfiles-05e326ec99e895d83e68965366551fbca7c592da.zip
[FIX] vtable correctl load time
-rw-r--r--config/doom/config.org53
1 files changed, 27 insertions, 26 deletions
diff --git a/config/doom/config.org b/config/doom/config.org
index d7c92ce..b9773ce 100644
--- a/config/doom/config.org
+++ b/config/doom/config.org
@@ -139,32 +139,33 @@ Because I always need help and it should come up quickly
** Fixes
#+begin_src emacs-lisp
;; this imports fixes of emacs 30
-(defun vtable-beginning-of-table ()
- "Go to the start of the current table."
- (if (or (text-property-search-backward 'vtable (vtable-current-table) #'eq)
- (get-text-property (point) 'vtable))
- (point)
- (goto-char (point-min))))
-
-(defun vtable-end-of-table ()
- "Go to the end of the current table."
- (if (text-property-search-forward 'vtable (vtable-current-table) #'eq)
- (point)
- (goto-char (point-max))))
-
-;; This is my own fix
-(defun vtable-header-line-sort (e)
- "Sort a vtable from the header line."
- (interactive "e")
- (let* ((pos (event-start e))
- (obj (posn-object pos)))
- (with-current-buffer (window-buffer (posn-window pos))
- (vtable-beginning-of-table) ;; This line is the fix
- (vtable-goto-column
- (get-text-property (if obj (cdr obj) (posn-point pos))
- 'vtable-column
- (car obj)))
- (vtable-sort-by-current-column))))
+(after! vtable
+ (defun vtable-beginning-of-table ()
+ "Go to the start of the current table."
+ (if (or (text-property-search-backward 'vtable (vtable-current-table) #'eq)
+ (get-text-property (point) 'vtable))
+ (point)
+ (goto-char (point-min))))
+
+ (defun vtable-end-of-table ()
+ "Go to the end of the current table."
+ (if (text-property-search-forward 'vtable (vtable-current-table) #'eq)
+ (point)
+ (goto-char (point-max))))
+
+ ;; This is my own fix
+ (defun vtable-header-line-sort (e)
+ "Sort a vtable from the header line."
+ (interactive "e")
+ (let* ((pos (event-start e))
+ (obj (posn-object pos)))
+ (with-current-buffer (window-buffer (posn-window pos))
+ (vtable-beginning-of-table) ;; This line is the fix
+ (vtable-goto-column
+ (get-text-property (if obj (cdr obj) (posn-point pos))
+ 'vtable-column
+ (car obj)))
+ (vtable-sort-by-current-column)))))
#+end_src
* Dictionary
#+begin_src emacs-lisp :tangle "packages.el"