[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why some keys cannot be used to extend tabulated-list-mode-map?
From: |
Jean Louis |
Subject: |
Why some keys cannot be used to extend tabulated-list-mode-map? |
Date: |
Mon, 19 Apr 2021 15:24:32 +0300 |
I have particular problem that last for months. Here is the minimized
problem:
(defvar rcd-db-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map tabulated-list-mode-map)
(define-key map (kbd "e") #'(lambda () (interactive)
(rcd-db-tabulated-edit-entry rcd-db-edited-table)))
(define-key map (kbd "d") #'(lambda () (interactive) (rcd/delete-entry
rcd-db-edited-table (tabulated-list-get-id) *cf* t)
(tabulated-list-delete-entry)))
(define-key map (kbd "g") #'rcd-tabulated-refresh) ;; problem is with g and
h
map)
"The basic RCD database keymap")
(defun rcd-db-report (title entries format table sort-key &optional refresh)
(let* ((buffer (generate-new-buffer-name (concat "RCD Database: " title))))
(let* ((buffer (get-buffer-create buffer))
(mode-map (rcd-db-table-mode-map table)))
(if (string-equal table "edit")
(switch-to-buffer buffer)
(switch-to-buffer-other-window buffer))
;;(delete-other-windows)
(setq tabulated-list-format format)
(setq tabulated-list-entries entries)
(setq rcd-db-edited-table table)
(setq rcd-tabulated-refresh-function refresh)
(rcd-db-list-mode)
(use-local-map mode-map) ;; here is where the above one is called
inirectly
(setq rcd-current-table table)
(tabulated-list-init-header)
(setq tabulated-list-padding 1))
(setq tabulated-list-sort-key sort-key)
;;(tabulated-list-init-header)
(tabulated-list-print t)))
Problem is with "g" and "h" sometimes so far. I define them, but those don't
work.
I think that something else sets those keys during
initialization.
Maybe somebody knows why?
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
https://rms-support-letter.github.io/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Why some keys cannot be used to extend tabulated-list-mode-map?,
Jean Louis <=