GNU bug report logs - #50067
Context menus

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 15 Aug 2021 08:52:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #177 received at 50067 <at> debbugs.gnu.org (full text, mbox):

From: Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>
To: juri <at> linkov.net
Cc: mattiase <at> acm.org, alan <at> idiocy.org, 50067 <at> debbugs.gnu.org, larsi <at> gnus.org,
 tkk <at> misasa.okayama-u.ac.jp
Subject: Re: bug#50067: Context menus
Date: Tue, 24 Aug 2021 19:12:59 +0900 (JST)
I started to understand the system.
A plug-in to list frames would be something like this.
I think it is good to have interface to basic utilities such for
recentf and bookmarks.

(defun context-menu-frame (menu)
  "Add MENU a list of frames."
  (let (frame-map)
    (dolist (frame (visible-frame-list))
      (let ((nickname (cdr (assoc 'name (frame-parameters frame))))
            (cmd `(lambda nil (interactive) (funcall 'menu-bar-select-frame ,frame))))
        (push (vector nickname cmd :active (not (equal frame (selected-frame)))) frame-map)))
    (push ["--" ignore] frame-map)
    (push ["New" make-frame-command] frame-map)
    (setq frame-map (reverse frame-map))
    (push "Frames" frame-map)
    (easy-menu-add-item menu nil frame-map)
    menu))




This bug report was last modified 3 years and 171 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.