Subject: Re: bug#54905: Allow in tabulated lists to resize columns with the mouse

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 15 Apr 2022 12:06:38 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> And the divider could definitely be
> draggable (and I'll do that now), but in most setups the divider will
> only be a couple of pixels wide, making dragging it very difficult.

Here's the test vtable I'm twiddling now (you need an up-to-date trunk
to make it work).  You can drag the divider, but it's so narrow that
it's very annoying to attempt to do so...

(defun test-vtable ()
  (when (get-buffer "*vtable*")
    (kill-buffer "*vtable*"))
  (switch-to-buffer "*vtable*")
  (setq truncate-lines t)
  (special-mode)
  (let ((inhibit-read-only t))
    (make-vtable
     :columns '((:name "Name" :width 20) "Size" "File")
     :objects (buffer-list)
     :row-colors '((:background "#303030" :foreground "#ffffff")
		   (:background "#505050" :foreground "#808080"))
     :column-colors '((:background "#202020" :foreground "#00ffff")
		      (:background "#808080" :foreground "#008080"))
     :divider-width 0.1
     :getter (lambda (object column vtable)
               (pcase (vtable-column vtable column)
		 ("Name" (buffer-name object))
		 ("Size" (buffer-size object))
		 ("File" (or (buffer-file-name object) "")))))
    nil))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no