all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Cc: viniciusjl@ig.com.br, rms@gnu.org
Subject: RE: On the Printing Problem
Date: Thu, 2 Nov 2006 13:54:26 -0800	[thread overview]
Message-ID: <EIENLHALHGIMHGDOLMIMOEGHCMAA.drew.adams@oracle.com> (raw)
In-Reply-To: <BAY119-F433F68A9F68419D19F0ACDAF80@phx.gbl>

> >From: Vinicius Jose Latorre <viniciusjl@ig.com.br>
> >For some reason the command:
> >   (easy-menu-change '("file") "Print" pr-menu-spec "print-buffer")
> >has no effect just after step 5.
> >The command above is correct, but has no effect, that is,
> >"Print" submenu is not created.
> >
> >But if after step 5, you do:
> >    5.1 C-h v global-map RET    ;; create *Help* buffer in another window
> >    5.2 C-x o                                 ;; switch to *Help* buffer
> >Now, all works.

Yes, there seems to be a bug there.

> Herber Euler wrote:
> I tried that, the evaluation of (pr-update-menus t) failed again.
>
> Below is what I wrote to Drew.
> >...
> >Please take a look at (info "(elisp) Remapping Commands").

As I replied to Herbert off list, Icicles does also use command remapping,
where appropriate. There is no equivalent of the OLDMAP arg to
substitute-key-definition for command remapping, and that is what is used
here. Icicles simply creates another keymap that has a particular entry in
the File menu. Whether Icicles adds that menu item to menu File (in the
minor-mode map) using substitute-key-definition or some other way is
irrelevant. This is not a problem with Icicles.

The problem occurs because printing.el runs into that minor-mode map, not
the global-map, when trying to look something up in submenu File > Print. It
should not make any assumptions about which minor-mode and local keymaps
might exist when it tries to look up submenu File > Print. It cannot simply
add the Print submenu to only the global map and then traverse each active
keymap (global-map last) expecting submenu Print to be found under menu File
for each map. It should look only in the keymap(s) where it actually added
submenu Print. If it added Print to the File menu of all existing maps, then
it could look in all existing maps. (I don't claim that it should add Print
to File in all maps; I claim only that it should not look for Print where it
has never placed Print.)

      reply	other threads:[~2006-11-02 21:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-01  6:00 FW: On the Printing Problem Herbert Euler
2006-11-02 21:54 ` Drew Adams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EIENLHALHGIMHGDOLMIMOEGHCMAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=rms@gnu.org \
    --cc=viniciusjl@ig.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.