unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Why some keys cannot be used to extend tabulated-list-mode-map?
@ 2021-04-19 12:24 Jean Louis
  0 siblings, 0 replies; only message in thread
From: Jean Louis @ 2021-04-19 12:24 UTC (permalink / raw)
  To: Help GNU Emacs

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/





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-19 12:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-19 12:24 Why some keys cannot be used to extend tabulated-list-mode-map? Jean Louis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).