From: Yuta Yamada <cokesboy@gmail.com>
To: monnier@iro.umontreal.ca
Cc: tzz@lifelogs.com, emacs-devel@gnu.org
Subject: Re: mykie.el
Date: Sun, 12 Jan 2014 17:51:41 -0500 (EST) [thread overview]
Message-ID: <20140112.175141.574691154553523533.cokesboy@gmail.com> (raw)
In-Reply-To: <jwvmwj1yofj.fsf-monnier+emacs@gnu.org>
> > There is a problem.
> > Mew.el that is Emacs mailer check function name whether the name
> > contain self-insert-command.(http://www.mew.org/en/)
> > (I don't know how many program does check global map's function-name.)
> > If we set keybind to self-insert-command like [a-z],
> > then Mew occur an error.
> I don't understand.
Sorry my information lacked details.
Mew.el can change folder by pushing "g" key at mew-summary-mode.
(Mew binds mew-summary-goto-folder function to the "g" key)
To make sure that problem, I set following configuration:
(define-key global-map
"a" (lambda () (interactive)
(call-interactively 'self-insert-command)))
(defmacro mykie:combined-command (&rest args)
`(lambda ()
(interactive)
(mykie:core (quote ,args))))
(define-key global-map
"b" (mykie:combined-command
:default self-insert-command
:C-u (message "C-u + b")))
And then I typed "g" at mew-summary-mode after I boot mew.
And then when I typed a or b, I saw following error on minibuffer.
-- error message
mew-input-folder-self-insert: Wrong type argument: symbolp, #[nil "ÀÁ!" [call-interactively self-insert-command] 2 nil nil]
--
I extracted partial code from mew-minibuf.el, you can see full code
here: https://github.com/kazu-yamamoto/Mew/blob/master/mew-minibuf.el
--- from mew-minibuf.el ---
(defun mew-input-folder-self-insert ()
"This function normally inserts its bound key to minibuffer.
When in folder search mode, this function searches a candidate
folder and displays it in addition to its bound key."
(interactive)
(let ((key (this-command-keys))
last-str gfunc)
(cond
((stringp key)
(setq last-str key)
(setq gfunc (lookup-key (current-global-map) key)))
((vectorp key)
(setq gfunc (lookup-key (current-global-map) key))
(unless gfunc
(setq key (lookup-key function-key-map key))
(cond
((vectorp key) ;; normal Emacs
(setq gfunc (lookup-key (current-global-map) key)))
((stringp key) ;; Meadow
(setq last-str key)
(setq gfunc (lookup-key (current-global-map) key)))))))
(if mew-input-folder-search-direction
(cond
((or (equal key "\177") (equal key [127])
(equal key 'delete) (equal key 'backspace))
(if (null mew-input-folder-search-key)
(mew-input-folder-display "not allowed")
(setq mew-input-folder-search-key
(substring mew-input-folder-search-key 0 -1))
(when (string= mew-input-folder-search-key "")
(setq mew-input-folder-search-key nil)
(setq mew-input-folder-search-match nil)
(with-current-buffer mew-input-folder-search-buf
(cond
((eq mew-input-folder-search-direction 'forward)
(goto-char (point-min)))
((eq mew-input-folder-search-direction 'backward)
(goto-char (point-max))))))
(mew-input-folder-display)))
((not (string-match "self-insert-command" (symbol-name gfunc)))
(mew-input-folder-display "not allowed"))
((eq mew-input-folder-search-direction 'forward)
(setq mew-input-folder-search-key
(concat mew-input-folder-search-key last-str))
(mew-input-folder-search-forward-1))
((eq mew-input-folder-search-direction 'backward)
(setq mew-input-folder-search-key
(concat mew-input-folder-search-key last-str))
(mew-input-folder-search-backward-1)))
(cond
((null gfunc)
())
((string-match "self-insert-command" (symbol-name gfunc))
(insert last-command-event))
((and (fboundp gfunc) (commandp gfunc))
(call-interactively gfunc))))))
--- END ----
I think below part seems problem codes.
---
;; gfunc is current global-map's function
((not (string-match "self-insert-command" (symbol-name gfunc)))
(mew-input-folder-display "not allowed"))
---
Yuta
next prev parent reply other threads:[~2014-01-12 22:51 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-03 20:09 mykie.el Ted Zlatanov
2014-01-03 21:37 ` mykie.el Bozhidar Batsov
2014-01-04 1:08 ` mykie.el Yuta Yamada
2014-01-06 22:47 ` mykie.el, mykie.el Ted Zlatanov
2014-01-06 23:00 ` enable MELPA & Marmalade by defaul [was: mykie.el] Drew Adams
2014-01-06 23:42 ` Óscar Fuentes
2014-01-07 0:29 ` Drew Adams
2014-01-07 1:08 ` Eric Brown
2014-01-07 5:39 ` Drew Adams
2014-01-07 8:33 ` Nic Ferrier
2014-01-07 8:38 ` David Kastrup
2014-01-07 14:41 ` Grim Schjetne
2014-01-07 15:12 ` Stephen Berman
2014-01-07 17:44 ` Drew Adams
2014-01-07 20:55 ` Stephen Berman
2014-01-08 11:52 ` Tassilo Horn
2014-01-08 13:19 ` David Kastrup
2014-01-08 14:02 ` Stefan Monnier
2014-01-08 17:19 ` enable MELPA & Marmalade by defaul Glenn Morris
2014-01-07 17:44 ` enable MELPA & Marmalade by defaul [was: mykie.el] Drew Adams
2014-01-08 3:41 ` Richard Stallman
2014-01-08 4:26 ` Bob Bobeck
2014-01-08 10:50 ` Nic Ferrier
2014-01-08 17:54 ` Achim Gratz
2014-01-09 3:00 ` Andy Moreton
2014-01-09 6:55 ` Nic Ferrier
2014-01-09 7:55 ` Tassilo Horn
2014-01-09 11:24 ` chad
2014-01-09 18:15 ` Achim Gratz
2014-01-08 3:23 ` Stephen J. Turnbull
2014-01-08 10:32 ` David Kastrup
2014-01-07 16:53 ` Richard Stallman
2014-01-08 3:15 ` Stephen J. Turnbull
2014-01-08 9:27 ` Richard Stallman
[not found] ` <<a62bb795-44d9-44dd-b17a-d5294c21d2b0@default>
[not found] ` <<E1W0Zto-0000A5-VX@fencepost.gnu.org>
2014-01-07 17:44 ` Drew Adams
2014-01-07 16:16 ` Ted Zlatanov
2014-01-07 17:44 ` Drew Adams
2014-01-08 3:41 ` Richard Stallman
2014-01-04 2:02 ` mykie.el Yuta Yamada
2014-01-04 4:34 ` mykie.el Stefan Monnier
2014-01-04 8:36 ` mykie.el Leo Liu
2014-01-05 8:10 ` mykie.el Mitchel Humpherys
2014-01-05 10:29 ` mykie.el Leo Liu
2014-01-06 16:09 ` mykie.el Nicolas Richard
2014-01-06 22:38 ` mykie.el Ted Zlatanov
2014-01-07 0:37 ` mykie.el Stefan Monnier
2014-01-07 23:21 ` mykie.el Ted Zlatanov
2014-01-08 3:24 ` mykie.el Stefan Monnier
2014-01-08 15:44 ` mykie.el Ted Zlatanov
2014-01-08 16:11 ` mykie.el Stefan Monnier
2014-01-08 16:38 ` mykie.el Ted Zlatanov
2014-01-08 17:24 ` mykie.el Stefan Monnier
2014-01-09 8:13 ` mykie.el Tassilo Horn
2014-01-09 15:29 ` mykie.el Stefan Monnier
2014-01-09 18:43 ` mykie.el Yuta Yamada
2014-01-11 20:23 ` mykie.el Yuta Yamada
2014-01-12 14:45 ` mykie.el Stefan Monnier
2014-01-12 18:32 ` mykie.el Yuta Yamada
2014-01-12 19:46 ` mykie.el Stefan Monnier
2014-01-12 22:51 ` Yuta Yamada [this message]
2014-01-13 3:38 ` mykie.el Stefan Monnier
2014-01-13 4:59 ` mykie.el Yuta Yamada
2014-01-13 14:03 ` mykie.el Stefan Monnier
2014-01-13 16:09 ` mykie.el Yuta Yamada
2014-01-08 21:21 ` mykie.el Yuta Yamada
2014-01-06 5:31 ` mykie.el Yuta Yamada
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=20140112.175141.574691154553523533.cokesboy@gmail.com \
--to=cokesboy@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=tzz@lifelogs.com \
/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.