From: "Herbert Euler" <herberteuler@hotmail.com>
Cc: viniciusjl@ig.com.br, rms@gnu.org, drew.adams@oracle.com
Subject: FW: On the Printing Problem
Date: Wed, 01 Nov 2006 14:00:25 +0800 [thread overview]
Message-ID: <BAY119-F433F68A9F68419D19F0ACDAF80@phx.gbl> (raw)
>From: Vinicius Jose Latorre <viniciusjl@ig.com.br>
>To: Herbert Euler <herberteuler@hotmail.com>
>CC: rms@gnu.org, emacs-devel@gnu.org
>Subject: Re: Icicles, Printing and Easy Menu
>Date: Wed, 01 Nov 2006 03:08:05 -0200
>
>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.
I tried that, the evaluation of (pr-update-menus t) failed again.
Below is what I wrote to Drew.
Regards,
Guanpeng Xu
>From: "Herbert Euler" <herberteuler@hotmail.com>
>To: drew.adams@oracle.com
>CC: herberteuler@hotmail.com
>Subject: On the Printing Problem
>Date: Tue, 31 Oct 2006 11:26:21 +0800
>
>Hello,
>
>Here is my conclusion on the problem arised when I mixed Icicles and
>Printing.
>
>This problem is arised because Icicles mode rebinds the key bindings
>in a way that is not robust in all aspects. In file
>`icicles-mode.el', Icicles mode rebinds many key bindings with
>`substitute-key-definition'. Let's see what
>`substitute-key-definition' does. As in your mail to the emacs-devel
>mailing list, we evaluate some forms:
>
>(defvar foo-map (make-sparse-keymap) "")
>==> foo-map
>
>(substitute-key-definition 'find-file
> 'find-file-literally
> foo-map
> global-map)
>==> nil
>
>foo-map
>==> (keymap
> (open . find-file-literally)
> (menu-bar keymap
> (file keymap
> (new-file menu-item "Visit New File..."
>find-file-literally
> ([24 6]
> . " (C-x C-f)")
> :enable
> (menu-bar-non-minibuffer-window-p)
> :help "Specify a new file's name, to edit
>the file")))
> (24 keymap
> (6 . find-file-literally)))
>
>As you see, `substitute-key-definition' copies the entries that with
>`find-file' in their bindings in `global-map' into `foo-map' and
>substitutes `find-file' with `find-file-literally'.
>
>Icicles mode copies the entries in `global-map' in the same way.
>After that, by enabling Icicles mode, `icicle-mode-map' becomes active
>to all of the visible buffers. `icicle-mode-map' is a minor mode
>keymap, so it will shadow `global-map'.
>
>When the user invokes `(pr-update-menus t)', Printing tries to update
>Emacs' menu with `easy-menu-change'. This will finally cause
>`easy-menu-get-map' get invoked. We have found that
>`easy-menu-get-map' will pick up all maps but pick the global map
>last. Since Icicles mode already shadows the global map with its
>`icicle-mode-map', a wrong entry is picked by `easy-menu-get-map', and
>so Printing complains. (In fact, `easy-menu-get-map' tries to find
>the entry with `menu-bar' first.)
>
>The purpose of `icicle-mode-map' is to rebind key bindings. But there
>is another way to do this, without making other packages signaling
>errors. Please take a look at (info "(elisp) Remapping Commands").
>The other packages that try to provide similar completion features,
>such as `ido', accomplish in this way actually. The function
>`ido-mode' in file `lisp/ido.el' is an example of using the remapping
>feature.
>
>Regards,
>Herbert
>
>_________________________________________________________________
>Get FREE company branded e-mail accounts and business Web site from
>Microsoft Office Live
>http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/
>
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
next reply other threads:[~2006-11-01 6:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-01 6:00 Herbert Euler [this message]
2006-11-02 21:54 ` On the Printing Problem Drew Adams
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BAY119-F433F68A9F68419D19F0ACDAF80@phx.gbl \
--to=herberteuler@hotmail.com \
--cc=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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).