aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2025-02-15 01:52:48 +0100
committerOscar Najera <hi@oscarnajera.com>2025-02-15 01:52:48 +0100
commit0762bf31b5ac93c4e06e145770accbe895fede9b (patch)
tree63c9500bd911a23fdb3460df69d8a8962bc8889b /config
parentc7f178c21d23b8e6b61e80cf8d3ae3662cca342e (diff)
downloaddotfiles-0762bf31b5ac93c4e06e145770accbe895fede9b.tar.gz
dotfiles-0762bf31b5ac93c4e06e145770accbe895fede9b.tar.bz2
dotfiles-0762bf31b5ac93c4e06e145770accbe895fede9b.zip
[FIX] Vtable boundaries
Diffstat (limited to 'config')
-rw-r--r--config/doom/config.org31
1 files changed, 30 insertions, 1 deletions
diff --git a/config/doom/config.org b/config/doom/config.org
index 1dd6ce9..e56dfb4 100644
--- a/config/doom/config.org
+++ b/config/doom/config.org
@@ -136,7 +136,36 @@ Because I always need help and it should come up quickly
:load-path "~/dev/dotfiles/elisp/"
:commands (delivery-track-update-dhl))
#+end_src
-
+** 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))))
+#+end_src
* Dictionary
#+begin_src emacs-lisp :tangle "packages.el"
(package! lexic)