girzel / gnorb

Glue code between the Org, Gnus, and BBDB packages for Emacs.
32 stars 4 forks source link

Feature request: using gnorb-view to view all the related messages by using the recording message ids #4

Closed brabalan closed 6 years ago

brabalan commented 10 years ago

I recently added this to my configuration to find a message in gnus when I only have its message-id (I use notmuch to find where the message lives):

  (defun notmuch-file-to-group (file)
    "Calculate the Gnus group name from the given file name."
    (let ((group (file-name-directory 
                  (directory-file-name (file-name-directory file)))))
      (setq group 
            (cond ((string-match 
                    (regexp-quote "/Users/schmitta/.Maildir/zimbra/.") group)
                   (replace-match "" nil nil group))
                  ((string-match
                    (regexp-quote "/Users/schmitta/.Maildir/local/.") group)
                   (replace-match "nnimap+local:" nil nil group))
                  (t (error "strange directory name: %s" group))))
      (setq group (replace-regexp-in-string "/$" "" group))))

  (defun as/msgid-to-gnus (msgid)
    "Search for the MSGID using notmuch, then open the message with
  gnus."
    (let ((file (shell-command-to-string (concat "notmuch search --output=files 'id:" msgid "'"))))
      (gnus-summary-read-group (notmuch-file-to-group file))
      (gnus-summary-refer-article msgid)))
'''

Would there be a way to hook this up with gnorb-view such that it would create a group with all the messages stored in GNORB_MSG_ID?
girzel commented 10 years ago

I've been thinking about this for a bit, and have yet to come up with a really good solution. Since we've saved the outgoing message ids, it certainly seems reasonable that those messages should be present for gnorb-view. But the functions above will only work for people using notmuch. Perhaps I can have something like that present as a possible fallback, but it can't be the main solution.

The two possible solutions I can think of are: 1) somehow use the registry to look up the location of sent messages, or 2) change the value of the GNORB_MSG_ID property so that it saves a complete link to the message (ie server and group in addition to id). I'm sort of leaning towards a registry-based solution, as it seems less fragile, but I haven't looked much into how the registry works.

For a temporary workaround, since you are using a local archive method, you could insert actual links to your sent messages into the heading's logbook. When you are returned to a heading after sending a reply, and prompted to take a note or trigger state-change, a link to your outgoing message should already be saved. If you insert a link into the logbook, it will be picked up by gnorb-view.

brabalan commented 10 years ago

Unfortunately I've never been able to make the registry reliably work. The reason I rely on notmuch is because I automatically refile my messages (typically after a week, it depends on the group), so their group may change. Your solution, however, would work nicely for people who don't move messages.

girzel commented 10 years ago

I certainly don't want to rely on people not moving messages... I've looked at this in my own case (I also use notmuch), and part of the problem is there's no reliable way to recreate the server name from the filesystem path. I can get the group name, but I have multiple nnimap servers, and there's no programmatic way to get to the server name that would work in a dependable way across other people's setups.

I'm still looking at the registry -- do you have it enabled? It's possible to manually add entries to the database, in such a way that they will be pinned there, and that would track them even if you refile the messages. I have a first draft of this in place, let me know if you use the registry and I can send this along the wire.

brabalan commented 10 years ago

Regarding the server, as you can see in my first post, I also have a way to derive what it is from the group name. One way to deal with this is to let people provide a function from a file name to a server + group name.

Regarding the registry, this is what I currently have in my setup, which does not work (in the sense that stale links because of refiling fail to find the linked article):

(setq gnus-registry-max-entries nil) ; track everything
(setq gnus-registry-track-extra '(sender subject))
(setq gnus-registry-unfollowed-groups nil) ; really track everything
(gnus-registry-initialize)

(setq gnus-refer-article-method
           '(current
             (nnregistry)))

I'd be happy to test ways to make this more robust.

girzel commented 10 years ago

Okay, I'll continue looking at the server issue. I really don't want to require people to write their own plumbing functions just to make this work.

In the meantime, you can test how the registry is working by setting gnus-verbose to 10. That will show you all the registry-related shenanigans, and when you refile your sent messages you should see the registry tracking down that movement. You also might consider adding 'recipient to gnus-registry-track-extra, though that might be voodoo on my part.

girzel commented 10 years ago

Okay, I've pushed some relevant changes, give it a whack when you have time. This is still all registry-based, though I will work on the notmuch integration as well. It will manually add entries into the registry for your gnorb-relevant sent messages, which will then be found by gnorb-view. It should work for you right now, since you're using local archiving -- it doesn't yet work for me, since I'm not.

It's weird that the regular registry is giving you problems, since the whole point of the thing is to track when messages are refiled. Do try setting gnus-verbose to 10, and when you refile your messages confirm that it does (or doesn't) flash a note about tracking the refile.

If I can make this work, I have to admit I'm leaning towards using the registry for all message tracking, and doing away with GNORB_MSG_IDS completely. Right now so much of tracking, and org-view, rely on the ids in GNORB_MSG_IDS being correct and locatable, and on the user having inserted links to received messages. All that is fragile. There's a generalized library for registries, so I'm thinking of making one that lives alongside the usual gnus-registry, and does all the gnorb tracking. Anyway, just thinking out loud...

brabalan commented 10 years ago

Regarding the registry, I turned on debugging and made some message expire. This is what I saw in the Messages buffer (hiding some private data).

Expiring articles from Sent: (3821 3824 3825 3828 3835 3839 3843 3848 3849)
Gnus registry: article <m2iomo77ef.fsf@polytechnique.org> going from Sent to nil
gnus-registry-handle-action ("<m2iomo77ef.fsf@polytechnique.org>" "Sent" nil "Souhire" "Alan Schmitt <alan.schmitt@inria.fr>" ("utf <**********>"))
Gnus registry: new entry for <m2iomo77ef.fsf@polytechnique.org> is ((subject "Souhire") (recipient "utf <***********>") (sender "Alan Schmitt <alan.schmitt@inria.fr>") (group) (creation-time (21460 53651 838918 0)))
Expiring articles...done

Two things surprise me: only one article is put in the registry (it seems that 9 articles are refiled), and the article is "going from Sent to nil".

I'm not even using smart refiling for that, my refiling target is (expiry-target . "nnimap+zimbra:archive")

If I try to access one of those articles that was refiled, here is what happens:

nnregistry: requesting article `<m2fvht237r.fsf@top-wifi.irisa.fr>' in group `Sent'
Couldn't fetch article <m2fvht237r.fsf@top-wifi.irisa.fr>

If I search for that id using notmuch, and open that article in gnus (in the archive group), I see this in the logs:

gnus-registry-handle-action ("<m2fvht237r.fsf@top-wifi.irisa.fr>" nil nil "[Arthur Charguéraud] Liste TLC" "Alan Schmitt <alan.schmitt@polytechnique.org>" nil)
Gnus registry: new entry for <m2fvht237r.fsf@top-wifi.irisa.fr> is ((subject "[Arthur Chargu\303\251raud] Liste TLC" "[Arthur Charguéraud] Liste TLC") (sender "Alan Schmitt <alan.schmitt@polytechnique.org>") (group "Sent") (creation-time (21454 12729 176468 0)))

I don't know why it's still has the group wrong there (I'm viewing this message in the archive group, not in the Sent group).

So to summarize, it seems the registry works fine ... as long as messages are not refiled, which kind of defeats its purpose.

Should I wait until I can get the registry working to test your latest code, or is it independent?

girzel commented 10 years ago

The newest code should be independent -- the registry entry is made from the sent message's Gcc header, so if that's correct the registry will (should) be correct. On the other hand, what you're seeing is pretty bizarre, and I wonder if subsequently visiting your sent mail in the archive group would then "break" the entry gnorb had made.

Still, it won't break things any more than they're already broken, so please do give it a shot. I'll try to figure out what the registry is doing in your case.

brabalan commented 10 years ago

I have to admit I'm not sure how to test this feature. Could you suggest a scenario? (It seems I need a GNORB_ID link, and the only way to get one is through gnorb-gnus-outgoing-do-todo. Is this correct?)

girzel commented 10 years ago

Ha, I forgot to mention that part. With the new code in place, future emails sent as part of handle-mail will be recorded in the registry. So run it for a few days, send some messages, and then run gnorb-view on a headline where the messages were sent from. If this patch works properly, your sent messages (ie ids mentioned in GNORB_MSG_IDS) should show up in the nnir buffer.

On 07/28/14 08:37 AM, Alan Schmitt wrote:

I have to admit I'm not sure how to test this feature. Could you suggest a scenario? (It seems I need a GNORB_ID link, and the only way to get one is through gnorb-gnus-outgoing-do-todo. Is this correct?)

Reply to this email directly or view it on GitHub.*

girzel commented 10 years ago

Okay, I figured out part of the problem -- `gnus-summary-expire-articles' is the function that runs the gnus-summary-article-expire-hook, and it's that hook that the registry uses to track where messages are going. When the hook is called, it's assumed the message is going nowhere, and the expiry target isn't even given to the hook functions: the registry isn't told where the message is going. I can provide a patch to gnus for this, but it's not going to help you or other users so long as you're using the built-in gnus. I'll suggest the patch, then try to think of other workarounds.

girzel commented 10 years ago

I've just posted a patch to the gnus.user ML that addresses this. If you're willing to try that patch out locally, it ought to solve the problem. Obviously this is not a good general solution, though.

brabalan commented 10 years ago

I'm subscribed to gmane.emacs.gnus.user and I did not see your patch. By the way, is it easy to replace the built-in gnus with the development version (and your patch applied?)

girzel commented 10 years ago

Apologies -- it's emacs.gnus.general, not gnus.user. I find general is where most of the discussion takes place. Running a development version of gnus is pretty easy, just put the git repo in your ~/.emacs.d/ and put

(add-to-list 'load-path "~/.emacs.d/gnus/lisp")

somewhere in your init. The problem is, I don't have much confidence that anyone will apply the patch. None of the developers seem to be paying much attention to the list!

On 07/30/14 03:59 AM, Alan Schmitt wrote:

I'm subscribed to gmane.emacs.gnus.user and I did not see your patch. By the way, is it easy to replace the built-in gnus with the development version (and your patch applied?)

Reply to this email directly or view it on GitHub.*

brabalan commented 10 years ago

I gave this a try. I opened a mail with gnorb-org-handle-mail and as I was trying to send the mail, I got this backtrace in the debugger.

Debugger entered--Lisp error: (wrong-type-argument listp "nnimap+zimbra:Sent")
  #[(db key entry) "..." [key db entry tr --dolist-tail-- val gethash eieio-oref :data error "Key already exists in database" registry-full "registry max-hard size limit reached" puthash :tracked nil registry-lookup-secondary-value value-keys] 7 "Insert ENTRY under KEY into the registry-db THIS.\nUpdates the secondary ('tracked') indices as well.\nErrors out if the key exists already."]([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 (sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE
  apply(#[(db key entry) "..." [key db entry tr --dolist-tail-- val gethash eieio-oref :data error "Key already exists in database" registry-full "registry max-hard size limit reached" puthash :tracked nil registry-lookup-secondary-value value-keys] 7 "Insert ENTRY under KEY into the registry-db THIS.\nUpdates the secondary ('tracked') indices as well.\nErrors out if the key exists already."] ([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 (sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE
  registry-insert([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 (sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE
  gnus-registry-insert([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 (sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE
  gnus-registry-set-id-key("<m2d2cm6evq.fsf@top-wifi.irisa.fr>" group "nnimap+zimbra:Sent")
  (progn (gnus-registry-set-id-key msg-id (quote group) gcc))
  (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc)))
  (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc))))
  (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc)))))
  (progn (require (quote gnorb-org)) (setq gnorb-message-org-ids org-ids) (add-to-list (quote message-exit-actions) (quote gnorb-org-restore-after-send)) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc))))))
  (if org-ids (progn (require (quote gnorb-org)) (setq gnorb-message-org-ids org-ids) (add-to-list (quote message-exit-actions) (quote gnorb-org-restore-after-send)) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc)))))) (setq gnorb-message-org-ids nil))
  (let* ((org-ids (mail-fetch-field gnorb-mail-header nil nil t)) (msg-id (mail-fetch-field "Message-ID")) (refs (mail-fetch-field "References")) (to (if (message-news-p) (mail-fetch-field "Newsgroups") (mail-fetch-field "To"))) (from (mail-fetch-field "From")) (subject (mail-fetch-field "Subject")) (date (mail-fetch-field "Date")) (gcc (mail-fetch-field "Gcc")) (link (or (and gcc (org-store-link nil)) nil))) (if refs (progn (setq refs (split-string refs)))) (setq gnorb-gnus-sending-message-info (list (quote :subject) subject (quote :msg-id) msg-id (quote :to) to (quote :from) from (quote :link) link (quote :date) date (quote :refs) refs)) (if org-ids (progn (require (quote gnorb-org)) (setq gnorb-message-org-ids org-ids) (add-to-list (quote message-exit-actions) (quote gnorb-org-restore-after-send)) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list (list ... ...) (list ... from) (list ... subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id ... gcc)))))) (setq gnorb-message-org-ids nil)))
  (save-restriction (message-narrow-to-headers) (let* ((org-ids (mail-fetch-field gnorb-mail-header nil nil t)) (msg-id (mail-fetch-field "Message-ID")) (refs (mail-fetch-field "References")) (to (if (message-news-p) (mail-fetch-field "Newsgroups") (mail-fetch-field "To"))) (from (mail-fetch-field "From")) (subject (mail-fetch-field "Subject")) (date (mail-fetch-field "Date")) (gcc (mail-fetch-field "Gcc")) (link (or (and gcc (org-store-link nil)) nil))) (if refs (progn (setq refs (split-string refs)))) (setq gnorb-gnus-sending-message-info (list (quote :subject) subject (quote :msg-id) msg-id (quote :to) to (quote :from) from (quote :link) link (quote :date) date (quote :refs) refs)) (if org-ids (progn (require (quote gnorb-org)) (setq gnorb-message-org-ids org-ids) (add-to-list (quote message-exit-actions) (quote gnorb-org-restore-after-send)) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list ... ... ...)) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn ...))))) (setq gnorb-message-org-ids nil))))
  gnorb-gnus-check-outgoing-headers()
  run-hooks(message-header-hook)
  message-send-mail(nil)
  message-send-via-mail(nil)
  message-send(nil)
  message-send-and-exit(nil)
  call-interactively(message-send-and-exit nil [3 3])
  (let (deactivate-mark) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook)) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook) t) (run-hooks (quote ergoemacs-pre-command-hook)) (call-interactively function record-flag keys) (setq ergoemacs-deactivate-mark deactivate-mark) (if deactivate-mark (progn (setq ergoemacs-mark-active nil))))
  (let ((this-command-keys-shift-translated (or this-command-keys-shift-translated (if ergoemacs-shift-translated t nil)))) (if (featurep (quote keyfreq)) (progn (if keyfreq-mode (progn (let ((command ergoemacs-this-command) count) (setq count (gethash ... keyfreq-table)) (cond (...) (... ...) (count ...)) (setq count (gethash ... keyfreq-table)) (puthash (cons major-mode function) (if count ... 1) keyfreq-table)))))) (let (deactivate-mark) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook)) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook) t) (run-hooks (quote ergoemacs-pre-command-hook)) (call-interactively function record-flag keys) (setq ergoemacs-deactivate-mark deactivate-mark) (if deactivate-mark (progn (setq ergoemacs-mark-active nil)))))
  (cond ((ergoemacs-smart-function-p function) (error "Ergoemacs-mode is confused, and exiting out of an infinite loop (refused to call %s)" function)) (ergoemacs-test-fn (setq ergoemacs-test-fn function)) (ergoemacs-describe-key (let ((pt (point)) (buf (current-buffer)) (keys (quote nil)) test) (unwind-protect (save-excursion (describe-function function) (set-buffer (help-buffer)) (let ((inhibit-read-only t)) (goto-char (point-min)) (insert (format "%s runs the command " ...)) (if (search-forward " is" nil t) (progn ...)) (fill-paragraph) (if (search-forward "bound to" nil t) (progn ... ... ... ...)))) (setq ergoemacs-describe-key nil)))) ((condition-case nil (progn (string-match "self-insert" (symbol-name function))) (error nil)) (setq ergoemacs-single-command-keys keys) (setq last-input-event keys) (setq prefix-arg current-prefix-arg) (setq unread-command-events (append (listify-key-sequence keys) unread-command-events)) (ergoemacs-defer-post-command-hook) (reset-this-command-lengths)) (t (progn (let ((--dolist-tail-- ergoemacs-this-command-fake)) (while --dolist-tail-- (let ((var ...)) (set var function) (setq --dolist-tail-- (cdr --dolist-tail--)))))) (let ((this-command-keys-shift-translated (or this-command-keys-shift-translated (if ergoemacs-shift-translated t nil)))) (if (featurep (quote keyfreq)) (progn (if keyfreq-mode (progn (let ... ... ... ... ...))))) (let (deactivate-mark) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook)) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook) t) (run-hooks (quote ergoemacs-pre-command-hook)) (call-interactively function record-flag keys) (setq ergoemacs-deactivate-mark deactivate-mark) (if deactivate-mark (progn (setq ergoemacs-mark-active nil)))))))
  ergoemacs-read-key-call(message-send-and-exit nil [3 3])
  (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp fn) (symbol-name fn)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function)))
  (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (if (memq fn ergoemacs-universal-fns) (progn (setq ret (ergoemacs-read-key-lookup-get-ret---universal fn)))) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp fn) (symbol-name fn)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function))))
  (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp (nth 0 hash) t)) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp (nth 0 hash)) (symbol-name (nth 0 hash))) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp (nth 0 (nth 0 hash))) (not (nth 1 (nth 0 hash)))) (ergoemacs-read-key--send-unread (read-kbd-macro (nth 0 (nth 0 hash)) t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp (nth 0 (nth 0 hash)))) (setq ret (list (nth 0 (nth 0 hash)) (nth 1 (nth 0 hash)) (nth 1 (nth 0 hash))))) ((progn (setq tmp (lookup-key local-function-key-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil))) (if tmp nil (setq tmp (lookup-key key-translation-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil)))) tmp) (cond ((or (keymapp tmp)) (setq ret (quote keymap))) ((and ergoemacs-describe-key (vectorp tmp)) (setq ergoemacs-single-command-keys nil) (message "%s translates to %s" pretty-key (ergoemacs-pretty-key (key-description tmp))) (setq ergoemacs-describe-key nil) (setq ret (quote translate))) ((and (vectorp tmp) (progn (setq fn (ergoemacs-real-key-binding tmp)) (if (and ... ...) (progn ...)) (if (ergoemacs-smart-function-p fn) (progn ...)) (commandp fn t))) (setq fn (or (command-remapping fn (point)) fn)) (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp fn) (symbol-name fn)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote translate-fn))) ((vectorp tmp) (ergoemacs-read-key--send-unread tmp lookup use-override pretty-key) (setq ret (quote translate))))) ((progn (setq fn (ergoemacs-get-override-function key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret (quote local-function-override)))) ((progn (setq fn (ergoemacs-real-key-binding key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (if (memq fn ergoemacs-universal-fns) (progn (setq ret (ergoemacs-read-key-lookup-get-ret---universal fn)))) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp fn) (symbol-name fn)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function))))) ((progn (setq fn (or (let ((old-global-map ...) (new-global-map ...)) (unwind-protect (progn ... ...) (use-global-map old-global-map))) (if (eq (lookup-key ergoemacs-unbind-keymap key) (quote ergoemacs-undefined)) (quote ergoemacs-undefined) (let (ergoemacs-read-input-keys) (if ... ... ...))))) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (setq ergoemacs-single-command-keys key) (let (message-log-max) (if (string= pretty-key-undefined pretty-key) (message "%s%s%s" pretty-key (ergoemacs-unicode-char "→" "->") fn) (message "%s%s%s (from %s)" pretty-key (ergoemacs-unicode-char "→" "->") fn pretty-key-undefined))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-global-or-override)))))
  (progn (if overriding-terminal-local-map (progn (setq lookup (gethash (md5 (format "override-terminal-read:%s" overriding-terminal-local-map)) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-terminal-local-map lookup))))) (if overriding-local-map (progn (setq lookup (gethash (md5 (format "override-local-read:%s" overriding-local-map)) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-local-map lookup))))) (if (get-char-property (point) (quote keymap)) (progn (setq lookup (gethash (md5 (format "char-map-read:%s" (get-char-property ... ...))) ergoemacs-extract-map-hash)) (let (deactivate-mark) (if lookup (progn (setq tmp-overlay (make-overlay ... ...)) (overlay-put tmp-overlay (quote keymap) lookup) (overlay-put tmp-overlay (quote priority) 536870910)))))) (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp (nth 0 hash) t)) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp (nth 0 hash)) (symbol-name (nth 0 hash))) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp (nth 0 (nth 0 hash))) (not (nth 1 (nth 0 hash)))) (ergoemacs-read-key--send-unread (read-kbd-macro (nth 0 (nth 0 hash)) t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp (nth 0 (nth 0 hash)))) (setq ret (list (nth 0 (nth 0 hash)) (nth 1 (nth 0 hash)) (nth 1 (nth 0 hash))))) ((progn (setq tmp (lookup-key local-function-key-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil))) (if tmp nil (setq tmp (lookup-key key-translation-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil)))) tmp) (cond ((or (keymapp tmp)) (setq ret (quote keymap))) ((and ergoemacs-describe-key (vectorp tmp)) (setq ergoemacs-single-command-keys nil) (message "%s translates to %s" pretty-key (ergoemacs-pretty-key (key-description tmp))) (setq ergoemacs-describe-key nil) (setq ret (quote translate))) ((and (vectorp tmp) (progn (setq fn ...) (if ... ...) (if ... ...) (commandp fn t))) (setq fn (or (command-remapping fn ...) fn)) (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and ... ...) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote translate-fn))) ((vectorp tmp) (ergoemacs-read-key--send-unread tmp lookup use-override pretty-key) (setq ret (quote translate))))) ((progn (setq fn (ergoemacs-get-override-function key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret (quote local-function-override)))) ((progn (setq fn (ergoemacs-real-key-binding key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (if (memq fn ergoemacs-universal-fns) (progn (setq ret (ergoemacs-read-key-lookup-get-ret---universal fn)))) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and ... ...) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function))))) ((progn (setq fn (or (let (... ...) (unwind-protect ... ...)) (if (eq ... ...) (quote ergoemacs-undefined) (let ... ...)))) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (setq ergoemacs-single-command-keys key) (let (message-log-max) (if (string= pretty-key-undefined pretty-key) (message "%s%s%s" pretty-key (ergoemacs-unicode-char "→" "->") fn) (message "%s%s%s (from %s)" pretty-key (ergoemacs-unicode-char "→" "->") fn pretty-key-undefined))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-global-or-override))))))
  (unwind-protect (progn (if overriding-terminal-local-map (progn (setq lookup (gethash (md5 (format "override-terminal-read:%s" overriding-terminal-local-map)) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-terminal-local-map lookup))))) (if overriding-local-map (progn (setq lookup (gethash (md5 (format "override-local-read:%s" overriding-local-map)) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-local-map lookup))))) (if (get-char-property (point) (quote keymap)) (progn (setq lookup (gethash (md5 (format "char-map-read:%s" ...)) ergoemacs-extract-map-hash)) (let (deactivate-mark) (if lookup (progn (setq tmp-overlay ...) (overlay-put tmp-overlay ... lookup) (overlay-put tmp-overlay ... 536870910)))))) (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp (nth 0 hash) t)) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp ...) (symbol-name ...)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp (nth 0 (nth 0 hash))) (not (nth 1 (nth 0 hash)))) (ergoemacs-read-key--send-unread (read-kbd-macro (nth 0 (nth 0 hash)) t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp (nth 0 (nth 0 hash)))) (setq ret (list (nth 0 (nth 0 hash)) (nth 1 (nth 0 hash)) (nth 1 (nth 0 hash))))) ((progn (setq tmp (lookup-key local-function-key-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil))) (if tmp nil (setq tmp (lookup-key key-translation-map key)) (if (and tmp ...) (progn ...))) tmp) (cond ((or (keymapp tmp)) (setq ret (quote keymap))) ((and ergoemacs-describe-key (vectorp tmp)) (setq ergoemacs-single-command-keys nil) (message "%s translates to %s" pretty-key (ergoemacs-pretty-key ...)) (setq ergoemacs-describe-key nil) (setq ret (quote translate))) ((and (vectorp tmp) (progn ... ... ... ...)) (setq fn (or ... fn)) (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or ... ...)) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote translate-fn))) ((vectorp tmp) (ergoemacs-read-key--send-unread tmp lookup use-override pretty-key) (setq ret (quote translate))))) ((progn (setq fn (ergoemacs-get-override-function key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret (quote local-function-override)))) ((progn (setq fn (ergoemacs-real-key-binding key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn ...) fn)) (if (memq fn ergoemacs-universal-fns) (progn (setq ret ...))) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or ... ...)) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function))))) ((progn (setq fn (or (let ... ...) (if ... ... ...))) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn ...) fn)) (setq ergoemacs-single-command-keys key) (let (message-log-max) (if (string= pretty-key-undefined pretty-key) (message "%s%s%s" pretty-key ... fn) (message "%s%s%s (from %s)" pretty-key ... fn pretty-key-undefined))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-global-or-override)))))) (if (and tmp-overlay (not ergoemacs-read-key-overriding-overlay-save)) (progn (delete-overlay tmp-overlay))))
  (let* (ergoemacs-read-input-keys ergoemacs-modal ergoemacs-shortcut-keys ergoemacs-no-shortcut-keys (hash (and key (gethash key ergoemacs-command-shortcuts-hash))) lookup tmp-overlay use-override tmp ret fn) (unwind-protect (progn (if overriding-terminal-local-map (progn (setq lookup (gethash (md5 ...) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-terminal-local-map lookup))))) (if overriding-local-map (progn (setq lookup (gethash (md5 ...) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-local-map lookup))))) (if (get-char-property (point) (quote keymap)) (progn (setq lookup (gethash (md5 ...) ergoemacs-extract-map-hash)) (let (deactivate-mark) (if lookup (progn ... ... ...))))) (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp (nth 0 hash) t)) (ergoemacs-read-key--echo-command pretty-key (or (and ... ...) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp (nth 0 ...)) (not (nth 1 ...))) (ergoemacs-read-key--send-unread (read-kbd-macro (nth 0 ...) t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp (nth 0 ...))) (setq ret (list (nth 0 ...) (nth 1 ...) (nth 1 ...)))) ((progn (setq tmp (lookup-key local-function-key-map key)) (if (and tmp ...) (progn ...)) (if tmp nil (setq tmp ...) (if ... ...)) tmp) (cond ((or ...) (setq ret ...)) ((and ergoemacs-describe-key ...) (setq ergoemacs-single-command-keys nil) (message "%s translates to %s" pretty-key ...) (setq ergoemacs-describe-key nil) (setq ret ...)) ((and ... ...) (setq fn ...) (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key ...) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret ...)) ((vectorp tmp) (ergoemacs-read-key--send-unread tmp lookup use-override pretty-key) (setq ret ...)))) ((progn (setq fn (ergoemacs-get-override-function key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn ...)) (or ret (commandp fn t))) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret (quote local-function-override)))) ((progn (setq fn (ergoemacs-real-key-binding key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn ...)) (or ret (commandp fn t))) (if ret nil (setq fn (or ... fn)) (if (memq fn ergoemacs-universal-fns) (progn ...)) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key ...) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret ...)))) ((progn (setq fn (or ... ...)) (if (ergoemacs-smart-function-p fn) (progn ...)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (or ret (commandp fn t))) (if ret nil (setq fn (or ... fn)) (setq ergoemacs-single-command-keys key) (let (message-log-max) (if ... ... ...)) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-global-or-override)))))) (if (and tmp-overlay (not ergoemacs-read-key-overriding-overlay-save)) (progn (delete-overlay tmp-overlay)))) ret)
  (prog1 (let* (ergoemacs-read-input-keys ergoemacs-modal ergoemacs-shortcut-keys ergoemacs-no-shortcut-keys (hash (and key (gethash key ergoemacs-command-shortcuts-hash))) lookup tmp-overlay use-override tmp ret fn) (unwind-protect (progn (if overriding-terminal-local-map (progn (setq lookup (gethash ... ergoemacs-extract-map-hash)) (if lookup (progn ... ...)))) (if overriding-local-map (progn (setq lookup (gethash ... ergoemacs-extract-map-hash)) (if lookup (progn ... ...)))) (if (get-char-property (point) (quote keymap)) (progn (setq lookup (gethash ... ergoemacs-extract-map-hash)) (let (deactivate-mark) (if lookup ...)))) (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp ... t)) (ergoemacs-read-key--echo-command pretty-key (or ... ...)) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp ...) (not ...)) (ergoemacs-read-key--send-unread (read-kbd-macro ... t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp ...)) (setq ret (list ... ... ...))) ((progn (setq tmp ...) (if ... ...) (if tmp nil ... ...) tmp) (cond (... ...) (... ... ... ... ...) (... ... ... ... ... ... ...) (... ... ...))) ((progn (setq fn ...) (setq ret ...) (if ... ...) (or ret ...)) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret ...))) ((progn (setq fn ...) (setq ret ...) (if ... ...) (or ret ...)) (if ret nil (setq fn ...) (if ... ...) (if ret nil ... ... ... ... ...))) ((progn (setq fn ...) (if ... ...) (setq ret ...) (or ret ...)) (if ret nil (setq fn ...) (setq ergoemacs-single-command-keys key) (let ... ...) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret ...))))) (if (and tmp-overlay (not ergoemacs-read-key-overriding-overlay-save)) (progn (delete-overlay tmp-overlay)))) ret) (if unread-command-events (progn (if ergoemacs-modal (progn (setq ergoemacs-modal-save ergoemacs-modal))) (setq ergoemacs-modal nil) (set-default (quote ergoemacs-modal) nil))) (if ergoemacs-single-command-keys (progn (setq ergoemacs-read-input-keys nil))))
  ergoemacs-read-key-lookup([3 3] "^C】^C】")
  (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)
  (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil))
  (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car (prog1 key-trials (setq key-trials (cdr key-trials))))) (if (plist-get next-key (intern (concat tmp "-key"))) (progn (setq key-trial (if ergoemacs-read-key (vconcat ergoemacs-read-key (plist-get next-key ...)) (plist-get next-key (intern ...))) pretty-key-trial (if pretty-key (concat pretty-key (concat ... ...)) (concat (plist-get next-key ...) (if ergoemacs-use-ergoemacs-key-descriptions "" " "))))))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn (quote keymap)) (let ((new-fn (and ergoemacs-read-key (let ... ...)))) (if (condition-case nil (progn (commandp new-fn t)) (error nil)) (progn (setq local-fn (quote major-minor-override-fn)) (ergoemacs-read-key-call new-fn nil ergoemacs-read-key)) (if real-read (progn (setq history ...))) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial))) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history (cons (list type ...) history)))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 (nth 0 current-prefix-arg)))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (cond ((eq local-fn (quote keymap)) (if real-read (progn (setq history (cons (list type ...) history)))) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history (cons (list type ...) history)))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 (nth 0 current-prefix-arg)))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (if key-trials nil (setq key-trial nil)))
  (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car (prog1 key-trials (setq key-trials (cdr key-trials))))) (if (plist-get next-key (intern (concat tmp "-key"))) (progn (setq key-trial (if ergoemacs-read-key (vconcat ergoemacs-read-key ...) (plist-get next-key ...)) pretty-key-trial (if pretty-key (concat pretty-key ...) (concat ... ...)))))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn (quote keymap)) (let ((new-fn (and ergoemacs-read-key ...))) (if (condition-case nil (progn ...) (error nil)) (progn (setq local-fn ...) (ergoemacs-read-key-call new-fn nil ergoemacs-read-key)) (if real-read (progn ...)) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial))) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history (cons ... history)))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 (nth 0 current-prefix-arg)))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (cond ((eq local-fn (quote keymap)) (if real-read (progn (setq history (cons ... history)))) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history (cons ... history)))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 (nth 0 current-prefix-arg)))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (if key-trials nil (setq key-trial nil))) nil)
  (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car (prog1 key-trials (setq key-trials ...)))) (if (plist-get next-key (intern (concat tmp "-key"))) (progn (setq key-trial (if ergoemacs-read-key ... ...) pretty-key-trial (if pretty-key ... ...))))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn (quote keymap)) (let ((new-fn ...)) (if (condition-case nil ... ...) (progn ... ...) (if real-read ...) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial))) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history ...))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 ...))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (cond ((eq local-fn (quote keymap)) (if real-read (progn (setq history ...))) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history ...))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 ...))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (if key-trials nil (setq key-trial nil))) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined))))
  (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp (gethash (plist-get next-key (intern (concat base "-key"))) ergoemacs-command-shortcuts-hash)) (if (and tmp (commandp (nth 0 tmp) t)) (progn (progn (let (...) (while --dolist-tail-- ...))))))) (if ergoemacs-translate-keys (progn (progn (let ((--dolist-tail-- (quote ...))) (while --dolist-tail-- (let (...) (setq key-trials ...) (setq next-key ...) (setq key-trials ...) (setq --dolist-tail-- ...))))))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car (prog1 key-trials ...))) (if (plist-get next-key (intern ...)) (progn (setq key-trial ... pretty-key-trial ...)))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn (quote keymap)) (let (...) (if ... ... ... ...)) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn ...)) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence ...) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn ...) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote ...)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn ...) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list ...)) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (cond ((eq local-fn (quote keymap)) (if real-read (progn ...)) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn ...)) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence ...) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn ...) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote ...)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn ...) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list ...)) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (if key-trials nil (setq key-trial nil))) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined)))))
  (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp (gethash (plist-get next-key (intern ...)) ergoemacs-command-shortcuts-hash)) (if (and tmp (commandp (nth 0 tmp) t)) (progn (progn (let ... ...)))))) (if ergoemacs-translate-keys (progn (progn (let ((--dolist-tail-- ...)) (while --dolist-tail-- (let ... ... ... ... ...)))))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car ...)) (if (plist-get next-key ...) (progn ...))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn ...) (let ... ...) (throw ... t)) ((eq ... ...) (if real-read ...) (setq continue-read t ergoemacs--input ... ergoemacs-read-key nil pretty-key nil type ... real-type ... key-trial nil key-trials nil pretty-key-trial nil first-type ...) (throw ... t)) ((and ... ...) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg ...) (throw ... t)) ((and ... ...) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg ...) (throw ... t)) (local-fn (throw ... t))) (cond ((eq local-fn ...) (if real-read ...) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw ... t)) ((eq ... ...) (if real-read ...) (setq continue-read t ergoemacs--input ... ergoemacs-read-key nil pretty-key nil type ... real-type ... key-trial nil key-trials nil pretty-key-trial nil first-type ...) (throw ... t)) ((and ... ...) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg ...) (throw ... t)) ((and ... ...) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg ...) (throw ... t)) (local-fn (throw ... t))) (if key-trials nil (setq key-trial nil))) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined))))))
  (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn (setq history (cons (list type (listify-key-sequence ergoemacs-read-key)) history)))) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not (condition-case nil (progn (interactive-form local-fn)) (error nil))) (eq local-fn (quote ergoemacs-read-key-swap))) (progn (setq local-fn nil))) (if (memq local-fn (quote (ergoemacs-read-key-next-key-is-alt ergoemacs-read-key-next-key-is-ctl ergoemacs-read-key-next-key-is-alt-ctl ergoemacs-read-key-next-key-is-quoted))) (progn (setq next-key (funcall local-fn type pretty-key)) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp (gethash (plist-get next-key ...) ergoemacs-command-shortcuts-hash)) (if (and tmp (commandp ... t)) (progn (progn ...))))) (if ergoemacs-translate-keys (progn (progn (let (...) (while --dolist-tail-- ...))))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials ...) (setq tmp ...) (if ... ...)) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial ... nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond (... ... ...) (... ... ... ...) (... ... ...) (... ... ...) (local-fn ...)) (cond (... ... ... ...) (... ... ... ...) (... ... ...) (... ... ...) (local-fn ...)) (if key-trials nil (setq key-trial nil))) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined)))))))
  (if (eq local-fn (quote ergoemacs-read-key-undo-last)) (if (= 0 (length history)) (setq continue-read nil) (setq tmp (car (prog1 history (setq history (cdr history))))) (setq continue-read t ergoemacs--input (nth 1 tmp) real-read nil real-type (nth 0 tmp)) (setq ergoemacs-read-key nil pretty-key nil type (quote normal) key-trial nil key-trials nil pretty-key-trial nil pretty-key nil)) (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn (setq history (cons (list type ...) history)))) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not (condition-case nil (progn (interactive-form local-fn)) (error nil))) (eq local-fn (quote ergoemacs-read-key-swap))) (progn (setq local-fn nil))) (if (memq local-fn (quote (ergoemacs-read-key-next-key-is-alt ergoemacs-read-key-next-key-is-ctl ergoemacs-read-key-next-key-is-alt-ctl ergoemacs-read-key-next-key-is-quoted))) (progn (setq next-key (funcall local-fn type pretty-key)) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp (gethash ... ergoemacs-command-shortcuts-hash)) (if (and tmp ...) (progn ...)))) (if ergoemacs-translate-keys (progn (progn (let ... ...)))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while ... ... ...) (if pretty-key-undefined nil ...) (setq ergoemacs-shift-translated ...) (setq deactivate-mark nil) (setq local-fn ...) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ... ... ... ... ...) (cond ... ... ... ... ...) (if key-trials nil ...)) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined))))))))
  (if (string= tmp (key-description (ergoemacs-key-fn-lookup (quote keyboard-quit)))) (cond ((and (not ergoemacs-read-key)) (ergoemacs-keyboard-quit)) ((and ergoemacs-read-key-last-help (boundp (quote guide-key-mode)) guide-key-mode) (setq ergoemacs-read-key-last-help nil guide-key/guide-key-sequence (delete (key-description ergoemacs-read-key) guide-key/guide-key-sequence) continue-read t) (guide-key/close-guide-buffer)) (t (if (minibufferp) nil (let (message-log-max) (setq tmp (gethash type ergoemacs-translation-text)) (message "%s%s%s Canceled with %s" (if ergoemacs-describe-key "Help for: " "") (if tmp (nth 5 tmp) "") (or pretty-key "") (if ergoemacs-use-ergoemacs-key-descriptions (plist-get next-key ...) (concat ... " ")))))) (setq ergoemacs-describe-key nil)) (setq tmp (plist-get next-key (quote :normal-key))) (setq local-keymap (ergoemacs-local-map type)) (if (and (or real-read (and (boundp (quote modal-default)) modal-default)) local-keymap) (setq local-fn (lookup-key local-keymap tmp)) (setq local-fn nil)) (if (eq local-fn (quote ergoemacs-read-key-undo-last)) (if (= 0 (length history)) (setq continue-read nil) (setq tmp (car (prog1 history (setq history (cdr history))))) (setq continue-read t ergoemacs--input (nth 1 tmp) real-read nil real-type (nth 0 tmp)) (setq ergoemacs-read-key nil pretty-key nil type (quote normal) key-trial nil key-trials nil pretty-key-trial nil pretty-key nil)) (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn (setq history (cons ... history)))) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not (condition-case nil (progn ...) (error nil))) (eq local-fn (quote ergoemacs-read-key-swap))) (progn (setq local-fn nil))) (if (memq local-fn (quote (ergoemacs-read-key-next-key-is-alt ergoemacs-read-key-next-key-is-ctl ergoemacs-read-key-next-key-is-alt-ctl ergoemacs-read-key-next-key-is-quoted))) (progn (setq next-key (funcall local-fn type pretty-key)) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp ...) (if ... ...))) (if ergoemacs-translate-keys (progn (progn ...))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials ... ... ... ... ... ... ... ... ... ...) nil) nil (beep) (if (minibufferp) nil (let ... ...))))))))
  (while continue-read (setq continue-read nil) (if (and (not ergoemacs--input) real-type) (progn (setq type real-type) (setq curr-universal first-universal) (setq real-type nil))) (if (and ergoemacs-read-key (boundp (quote guide-key-mode)) guide-key-mode (not (equal ergoemacs-read-key-last-help ergoemacs-read-key)) (guide-key/popup-guide-buffer-p ergoemacs-read-key)) (progn (setq ergoemacs-read-key-last-help ergoemacs-read-key) (guide-key/popup-function ergoemacs-read-key))) (setq real-read (not ergoemacs--input)) (setq base (concat ":" (symbol-name type)) next-key (vector (ergoemacs-read-event type pretty-key nil curr-universal))) (setq next-key (ergoemacs-translate next-key)) (setq tmp (plist-get next-key (quote :normal))) (cond ((string= tmp "ESC") (setq tmp "<escape>")) ((string= tmp "RET") (setq tmp "<return>"))) (if (string= tmp (key-description (ergoemacs-key-fn-lookup (quote keyboard-quit)))) (cond ((and (not ergoemacs-read-key)) (ergoemacs-keyboard-quit)) ((and ergoemacs-read-key-last-help (boundp (quote guide-key-mode)) guide-key-mode) (setq ergoemacs-read-key-last-help nil guide-key/guide-key-sequence (delete (key-description ergoemacs-read-key) guide-key/guide-key-sequence) continue-read t) (guide-key/close-guide-buffer)) (t (if (minibufferp) nil (let (message-log-max) (setq tmp (gethash type ergoemacs-translation-text)) (message "%s%s%s Canceled with %s" (if ergoemacs-describe-key "Help for: " "") (if tmp ... "") (or pretty-key "") (if ergoemacs-use-ergoemacs-key-descriptions ... ...))))) (setq ergoemacs-describe-key nil)) (setq tmp (plist-get next-key (quote :normal-key))) (setq local-keymap (ergoemacs-local-map type)) (if (and (or real-read (and (boundp (quote modal-default)) modal-default)) local-keymap) (setq local-fn (lookup-key local-keymap tmp)) (setq local-fn nil)) (if (eq local-fn (quote ergoemacs-read-key-undo-last)) (if (= 0 (length history)) (setq continue-read nil) (setq tmp (car (prog1 history (setq history ...)))) (setq continue-read t ergoemacs--input (nth 1 tmp) real-read nil real-type (nth 0 tmp)) (setq ergoemacs-read-key nil pretty-key nil type (quote normal) key-trial nil key-trials nil pretty-key-trial nil pretty-key nil)) (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn (setq history ...))) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not (condition-case nil ... ...)) (eq local-fn (quote ergoemacs-read-key-swap))) (progn (setq local-fn nil))) (if (memq local-fn (quote (ergoemacs-read-key-next-key-is-alt ergoemacs-read-key-next-key-is-ctl ergoemacs-read-key-next-key-is-alt-ctl ergoemacs-read-key-next-key-is-quoted))) (progn (setq next-key (funcall local-fn type pretty-key)) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons ... key-trials)) (setq key-trials (cons ... key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key ...)) (setq key-trials (cons ... key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn ... ...)) (if ergoemacs-translate-keys (progn ...)) (setq key-trials (reverse key-trials)) (if (catch ... ... nil) nil (beep) (if ... nil ...))))))))
  (let ((continue-read t) (guide-key/guide-key-sequence (quote nil)) (guide-key/recursive-key-sequence-flag t) (real-type (or type (quote normal))) (first-type (or type (quote normal))) deactivate-mark pretty-key pretty-key-undefined next-key (ergoemacs-read-key key) key-trial pretty-key-trial (type (or initial-key-type (quote normal))) base local-keymap local-fn key-trials real-read (first-universal universal) (curr-universal nil) ergoemacs--input tmp history) (setq ergoemacs--input (ergoemacs-to-sequence ergoemacs-read-key) ergoemacs-read-key nil) (while continue-read (setq continue-read nil) (if (and (not ergoemacs--input) real-type) (progn (setq type real-type) (setq curr-universal first-universal) (setq real-type nil))) (if (and ergoemacs-read-key (boundp (quote guide-key-mode)) guide-key-mode (not (equal ergoemacs-read-key-last-help ergoemacs-read-key)) (guide-key/popup-guide-buffer-p ergoemacs-read-key)) (progn (setq ergoemacs-read-key-last-help ergoemacs-read-key) (guide-key/popup-function ergoemacs-read-key))) (setq real-read (not ergoemacs--input)) (setq base (concat ":" (symbol-name type)) next-key (vector (ergoemacs-read-event type pretty-key nil curr-universal))) (setq next-key (ergoemacs-translate next-key)) (setq tmp (plist-get next-key (quote :normal))) (cond ((string= tmp "ESC") (setq tmp "<escape>")) ((string= tmp "RET") (setq tmp "<return>"))) (if (string= tmp (key-description (ergoemacs-key-fn-lookup (quote keyboard-quit)))) (cond ((and (not ergoemacs-read-key)) (ergoemacs-keyboard-quit)) ((and ergoemacs-read-key-last-help (boundp (quote guide-key-mode)) guide-key-mode) (setq ergoemacs-read-key-last-help nil guide-key/guide-key-sequence (delete (key-description ergoemacs-read-key) guide-key/guide-key-sequence) continue-read t) (guide-key/close-guide-buffer)) (t (if (minibufferp) nil (let (message-log-max) (setq tmp ...) (message "%s%s%s Canceled with %s" ... ... ... ...)))) (setq ergoemacs-describe-key nil)) (setq tmp (plist-get next-key (quote :normal-key))) (setq local-keymap (ergoemacs-local-map type)) (if (and (or real-read (and (boundp ...) modal-default)) local-keymap) (setq local-fn (lookup-key local-keymap tmp)) (setq local-fn nil)) (if (eq local-fn (quote ergoemacs-read-key-undo-last)) (if (= 0 (length history)) (setq continue-read nil) (setq tmp (car (prog1 history ...))) (setq continue-read t ergoemacs--input (nth 1 tmp) real-read nil real-type (nth 0 tmp)) (setq ergoemacs-read-key nil pretty-key nil type (quote normal) key-trial nil key-trials nil pretty-key-trial nil pretty-key nil)) (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn ...)) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not ...) (eq local-fn ...)) (progn (setq local-fn nil))) (if (memq local-fn (quote ...)) (progn (setq next-key ...) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials ...) (setq next-key ...) (setq key-trials ...) (setq key-trials ...) (setq next-key ...) (setq key-trials ...) (if ... ...) (if ergoemacs-translate-keys ...) (setq key-trials ...) (if ... nil ... ...))))))))
  ergoemacs-read-key("C-c" normal)
  (cond ((eq ergoemacs-handle-ctl-c-or-ctl-x (quote only-copy-cut)) (funcall fn-cp arg)) ((eq ergoemacs-handle-ctl-c-or-ctl-x (quote only-C-c-and-C-x)) (ergoemacs-read-key key (quote normal))) (this-command-keys-shift-translated (ergoemacs-read-key key (quote normal))) ((and ergoemacs-ctl-c-or-ctl-x-delay (or (region-active-p) (and (boundp (quote cua--rectangle)) cua--rectangle (boundp (quote cua-mode)) cua-mode))) (let ((next-key (let ((-with-timeout-value- ...)) (if (eq -with-timeout-value- ...) (progn nil) -with-timeout-value-)))) (if next-key (progn (ergoemacs-read-key (concat key " " next-key) (quote normal))) (funcall fn-cp arg)))) ((or (region-active-p) (and (boundp (quote cua--rectangle)) cua--rectangle (boundp (quote cua-mode)) cua-mode)) (funcall fn-cp arg)) (t (ergoemacs-read-key key (quote normal))))
  (let (fn-cp) (if (string= "C-c" key) (progn (setq fn-cp (quote ergoemacs-copy-line-or-region))) (progn (setq fn-cp (quote ergoemacs-cut-line-or-region)))) (cond ((eq ergoemacs-handle-ctl-c-or-ctl-x (quote only-copy-cut)) (funcall fn-cp arg)) ((eq ergoemacs-handle-ctl-c-or-ctl-x (quote only-C-c-and-C-x)) (ergoemacs-read-key key (quote normal))) (this-command-keys-shift-translated (ergoemacs-read-key key (quote normal))) ((and ergoemacs-ctl-c-or-ctl-x-delay (or (region-active-p) (and (boundp (quote cua--rectangle)) cua--rectangle (boundp (quote cua-mode)) cua-mode))) (let ((next-key (let (...) (if ... ... -with-timeout-value-)))) (if next-key (progn (ergoemacs-read-key (concat key " " next-key) (quote normal))) (funcall fn-cp arg)))) ((or (region-active-p) (and (boundp (quote cua--rectangle)) cua--rectangle (boundp (quote cua-mode)) cua-mode)) (funcall fn-cp arg)) (t (ergoemacs-read-key key (quote normal)))))
  ergoemacs-ctl-c-or-ctl-x("C-c" nil)
  ergoemacs-ctl-c(nil)
  call-interactively(ergoemacs-ctl-c nil nil)

As I tried to send the message again, I got that backtrace:

Debugger entered--Lisp error: (error "Key already exists in database")
  signal(error ("Key already exists in database"))
  error("Key already exists in database")
  #[(db key entry) "..." [key db entry tr --dolist-tail-- val gethash eieio-oref :data error "Key already exists in database" registry-full "registry max-hard size limit reached" puthash :tracked nil registry-lookup-secondary-value value-keys] 7 "Insert ENTRY under KEY into the registry-db THIS.\nUpdates the secondary ('tracked') indices as well.\nErrors out if the key exists already."]([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 (sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE
  apply(#[(db key entry) "...." [key db entry tr --dolist-tail-- val gethash eieio-oref :data error "Key already exists in database" registry-full "registry max-hard size limit reached" puthash :tracked nil registry-lookup-secondary-value value-keys] 7 "Insert ENTRY under KEY into the registry-db THIS.\nUpdates the secondary ('tracked') indices as well.\nErrors out if the key exists already."] ([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 (sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE
  registry-insert([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 (sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE
  gnus-registry-insert([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 (sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE
  (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc))))
  (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc)))))
  (progn (require (quote gnorb-org)) (setq gnorb-message-org-ids org-ids) (add-to-list (quote message-exit-actions) (quote gnorb-org-restore-after-send)) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc))))))
  (if org-ids (progn (require (quote gnorb-org)) (setq gnorb-message-org-ids org-ids) (add-to-list (quote message-exit-actions) (quote gnorb-org-restore-after-send)) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc)))))) (setq gnorb-message-org-ids nil))
  (let* ((org-ids (mail-fetch-field gnorb-mail-header nil nil t)) (msg-id (mail-fetch-field "Message-ID")) (refs (mail-fetch-field "References")) (to (if (message-news-p) (mail-fetch-field "Newsgroups") (mail-fetch-field "To"))) (from (mail-fetch-field "From")) (subject (mail-fetch-field "Subject")) (date (mail-fetch-field "Date")) (gcc (mail-fetch-field "Gcc")) (link (or (and gcc (org-store-link nil)) nil))) (if refs (progn (setq refs (split-string refs)))) (setq gnorb-gnus-sending-message-info (list (quote :subject) subject (quote :msg-id) msg-id (quote :to) to (quote :from) from (quote :link) link (quote :date) date (quote :refs) refs)) (if org-ids (progn (require (quote gnorb-org)) (setq gnorb-message-org-ids org-ids) (add-to-list (quote message-exit-actions) (quote gnorb-org-restore-after-send)) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list (list ... ...) (list ... from) (list ... subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id ... gcc)))))) (setq gnorb-message-org-ids nil)))
  (save-restriction (message-narrow-to-headers) (let* ((org-ids (mail-fetch-field gnorb-mail-header nil nil t)) (msg-id (mail-fetch-field "Message-ID")) (refs (mail-fetch-field "References")) (to (if (message-news-p) (mail-fetch-field "Newsgroups") (mail-fetch-field "To"))) (from (mail-fetch-field "From")) (subject (mail-fetch-field "Subject")) (date (mail-fetch-field "Date")) (gcc (mail-fetch-field "Gcc")) (link (or (and gcc (org-store-link nil)) nil))) (if refs (progn (setq refs (split-string refs)))) (setq gnorb-gnus-sending-message-info (list (quote :subject) subject (quote :msg-id) msg-id (quote :to) to (quote :from) from (quote :link) link (quote :date) date (quote :refs) refs)) (if org-ids (progn (require (quote gnorb-org)) (setq gnorb-message-org-ids org-ids) (add-to-list (quote message-exit-actions) (quote gnorb-org-restore-after-send)) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list ... ... ...)) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn ...))))) (setq gnorb-message-org-ids nil))))
  gnorb-gnus-check-outgoing-headers()
  run-hooks(message-header-hook)
  message-send-mail(nil)
  message-send-via-mail(nil)
  message-send(nil)
  message-send-and-exit(nil)
  call-interactively(message-send-and-exit nil [3 3])
  (let (deactivate-mark) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook)) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook) t) (run-hooks (quote ergoemacs-pre-command-hook)) (call-interactively function record-flag keys) (setq ergoemacs-deactivate-mark deactivate-mark) (if deactivate-mark (progn (setq ergoemacs-mark-active nil))))
  (let ((this-command-keys-shift-translated (or this-command-keys-shift-translated (if ergoemacs-shift-translated t nil)))) (if (featurep (quote keyfreq)) (progn (if keyfreq-mode (progn (let ((command ergoemacs-this-command) count) (setq count (gethash ... keyfreq-table)) (cond (...) (... ...) (count ...)) (setq count (gethash ... keyfreq-table)) (puthash (cons major-mode function) (if count ... 1) keyfreq-table)))))) (let (deactivate-mark) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook)) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook) t) (run-hooks (quote ergoemacs-pre-command-hook)) (call-interactively function record-flag keys) (setq ergoemacs-deactivate-mark deactivate-mark) (if deactivate-mark (progn (setq ergoemacs-mark-active nil)))))
  (cond ((ergoemacs-smart-function-p function) (error "Ergoemacs-mode is confused, and exiting out of an infinite loop (refused to call %s)" function)) (ergoemacs-test-fn (setq ergoemacs-test-fn function)) (ergoemacs-describe-key (let ((pt (point)) (buf (current-buffer)) (keys (quote nil)) test) (unwind-protect (save-excursion (describe-function function) (set-buffer (help-buffer)) (let ((inhibit-read-only t)) (goto-char (point-min)) (insert (format "%s runs the command " ...)) (if (search-forward " is" nil t) (progn ...)) (fill-paragraph) (if (search-forward "bound to" nil t) (progn ... ... ... ...)))) (setq ergoemacs-describe-key nil)))) ((condition-case nil (progn (string-match "self-insert" (symbol-name function))) (error nil)) (setq ergoemacs-single-command-keys keys) (setq last-input-event keys) (setq prefix-arg current-prefix-arg) (setq unread-command-events (append (listify-key-sequence keys) unread-command-events)) (ergoemacs-defer-post-command-hook) (reset-this-command-lengths)) (t (progn (let ((--dolist-tail-- ergoemacs-this-command-fake)) (while --dolist-tail-- (let ((var ...)) (set var function) (setq --dolist-tail-- (cdr --dolist-tail--)))))) (let ((this-command-keys-shift-translated (or this-command-keys-shift-translated (if ergoemacs-shift-translated t nil)))) (if (featurep (quote keyfreq)) (progn (if keyfreq-mode (progn (let ... ... ... ... ...))))) (let (deactivate-mark) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook)) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook) t) (run-hooks (quote ergoemacs-pre-command-hook)) (call-interactively function record-flag keys) (setq ergoemacs-deactivate-mark deactivate-mark) (if deactivate-mark (progn (setq ergoemacs-mark-active nil)))))))
  ergoemacs-read-key-call(message-send-and-exit nil [3 3])
  (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp fn) (symbol-name fn)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function)))
  (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (if (memq fn ergoemacs-universal-fns) (progn (setq ret (ergoemacs-read-key-lookup-get-ret---universal fn)))) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp fn) (symbol-name fn)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function))))
  (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp (nth 0 hash) t)) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp (nth 0 hash)) (symbol-name (nth 0 hash))) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp (nth 0 (nth 0 hash))) (not (nth 1 (nth 0 hash)))) (ergoemacs-read-key--send-unread (read-kbd-macro (nth 0 (nth 0 hash)) t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp (nth 0 (nth 0 hash)))) (setq ret (list (nth 0 (nth 0 hash)) (nth 1 (nth 0 hash)) (nth 1 (nth 0 hash))))) ((progn (setq tmp (lookup-key local-function-key-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil))) (if tmp nil (setq tmp (lookup-key key-translation-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil)))) tmp) (cond ((or (keymapp tmp)) (setq ret (quote keymap))) ((and ergoemacs-describe-key (vectorp tmp)) (setq ergoemacs-single-command-keys nil) (message "%s translates to %s" pretty-key (ergoemacs-pretty-key (key-description tmp))) (setq ergoemacs-describe-key nil) (setq ret (quote translate))) ((and (vectorp tmp) (progn (setq fn (ergoemacs-real-key-binding tmp)) (if (and ... ...) (progn ...)) (if (ergoemacs-smart-function-p fn) (progn ...)) (commandp fn t))) (setq fn (or (command-remapping fn (point)) fn)) (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp fn) (symbol-name fn)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote translate-fn))) ((vectorp tmp) (ergoemacs-read-key--send-unread tmp lookup use-override pretty-key) (setq ret (quote translate))))) ((progn (setq fn (ergoemacs-get-override-function key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret (quote local-function-override)))) ((progn (setq fn (ergoemacs-real-key-binding key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (if (memq fn ergoemacs-universal-fns) (progn (setq ret (ergoemacs-read-key-lookup-get-ret---universal fn)))) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp fn) (symbol-name fn)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function))))) ((progn (setq fn (or (let ((old-global-map ...) (new-global-map ...)) (unwind-protect (progn ... ...) (use-global-map old-global-map))) (if (eq (lookup-key ergoemacs-unbind-keymap key) (quote ergoemacs-undefined)) (quote ergoemacs-undefined) (let (ergoemacs-read-input-keys) (if ... ... ...))))) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (setq ergoemacs-single-command-keys key) (let (message-log-max) (if (string= pretty-key-undefined pretty-key) (message "%s%s%s" pretty-key (ergoemacs-unicode-char "→" "->") fn) (message "%s%s%s (from %s)" pretty-key (ergoemacs-unicode-char "→" "->") fn pretty-key-undefined))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-global-or-override)))))
  (progn (if overriding-terminal-local-map (progn (setq lookup (gethash (md5 (format "override-terminal-read:%s" overriding-terminal-local-map)) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-terminal-local-map lookup))))) (if overriding-local-map (progn (setq lookup (gethash (md5 (format "override-local-read:%s" overriding-local-map)) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-local-map lookup))))) (if (get-char-property (point) (quote keymap)) (progn (setq lookup (gethash (md5 (format "char-map-read:%s" (get-char-property ... ...))) ergoemacs-extract-map-hash)) (let (deactivate-mark) (if lookup (progn (setq tmp-overlay (make-overlay ... ...)) (overlay-put tmp-overlay (quote keymap) lookup) (overlay-put tmp-overlay (quote priority) 536870910)))))) (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp (nth 0 hash) t)) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp (nth 0 hash)) (symbol-name (nth 0 hash))) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp (nth 0 (nth 0 hash))) (not (nth 1 (nth 0 hash)))) (ergoemacs-read-key--send-unread (read-kbd-macro (nth 0 (nth 0 hash)) t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp (nth 0 (nth 0 hash)))) (setq ret (list (nth 0 (nth 0 hash)) (nth 1 (nth 0 hash)) (nth 1 (nth 0 hash))))) ((progn (setq tmp (lookup-key local-function-key-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil))) (if tmp nil (setq tmp (lookup-key key-translation-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil)))) tmp) (cond ((or (keymapp tmp)) (setq ret (quote keymap))) ((and ergoemacs-describe-key (vectorp tmp)) (setq ergoemacs-single-command-keys nil) (message "%s translates to %s" pretty-key (ergoemacs-pretty-key (key-description tmp))) (setq ergoemacs-describe-key nil) (setq ret (quote translate))) ((and (vectorp tmp) (progn (setq fn ...) (if ... ...) (if ... ...) (commandp fn t))) (setq fn (or (command-remapping fn ...) fn)) (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and ... ...) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote translate-fn))) ((vectorp tmp) (ergoemacs-read-key--send-unread tmp lookup use-override pretty-key) (setq ret (quote translate))))) ((progn (setq fn (ergoemacs-get-override-function key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret (quote local-function-override)))) ((progn (setq fn (ergoemacs-real-key-binding key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (if (memq fn ergoemacs-universal-fns) (progn (setq ret (ergoemacs-read-key-lookup-get-ret---universal fn)))) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and ... ...) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function))))) ((progn (setq fn (or (let (... ...) (unwind-protect ... ...)) (if (eq ... ...) (quote ergoemacs-undefined) (let ... ...)))) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (setq ergoemacs-single-command-keys key) (let (message-log-max) (if (string= pretty-key-undefined pretty-key) (message "%s%s%s" pretty-key (ergoemacs-unicode-char "→" "->") fn) (message "%s%s%s (from %s)" pretty-key (ergoemacs-unicode-char "→" "->") fn pretty-key-undefined))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-global-or-override))))))
  (unwind-protect (progn (if overriding-terminal-local-map (progn (setq lookup (gethash (md5 (format "override-terminal-read:%s" overriding-terminal-local-map)) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-terminal-local-map lookup))))) (if overriding-local-map (progn (setq lookup (gethash (md5 (format "override-local-read:%s" overriding-local-map)) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-local-map lookup))))) (if (get-char-property (point) (quote keymap)) (progn (setq lookup (gethash (md5 (format "char-map-read:%s" ...)) ergoemacs-extract-map-hash)) (let (deactivate-mark) (if lookup (progn (setq tmp-overlay ...) (overlay-put tmp-overlay ... lookup) (overlay-put tmp-overlay ... 536870910)))))) (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp (nth 0 hash) t)) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp ...) (symbol-name ...)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp (nth 0 (nth 0 hash))) (not (nth 1 (nth 0 hash)))) (ergoemacs-read-key--send-unread (read-kbd-macro (nth 0 (nth 0 hash)) t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp (nth 0 (nth 0 hash)))) (setq ret (list (nth 0 (nth 0 hash)) (nth 1 (nth 0 hash)) (nth 1 (nth 0 hash))))) ((progn (setq tmp (lookup-key local-function-key-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil))) (if tmp nil (setq tmp (lookup-key key-translation-map key)) (if (and tmp ...) (progn ...))) tmp) (cond ((or (keymapp tmp)) (setq ret (quote keymap))) ((and ergoemacs-describe-key (vectorp tmp)) (setq ergoemacs-single-command-keys nil) (message "%s translates to %s" pretty-key (ergoemacs-pretty-key ...)) (setq ergoemacs-describe-key nil) (setq ret (quote translate))) ((and (vectorp tmp) (progn ... ... ... ...)) (setq fn (or ... fn)) (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or ... ...)) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote translate-fn))) ((vectorp tmp) (ergoemacs-read-key--send-unread tmp lookup use-override pretty-key) (setq ret (quote translate))))) ((progn (setq fn (ergoemacs-get-override-function key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret (quote local-function-override)))) ((progn (setq fn (ergoemacs-real-key-binding key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn ...) fn)) (if (memq fn ergoemacs-universal-fns) (progn (setq ret ...))) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or ... ...)) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function))))) ((progn (setq fn (or (let ... ...) (if ... ... ...))) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn ...) fn)) (setq ergoemacs-single-command-keys key) (let (message-log-max) (if (string= pretty-key-undefined pretty-key) (message "%s%s%s" pretty-key ... fn) (message "%s%s%s (from %s)" pretty-key ... fn pretty-key-undefined))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-global-or-override)))))) (if (and tmp-overlay (not ergoemacs-read-key-overriding-overlay-save)) (progn (delete-overlay tmp-overlay))))
  (let* (ergoemacs-read-input-keys ergoemacs-modal ergoemacs-shortcut-keys ergoemacs-no-shortcut-keys (hash (and key (gethash key ergoemacs-command-shortcuts-hash))) lookup tmp-overlay use-override tmp ret fn) (unwind-protect (progn (if overriding-terminal-local-map (progn (setq lookup (gethash (md5 ...) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-terminal-local-map lookup))))) (if overriding-local-map (progn (setq lookup (gethash (md5 ...) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-local-map lookup))))) (if (get-char-property (point) (quote keymap)) (progn (setq lookup (gethash (md5 ...) ergoemacs-extract-map-hash)) (let (deactivate-mark) (if lookup (progn ... ... ...))))) (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp (nth 0 hash) t)) (ergoemacs-read-key--echo-command pretty-key (or (and ... ...) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp (nth 0 ...)) (not (nth 1 ...))) (ergoemacs-read-key--send-unread (read-kbd-macro (nth 0 ...) t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp (nth 0 ...))) (setq ret (list (nth 0 ...) (nth 1 ...) (nth 1 ...)))) ((progn (setq tmp (lookup-key local-function-key-map key)) (if (and tmp ...) (progn ...)) (if tmp nil (setq tmp ...) (if ... ...)) tmp) (cond ((or ...) (setq ret ...)) ((and ergoemacs-describe-key ...) (setq ergoemacs-single-command-keys nil) (message "%s translates to %s" pretty-key ...) (setq ergoemacs-describe-key nil) (setq ret ...)) ((and ... ...) (setq fn ...) (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key ...) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret ...)) ((vectorp tmp) (ergoemacs-read-key--send-unread tmp lookup use-override pretty-key) (setq ret ...)))) ((progn (setq fn (ergoemacs-get-override-function key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn ...)) (or ret (commandp fn t))) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret (quote local-function-override)))) ((progn (setq fn (ergoemacs-real-key-binding key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn ...)) (or ret (commandp fn t))) (if ret nil (setq fn (or ... fn)) (if (memq fn ergoemacs-universal-fns) (progn ...)) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key ...) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret ...)))) ((progn (setq fn (or ... ...)) (if (ergoemacs-smart-function-p fn) (progn ...)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (or ret (commandp fn t))) (if ret nil (setq fn (or ... fn)) (setq ergoemacs-single-command-keys key) (let (message-log-max) (if ... ... ...)) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-global-or-override)))))) (if (and tmp-overlay (not ergoemacs-read-key-overriding-overlay-save)) (progn (delete-overlay tmp-overlay)))) ret)
  (prog1 (let* (ergoemacs-read-input-keys ergoemacs-modal ergoemacs-shortcut-keys ergoemacs-no-shortcut-keys (hash (and key (gethash key ergoemacs-command-shortcuts-hash))) lookup tmp-overlay use-override tmp ret fn) (unwind-protect (progn (if overriding-terminal-local-map (progn (setq lookup (gethash ... ergoemacs-extract-map-hash)) (if lookup (progn ... ...)))) (if overriding-local-map (progn (setq lookup (gethash ... ergoemacs-extract-map-hash)) (if lookup (progn ... ...)))) (if (get-char-property (point) (quote keymap)) (progn (setq lookup (gethash ... ergoemacs-extract-map-hash)) (let (deactivate-mark) (if lookup ...)))) (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp ... t)) (ergoemacs-read-key--echo-command pretty-key (or ... ...)) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp ...) (not ...)) (ergoemacs-read-key--send-unread (read-kbd-macro ... t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp ...)) (setq ret (list ... ... ...))) ((progn (setq tmp ...) (if ... ...) (if tmp nil ... ...) tmp) (cond (... ...) (... ... ... ... ...) (... ... ... ... ... ... ...) (... ... ...))) ((progn (setq fn ...) (setq ret ...) (if ... ...) (or ret ...)) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret ...))) ((progn (setq fn ...) (setq ret ...) (if ... ...) (or ret ...)) (if ret nil (setq fn ...) (if ... ...) (if ret nil ... ... ... ... ...))) ((progn (setq fn ...) (if ... ...) (setq ret ...) (or ret ...)) (if ret nil (setq fn ...) (setq ergoemacs-single-command-keys key) (let ... ...) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret ...))))) (if (and tmp-overlay (not ergoemacs-read-key-overriding-overlay-save)) (progn (delete-overlay tmp-overlay)))) ret) (if unread-command-events (progn (if ergoemacs-modal (progn (setq ergoemacs-modal-save ergoemacs-modal))) (setq ergoemacs-modal nil) (set-default (quote ergoemacs-modal) nil))) (if ergoemacs-single-command-keys (progn (setq ergoemacs-read-input-keys nil))))
  ergoemacs-read-key-lookup([3 3] "^C】^C】")
  (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)
  (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil))
  (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car (prog1 key-trials (setq key-trials (cdr key-trials))))) (if (plist-get next-key (intern (concat tmp "-key"))) (progn (setq key-trial (if ergoemacs-read-key (vconcat ergoemacs-read-key (plist-get next-key ...)) (plist-get next-key (intern ...))) pretty-key-trial (if pretty-key (concat pretty-key (concat ... ...)) (concat (plist-get next-key ...) (if ergoemacs-use-ergoemacs-key-descriptions "" " "))))))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn (quote keymap)) (let ((new-fn (and ergoemacs-read-key (let ... ...)))) (if (condition-case nil (progn (commandp new-fn t)) (error nil)) (progn (setq local-fn (quote major-minor-override-fn)) (ergoemacs-read-key-call new-fn nil ergoemacs-read-key)) (if real-read (progn (setq history ...))) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial))) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history (cons (list type ...) history)))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 (nth 0 current-prefix-arg)))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (cond ((eq local-fn (quote keymap)) (if real-read (progn (setq history (cons (list type ...) history)))) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history (cons (list type ...) history)))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 (nth 0 current-prefix-arg)))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (if key-trials nil (setq key-trial nil)))
  (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car (prog1 key-trials (setq key-trials (cdr key-trials))))) (if (plist-get next-key (intern (concat tmp "-key"))) (progn (setq key-trial (if ergoemacs-read-key (vconcat ergoemacs-read-key ...) (plist-get next-key ...)) pretty-key-trial (if pretty-key (concat pretty-key ...) (concat ... ...)))))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn (quote keymap)) (let ((new-fn (and ergoemacs-read-key ...))) (if (condition-case nil (progn ...) (error nil)) (progn (setq local-fn ...) (ergoemacs-read-key-call new-fn nil ergoemacs-read-key)) (if real-read (progn ...)) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial))) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history (cons ... history)))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 (nth 0 current-prefix-arg)))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (cond ((eq local-fn (quote keymap)) (if real-read (progn (setq history (cons ... history)))) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history (cons ... history)))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 (nth 0 current-prefix-arg)))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (if key-trials nil (setq key-trial nil))) nil)
  (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car (prog1 key-trials (setq key-trials ...)))) (if (plist-get next-key (intern (concat tmp "-key"))) (progn (setq key-trial (if ergoemacs-read-key ... ...) pretty-key-trial (if pretty-key ... ...))))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn (quote keymap)) (let ((new-fn ...)) (if (condition-case nil ... ...) (progn ... ...) (if real-read ...) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial))) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history ...))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 ...))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (cond ((eq local-fn (quote keymap)) (if real-read (progn (setq history ...))) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history ...))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 ...))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (if key-trials nil (setq key-trial nil))) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined))))
  (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp (gethash (plist-get next-key (intern (concat base "-key"))) ergoemacs-command-shortcuts-hash)) (if (and tmp (commandp (nth 0 tmp) t)) (progn (progn (let (...) (while --dolist-tail-- ...))))))) (if ergoemacs-translate-keys (progn (progn (let ((--dolist-tail-- (quote ...))) (while --dolist-tail-- (let (...) (setq key-trials ...) (setq next-key ...) (setq key-trials ...) (setq --dolist-tail-- ...))))))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car (prog1 key-trials ...))) (if (plist-get next-key (intern ...)) (progn (setq key-trial ... pretty-key-trial ...)))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn (quote keymap)) (let (...) (if ... ... ... ...)) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn ...)) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence ...) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn ...) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote ...)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn ...) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list ...)) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (cond ((eq local-fn (quote keymap)) (if real-read (progn ...)) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn ...)) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence ...) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn ...) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote ...)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn ...) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list ...)) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (if key-trials nil (setq key-trial nil))) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined)))))
  (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp (gethash (plist-get next-key (intern ...)) ergoemacs-command-shortcuts-hash)) (if (and tmp (commandp (nth 0 tmp) t)) (progn (progn (let ... ...)))))) (if ergoemacs-translate-keys (progn (progn (let ((--dolist-tail-- ...)) (while --dolist-tail-- (let ... ... ... ... ...)))))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car ...)) (if (plist-get next-key ...) (progn ...))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn ...) (let ... ...) (throw ... t)) ((eq ... ...) (if real-read ...) (setq continue-read t ergoemacs--input ... ergoemacs-read-key nil pretty-key nil type ... real-type ... key-trial nil key-trials nil pretty-key-trial nil first-type ...) (throw ... t)) ((and ... ...) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg ...) (throw ... t)) ((and ... ...) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg ...) (throw ... t)) (local-fn (throw ... t))) (cond ((eq local-fn ...) (if real-read ...) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw ... t)) ((eq ... ...) (if real-read ...) (setq continue-read t ergoemacs--input ... ergoemacs-read-key nil pretty-key nil type ... real-type ... key-trial nil key-trials nil pretty-key-trial nil first-type ...) (throw ... t)) ((and ... ...) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg ...) (throw ... t)) ((and ... ...) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg ...) (throw ... t)) (local-fn (throw ... t))) (if key-trials nil (setq key-trial nil))) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined))))))
  (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn (setq history (cons (list type (listify-key-sequence ergoemacs-read-key)) history)))) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not (condition-case nil (progn (interactive-form local-fn)) (error nil))) (eq local-fn (quote ergoemacs-read-key-swap))) (progn (setq local-fn nil))) (if (memq local-fn (quote (ergoemacs-read-key-next-key-is-alt ergoemacs-read-key-next-key-is-ctl ergoemacs-read-key-next-key-is-alt-ctl ergoemacs-read-key-next-key-is-quoted))) (progn (setq next-key (funcall local-fn type pretty-key)) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp (gethash (plist-get next-key ...) ergoemacs-command-shortcuts-hash)) (if (and tmp (commandp ... t)) (progn (progn ...))))) (if ergoemacs-translate-keys (progn (progn (let (...) (while --dolist-tail-- ...))))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials ...) (setq tmp ...) (if ... ...)) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial ... nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond (... ... ...) (... ... ... ...) (... ... ...) (... ... ...) (local-fn ...)) (cond (... ... ... ...) (... ... ... ...) (... ... ...) (... ... ...) (local-fn ...)) (if key-trials nil (setq key-trial nil))) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined)))))))
  (if (eq local-fn (quote ergoemacs-read-key-undo-last)) (if (= 0 (length history)) (setq continue-read nil) (setq tmp (car (prog1 history (setq history (cdr history))))) (setq continue-read t ergoemacs--input (nth 1 tmp) real-read nil real-type (nth 0 tmp)) (setq ergoemacs-read-key nil pretty-key nil type (quote normal) key-trial nil key-trials nil pretty-key-trial nil pretty-key nil)) (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn (setq history (cons (list type ...) history)))) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not (condition-case nil (progn (interactive-form local-fn)) (error nil))) (eq local-fn (quote ergoemacs-read-key-swap))) (progn (setq local-fn nil))) (if (memq local-fn (quote (ergoemacs-read-key-next-key-is-alt ergoemacs-read-key-next-key-is-ctl ergoemacs-read-key-next-key-is-alt-ctl ergoemacs-read-key-next-key-is-quoted))) (progn (setq next-key (funcall local-fn type pretty-key)) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp (gethash ... ergoemacs-command-shortcuts-hash)) (if (and tmp ...) (progn ...)))) (if ergoemacs-translate-keys (progn (progn (let ... ...)))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while ... ... ...) (if pretty-key-undefined nil ...) (setq ergoemacs-shift-translated ...) (setq deactivate-mark nil) (setq local-fn ...) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ... ... ... ... ...) (cond ... ... ... ... ...) (if key-trials nil ...)) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined))))))))
  (if (string= tmp (key-description (ergoemacs-key-fn-lookup (quote keyboard-quit)))) (cond ((and (not ergoemacs-read-key)) (ergoemacs-keyboard-quit)) ((and ergoemacs-read-key-last-help (boundp (quote guide-key-mode)) guide-key-mode) (setq ergoemacs-read-key-last-help nil guide-key/guide-key-sequence (delete (key-description ergoemacs-read-key) guide-key/guide-key-sequence) continue-read t) (guide-key/close-guide-buffer)) (t (if (minibufferp) nil (let (message-log-max) (setq tmp (gethash type ergoemacs-translation-text)) (message "%s%s%s Canceled with %s" (if ergoemacs-describe-key "Help for: " "") (if tmp (nth 5 tmp) "") (or pretty-key "") (if ergoemacs-use-ergoemacs-key-descriptions (plist-get next-key ...) (concat ... " ")))))) (setq ergoemacs-describe-key nil)) (setq tmp (plist-get next-key (quote :normal-key))) (setq local-keymap (ergoemacs-local-map type)) (if (and (or real-read (and (boundp (quote modal-default)) modal-default)) local-keymap) (setq local-fn (lookup-key local-keymap tmp)) (setq local-fn nil)) (if (eq local-fn (quote ergoemacs-read-key-undo-last)) (if (= 0 (length history)) (setq continue-read nil) (setq tmp (car (prog1 history (setq history (cdr history))))) (setq continue-read t ergoemacs--input (nth 1 tmp) real-read nil real-type (nth 0 tmp)) (setq ergoemacs-read-key nil pretty-key nil type (quote normal) key-trial nil key-trials nil pretty-key-trial nil pretty-key nil)) (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn (setq history (cons ... history)))) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not (condition-case nil (progn ...) (error nil))) (eq local-fn (quote ergoemacs-read-key-swap))) (progn (setq local-fn nil))) (if (memq local-fn (quote (ergoemacs-read-key-next-key-is-alt ergoemacs-read-key-next-key-is-ctl ergoemacs-read-key-next-key-is-alt-ctl ergoemacs-read-key-next-key-is-quoted))) (progn (setq next-key (funcall local-fn type pretty-key)) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp ...) (if ... ...))) (if ergoemacs-translate-keys (progn (progn ...))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials ... ... ... ... ... ... ... ... ... ...) nil) nil (beep) (if (minibufferp) nil (let ... ...))))))))
  (while continue-read (setq continue-read nil) (if (and (not ergoemacs--input) real-type) (progn (setq type real-type) (setq curr-universal first-universal) (setq real-type nil))) (if (and ergoemacs-read-key (boundp (quote guide-key-mode)) guide-key-mode (not (equal ergoemacs-read-key-last-help ergoemacs-read-key)) (guide-key/popup-guide-buffer-p ergoemacs-read-key)) (progn (setq ergoemacs-read-key-last-help ergoemacs-read-key) (guide-key/popup-function ergoemacs-read-key))) (setq real-read (not ergoemacs--input)) (setq base (concat ":" (symbol-name type)) next-key (vector (ergoemacs-read-event type pretty-key nil curr-universal))) (setq next-key (ergoemacs-translate next-key)) (setq tmp (plist-get next-key (quote :normal))) (cond ((string= tmp "ESC") (setq tmp "<escape>")) ((string= tmp "RET") (setq tmp "<return>"))) (if (string= tmp (key-description (ergoemacs-key-fn-lookup (quote keyboard-quit)))) (cond ((and (not ergoemacs-read-key)) (ergoemacs-keyboard-quit)) ((and ergoemacs-read-key-last-help (boundp (quote guide-key-mode)) guide-key-mode) (setq ergoemacs-read-key-last-help nil guide-key/guide-key-sequence (delete (key-description ergoemacs-read-key) guide-key/guide-key-sequence) continue-read t) (guide-key/close-guide-buffer)) (t (if (minibufferp) nil (let (message-log-max) (setq tmp (gethash type ergoemacs-translation-text)) (message "%s%s%s Canceled with %s" (if ergoemacs-describe-key "Help for: " "") (if tmp ... "") (or pretty-key "") (if ergoemacs-use-ergoemacs-key-descriptions ... ...))))) (setq ergoemacs-describe-key nil)) (setq tmp (plist-get next-key (quote :normal-key))) (setq local-keymap (ergoemacs-local-map type)) (if (and (or real-read (and (boundp (quote modal-default)) modal-default)) local-keymap) (setq local-fn (lookup-key local-keymap tmp)) (setq local-fn nil)) (if (eq local-fn (quote ergoemacs-read-key-undo-last)) (if (= 0 (length history)) (setq continue-read nil) (setq tmp (car (prog1 history (setq history ...)))) (setq continue-read t ergoemacs--input (nth 1 tmp) real-read nil real-type (nth 0 tmp)) (setq ergoemacs-read-key nil pretty-key nil type (quote normal) key-trial nil key-trials nil pretty-key-trial nil pretty-key nil)) (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn (setq history ...))) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not (condition-case nil ... ...)) (eq local-fn (quote ergoemacs-read-key-swap))) (progn (setq local-fn nil))) (if (memq local-fn (quote (ergoemacs-read-key-next-key-is-alt ergoemacs-read-key-next-key-is-ctl ergoemacs-read-key-next-key-is-alt-ctl ergoemacs-read-key-next-key-is-quoted))) (progn (setq next-key (funcall local-fn type pretty-key)) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons ... key-trials)) (setq key-trials (cons ... key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key ...)) (setq key-trials (cons ... key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn ... ...)) (if ergoemacs-translate-keys (progn ...)) (setq key-trials (reverse key-trials)) (if (catch ... ... nil) nil (beep) (if ... nil ...))))))))
  (let ((continue-read t) (guide-key/guide-key-sequence (quote nil)) (guide-key/recursive-key-sequence-flag t) (real-type (or type (quote normal))) (first-type (or type (quote normal))) deactivate-mark pretty-key pretty-key-undefined next-key (ergoemacs-read-key key) key-trial pretty-key-trial (type (or initial-key-type (quote normal))) base local-keymap local-fn key-trials real-read (first-universal universal) (curr-universal nil) ergoemacs--input tmp history) (setq ergoemacs--input (ergoemacs-to-sequence ergoemacs-read-key) ergoemacs-read-key nil) (while continue-read (setq continue-read nil) (if (and (not ergoemacs--input) real-type) (progn (setq type real-type) (setq curr-universal first-universal) (setq real-type nil))) (if (and ergoemacs-read-key (boundp (quote guide-key-mode)) guide-key-mode (not (equal ergoemacs-read-key-last-help ergoemacs-read-key)) (guide-key/popup-guide-buffer-p ergoemacs-read-key)) (progn (setq ergoemacs-read-key-last-help ergoemacs-read-key) (guide-key/popup-function ergoemacs-read-key))) (setq real-read (not ergoemacs--input)) (setq base (concat ":" (symbol-name type)) next-key (vector (ergoemacs-read-event type pretty-key nil curr-universal))) (setq next-key (ergoemacs-translate next-key)) (setq tmp (plist-get next-key (quote :normal))) (cond ((string= tmp "ESC") (setq tmp "<escape>")) ((string= tmp "RET") (setq tmp "<return>"))) (if (string= tmp (key-description (ergoemacs-key-fn-lookup (quote keyboard-quit)))) (cond ((and (not ergoemacs-read-key)) (ergoemacs-keyboard-quit)) ((and ergoemacs-read-key-last-help (boundp (quote guide-key-mode)) guide-key-mode) (setq ergoemacs-read-key-last-help nil guide-key/guide-key-sequence (delete (key-description ergoemacs-read-key) guide-key/guide-key-sequence) continue-read t) (guide-key/close-guide-buffer)) (t (if (minibufferp) nil (let (message-log-max) (setq tmp ...) (message "%s%s%s Canceled with %s" ... ... ... ...)))) (setq ergoemacs-describe-key nil)) (setq tmp (plist-get next-key (quote :normal-key))) (setq local-keymap (ergoemacs-local-map type)) (if (and (or real-read (and (boundp ...) modal-default)) local-keymap) (setq local-fn (lookup-key local-keymap tmp)) (setq local-fn nil)) (if (eq local-fn (quote ergoemacs-read-key-undo-last)) (if (= 0 (length history)) (setq continue-read nil) (setq tmp (car (prog1 history ...))) (setq continue-read t ergoemacs--input (nth 1 tmp) real-read nil real-type (nth 0 tmp)) (setq ergoemacs-read-key nil pretty-key nil type (quote normal) key-trial nil key-trials nil pretty-key-trial nil pretty-key nil)) (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn ...)) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not ...) (eq local-fn ...)) (progn (setq local-fn nil))) (if (memq local-fn (quote ...)) (progn (setq next-key ...) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials ...) (setq next-key ...) (setq key-trials ...) (setq key-trials ...) (setq next-key ...) (setq key-trials ...) (if ... ...) (if ergoemacs-translate-keys ...) (setq key-trials ...) (if ... nil ... ...))))))))
  ergoemacs-read-key("C-c" normal)
  (cond ((eq ergoemacs-handle-ctl-c-or-ctl-x (quote only-copy-cut)) (funcall fn-cp arg)) ((eq ergoemacs-handle-ctl-c-or-ctl-x (quote only-C-c-and-C-x)) (ergoemacs-read-key key (quote normal))) (this-command-keys-shift-translated (ergoemacs-read-key key (quote normal))) ((and ergoemacs-ctl-c-or-ctl-x-delay (or (region-active-p) (and (boundp (quote cua--rectangle)) cua--rectangle (boundp (quote cua-mode)) cua-mode))) (let ((next-key (let ((-with-timeout-value- ...)) (if (eq -with-timeout-value- ...) (progn nil) -with-timeout-value-)))) (if next-key (progn (ergoemacs-read-key (concat key " " next-key) (quote normal))) (funcall fn-cp arg)))) ((or (region-active-p) (and (boundp (quote cua--rectangle)) cua--rectangle (boundp (quote cua-mode)) cua-mode)) (funcall fn-cp arg)) (t (ergoemacs-read-key key (quote normal))))
  (let (fn-cp) (if (string= "C-c" key) (progn (setq fn-cp (quote ergoemacs-copy-line-or-region))) (progn (setq fn-cp (quote ergoemacs-cut-line-or-region)))) (cond ((eq ergoemacs-handle-ctl-c-or-ctl-x (quote only-copy-cut)) (funcall fn-cp arg)) ((eq ergoemacs-handle-ctl-c-or-ctl-x (quote only-C-c-and-C-x)) (ergoemacs-read-key key (quote normal))) (this-command-keys-shift-translated (ergoemacs-read-key key (quote normal))) ((and ergoemacs-ctl-c-or-ctl-x-delay (or (region-active-p) (and (boundp (quote cua--rectangle)) cua--rectangle (boundp (quote cua-mode)) cua-mode))) (let ((next-key (let (...) (if ... ... -with-timeout-value-)))) (if next-key (progn (ergoemacs-read-key (concat key " " next-key) (quote normal))) (funcall fn-cp arg)))) ((or (region-active-p) (and (boundp (quote cua--rectangle)) cua--rectangle (boundp (quote cua-mode)) cua-mode)) (funcall fn-cp arg)) (t (ergoemacs-read-key key (quote normal)))))
  ergoemacs-ctl-c-or-ctl-x("C-c" nil)
  ergoemacs-ctl-c(nil)
  call-interactively(ergoemacs-ctl-c nil nil)

The only way to send the message was to remove the sending hook.

brabalan commented 10 years ago

As a followup, I was getting many errors when trying to open my Sent group, which were resolved by deleting the registry and starting from scratch. So I guess a side effect of this bug was to break the registry.

girzel commented 10 years ago

Well that was a doozy -- my apologies for wrecking your registry! I'm looking into a fix...

On 07/31/14 02:55 AM, Alan Schmitt wrote:

As a followup, I was getting many errors when trying to open my Sent group, which were resolved by deleting the registry and starting from scratch. So I guess a side effect of this bug was to break the registry.

Reply to this email directly or view it on GitHub.*

brabalan commented 10 years ago

Thanks. And don't worry about the registry, as I cannot really use it right now, I'm not losing anything.

girzel commented 10 years ago

Okay, this started to get into mission creep, so I've pushed a preliminary change that should stop errors. It should actually work fine for you now (fingers crossed), though there's a lot of refactoring and cleanup that needs to be done now.

On 07/30/14 10:41 AM, Alan Schmitt wrote:

I gave this a try. I opened a mail with gnorb-org-handle-mail and as I was trying to send the mail, I got this backtrace in the debugger.

Debugger entered--Lisp error: (wrong-type-argument listp "nnimap+zimbra:Sent")

[(db key entry) "..." [key db entry tr --dolist-tail-- val gethash eieio-oref :data error "Key already exists in database" registry-full "registry max-hard size limit reached" puthash :tracked nil registry-lookup-secondary-value value-keys] 7 "Insert ENTRY under KEY into the registry-db THIS.\nUpdates the secondary ('tracked') indices as well.\nErrors out if the key exists already."]([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 %28sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE

apply(#[(db key entry) "..." [key db entry tr --dolist-tail-- val gethash eieio-oref :data error "Key already exists in database" registry-full "registry max-hard size limit reached" puthash :tracked nil registry-lookup-secondary-value value-keys] 7 "Insert ENTRY under KEY into the registry-db THIS.\nUpdates the secondary ('tracked') indices as well.\nErrors out if the key exists already."]([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 %28sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE registry-insert([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 (sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE gnus-registry-insert([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 (sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE gnus-registry-set-id-key("m2d2cm6evq.fsf@top-wifi.irisa.fr" group "nnimap+zimbra:Sent") (progn (gnus-registry-set-id-key msg-id (quote group) gcc)) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc))) (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc)))) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc))))) (progn (require (quote gnorb-org)) (setq gnorb-message-org-ids org-ids) (add-to-list (quote message-exit-actions) (quote gnorb-org-restore-after-send)) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc)))))) (if org-ids (progn (require (quote gnorb-org)) (setq gnorb-message-org-ids org-ids) (add-to-list (quote message-exit-actions) (quote gnorb-org-restore-after-send)) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc)))))) (setq gnorb-message-org-ids nil)) (let* ((org-ids (mail-fetch-field gnorb-mail-header nil nil t)) (msg-id (mail-fetch-field "Message-ID")) (refs (mail-fetch-field "References")) (to (if (message-news-p) (mail-fetch-field "Newsgroups") (mail-fetch-field "To"))) (from (mail-fetch-field "From")) (subject (mail-fetch-field "Subject")) (date (mail-fetch-field "Date")) (gcc (mail-fetch-field "Gcc")) (link (or (and gcc (org-store-link nil)) nil))) (if refs (progn (setq refs (split-string refs)))) (setq gnorb-gnus-sending-message-info (list (quote :subject) subject (quote :msg-id) msg-id (quote :to) to (quote :from) from (quote :link) link (quote :date) date (quote :refs) refs)) (if org-ids (progn (require (quote gnorb-org)) (setq gnorb-message-org-ids org-ids) (add-to-list (quote message-exit-actions) (quote gnorb-org-restore-after-send)) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list (list ... ...) (list ... from) (list ... subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id ... gcc)))))) (setq gnorb-message-org-ids nil))) (save-restriction (message-narrow-to-headers) (let* ((org-ids (mail-fetch-field gnorb-mail-header nil nil t)) (msg-id (mail-fetch-field "Message-ID")) (refs (mail-fetch-field "References")) (to (if (message-news-p) (mail-fetch-field "Newsgroups") (mail-fetch-field "To"))) (from (mail-fetch-field "From")) (subject (mail-fetch-field "Subject")) (date (mail-fetch-field "Date")) (gcc (mail-fetch-field "Gcc")) (link (or (and gcc (org-store-link nil)) nil))) (if refs (progn (setq refs (split-string refs)))) (setq gnorb-gnus-sending-message-info (list (quote :subject) subject (quote :msg-id) msg-id (quote :to) to (quote :from) from (quote :link) link (quote :date) date (quote :refs) refs)) (if org-ids (progn (require (quote gnorb-org)) (setq gnorb-message-org-ids org-ids) (add-to-list (quote message-exit-actions) (quote gnorb-org-restore-after-send)) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list ... ... ...)) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn ...))))) (setq gnorb-message-org-ids nil)))) gnorb-gnus-check-outgoing-headers() run-hooks(message-header-hook) message-send-mail(nil) message-send-via-mail(nil) message-send(nil) message-send-and-exit(nil) call-interactively(message-send-and-exit nil [3 3]) (let (deactivate-mark) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook)) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook) t) (run-hooks (quote ergoemacs-pre-command-hook)) (call-interactively function record-flag keys) (setq ergoemacs-deactivate-mark deactivate-mark) (if deactivate-mark (progn (setq ergoemacs-mark-active nil)))) (let ((this-command-keys-shift-translated (or this-command-keys-shift-translated (if ergoemacs-shift-translated t nil)))) (if (featurep (quote keyfreq)) (progn (if keyfreq-mode (progn (let ((command ergoemacs-this-command) count) (setq count (gethash ... keyfreq-table)) (cond (...) (... ...) (count ...)) (setq count (gethash ... keyfreq-table)) (puthash (cons major-mode function) (if count ... 1) keyfreq-table)))))) (let (deactivate-mark) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook)) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook) t) (run-hooks (quote ergoemacs-pre-command-hook)) (call-interactively function record-flag keys) (setq ergoemacs-deactivate-mark deactivate-mark) (if deactivate-mark (progn (setq ergoemacs-mark-active nil))))) (cond ((ergoemacs-smart-function-p function) (error "Ergoemacs-mode is confused, and exiting out of an infinite loop (refused to call %s)" function)) (ergoemacs-test-fn (setq ergoemacs-test-fn function)) (ergoemacs-describe-key (let ((pt (point)) (buf (current-buffer)) (keys (quote nil)) test) (unwind-protect (save-excursion (describe-function function) (set-buffer (help-buffer)) (let ((inhibit-read-only t)) (goto-char (point-min)) (insert (format "%s runs the command " ...)) (if (search-forward " is" nil t) (progn ...)) (fill-paragraph) (if (search-forward "bound to" nil t) (progn ... ... ... ...)))) (setq ergoemacs-describe-key nil)))) ((condition-case nil (progn (string-match "self-insert" (symbol-name function))) (error nil)) (setq ergoemacs-single-command-keys keys) (setq last-input-event keys) (setq prefix-arg current-prefix-arg) (setq unread-command-events (append (listify-key-sequence keys) unread-command-events)) (ergoemacs-defer-post-command-hook) (reset-this-command-lengths)) (t (progn (let ((--dolist-tail-- ergoemacs-this-command-fake)) (while --dolist-tail-- (let ((var ...)) (set var function) (setq --dolist-tail-- (cdr --dolist-tail--)))))) (let ((this-command-keys-shift-translated (or this-command-keys-shift-translated (if ergoemacs-shift-translated t nil)))) (if (featurep (quote keyfreq)) (progn (if keyfreq-mode (progn (let ... ... ... ... ...))))) (let (deactivate-mark) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook)) (remove-hook (quote ergoemacs-pre-command-hook) (quote ergoemacs-pre-command-hook) t) (run-hooks (quote ergoemacs-pre-command-hook)) (call-interactively function record-flag keys) (setq ergoemacs-deactivate-mark deactivate-mark) (if deactivate-mark (progn (setq ergoemacs-mark-active nil))))))) ergoemacs-read-key-call(message-send-and-exit nil [3 3]) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp fn) (symbol-name fn)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function))) (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (if (memq fn ergoemacs-universal-fns) (progn (setq ret (ergoemacs-read-key-lookup-get-ret---universal fn)))) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp fn) (symbol-name fn)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function)))) (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp (nth 0 hash) t)) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp (nth 0 hash)) (symbol-name (nth 0 hash))) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp (nth 0 (nth 0 hash))) (not (nth 1 (nth 0 hash)))) (ergoemacs-read-key--send-unread (read-kbd-macro (nth 0 (nth 0 hash)) t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp (nth 0 (nth 0 hash)))) (setq ret (list (nth 0 (nth 0 hash)) (nth 1 (nth 0 hash)) (nth 1 (nth 0 hash))))) ((progn (setq tmp (lookup-key local-function-key-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil))) (if tmp nil (setq tmp (lookup-key key-translation-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil)))) tmp) (cond ((or (keymapp tmp)) (setq ret (quote keymap))) ((and ergoemacs-describe-key (vectorp tmp)) (setq ergoemacs-single-command-keys nil) (message "%s translates to %s" pretty-key (ergoemacs-pretty-key (key-description tmp))) (setq ergoemacs-describe-key nil) (setq ret (quote translate))) ((and (vectorp tmp) (progn (setq fn (ergoemacs-real-key-binding tmp)) (if (and ... ...) (progn ...)) (if (ergoemacs-smart-function-p fn) (progn ...)) (commandp fn t))) (setq fn (or (command-remapping fn (point)) fn)) (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp fn) (symbol-name fn)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote translate-fn))) ((vectorp tmp) (ergoemacs-read-key--send-unread tmp lookup use-override pretty-key) (setq ret (quote translate))))) ((progn (setq fn (ergoemacs-get-override-function key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret (quote local-function-override)))) ((progn (setq fn (ergoemacs-real-key-binding key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (if (memq fn ergoemacs-universal-fns) (progn (setq ret (ergoemacs-read-key-lookup-get-ret---universal fn)))) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp fn) (symbol-name fn)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function))))) ((progn (setq fn (or (let ((old-global-map ...) (new-global-map ...)) (unwind-protect (progn ... ...) (use-global-map old-global-map))) (if (eq (lookup-key ergoemacs-unbind-keymap key) (quote ergoemacs-undefined)) (quote ergoemacs-undefined) (let (ergoemacs-read-input-keys) (if ... ... ...))))) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (setq ergoemacs-single-command-keys key) (let (message-log-max) (if (string= pretty-key-undefined pretty-key) (message "%s%s%s" pretty-key (ergoemacs-unicode-char "→" "->") fn) (message "%s%s%s (from %s)" pretty-key (ergoemacs-unicode-char "→" "->") fn pretty-key-undefined))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-global-or-override))))) (progn (if overriding-terminal-local-map (progn (setq lookup (gethash (md5 (format "override-terminal-read:%s" overriding-terminal-local-map)) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-terminal-local-map lookup))))) (if overriding-local-map (progn (setq lookup (gethash (md5 (format "override-local-read:%s" overriding-local-map)) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-local-map lookup))))) (if (get-char-property (point) (quote keymap)) (progn (setq lookup (gethash (md5 (format "char-map-read:%s" (get-char-property ... ...))) ergoemacs-extract-map-hash)) (let (deactivate-mark) (if lookup (progn (setq tmp-overlay (make-overlay ... ...)) (overlay-put tmp-overlay (quote keymap) lookup) (overlay-put tmp-overlay (quote priority) 536870910)))))) (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp (nth 0 hash) t)) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp (nth 0 hash)) (symbol-name (nth 0 hash))) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp (nth 0 (nth 0 hash))) (not (nth 1 (nth 0 hash)))) (ergoemacs-read-key--send-unread (read-kbd-macro (nth 0 (nth 0 hash)) t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp (nth 0 (nth 0 hash)))) (setq ret (list (nth 0 (nth 0 hash)) (nth 1 (nth 0 hash)) (nth 1 (nth 0 hash))))) ((progn (setq tmp (lookup-key local-function-key-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil))) (if tmp nil (setq tmp (lookup-key key-translation-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil)))) tmp) (cond ((or (keymapp tmp)) (setq ret (quote keymap))) ((and ergoemacs-describe-key (vectorp tmp)) (setq ergoemacs-single-command-keys nil) (message "%s translates to %s" pretty-key (ergoemacs-pretty-key (key-description tmp))) (setq ergoemacs-describe-key nil) (setq ret (quote translate))) ((and (vectorp tmp) (progn (setq fn ...) (if ... ...) (if ... ...) (commandp fn t))) (setq fn (or (command-remapping fn ...) fn)) (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and ... ...) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote translate-fn))) ((vectorp tmp) (ergoemacs-read-key--send-unread tmp lookup use-override pretty-key) (setq ret (quote translate))))) ((progn (setq fn (ergoemacs-get-override-function key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret (quote local-function-override)))) ((progn (setq fn (ergoemacs-real-key-binding key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (if (memq fn ergoemacs-universal-fns) (progn (setq ret (ergoemacs-read-key-lookup-get-ret---universal fn)))) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or (and ... ...) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function))))) ((progn (setq fn (or (let (... ...) (unwind-protect ... ...)) (if (eq ... ...) (quote ergoemacs-undefined) (let ... ...)))) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn (point)) fn)) (setq ergoemacs-single-command-keys key) (let (message-log-max) (if (string= pretty-key-undefined pretty-key) (message "%s%s%s" pretty-key (ergoemacs-unicode-char "→" "->") fn) (message "%s%s%s (from %s)" pretty-key (ergoemacs-unicode-char "→" "->") fn pretty-key-undefined))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-global-or-override)))))) (unwind-protect (progn (if overriding-terminal-local-map (progn (setq lookup (gethash (md5 (format "override-terminal-read:%s" overriding-terminal-local-map)) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-terminal-local-map lookup))))) (if overriding-local-map (progn (setq lookup (gethash (md5 (format "override-local-read:%s" overriding-local-map)) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-local-map lookup))))) (if (get-char-property (point) (quote keymap)) (progn (setq lookup (gethash (md5 (format "char-map-read:%s" ...)) ergoemacs-extract-map-hash)) (let (deactivate-mark) (if lookup (progn (setq tmp-overlay ...) (overlay-put tmp-overlay ... lookup) (overlay-put tmp-overlay ... 536870910)))))) (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp (nth 0 hash) t)) (ergoemacs-read-key--echo-command pretty-key (or (and (symbolp ...) (symbol-name ...)) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp (nth 0 (nth 0 hash))) (not (nth 1 (nth 0 hash)))) (ergoemacs-read-key--send-unread (read-kbd-macro (nth 0 (nth 0 hash)) t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp (nth 0 (nth 0 hash)))) (setq ret (list (nth 0 (nth 0 hash)) (nth 1 (nth 0 hash)) (nth 1 (nth 0 hash))))) ((progn (setq tmp (lookup-key local-function-key-map key)) (if (and tmp (integerp tmp)) (progn (setq tmp nil))) (if tmp nil (setq tmp (lookup-key key-translation-map key)) (if (and tmp ...) (progn ...))) tmp) (cond ((or (keymapp tmp)) (setq ret (quote keymap))) ((and ergoemacs-describe-key (vectorp tmp)) (setq ergoemacs-single-command-keys nil) (message "%s translates to %s" pretty-key (ergoemacs-pretty-key ...)) (setq ergoemacs-describe-key nil) (setq ret (quote translate))) ((and (vectorp tmp) (progn ... ... ... ...)) (setq fn (or ... fn)) (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or ... ...)) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote translate-fn))) ((vectorp tmp) (ergoemacs-read-key--send-unread tmp lookup use-override pretty-key) (setq ret (quote translate))))) ((progn (setq fn (ergoemacs-get-override-function key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret (quote local-function-override)))) ((progn (setq fn (ergoemacs-real-key-binding key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn ...) fn)) (if (memq fn ergoemacs-universal-fns) (progn (setq ret ...))) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key (or ... ...)) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function))))) ((progn (setq fn (or (let ... ...) (if ... ... ...))) (if (ergoemacs-smart-function-p fn) (progn (setq fn nil))) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (or ret (commandp fn t))) (if ret nil (setq fn (or (command-remapping fn ...) fn)) (setq ergoemacs-single-command-keys key) (let (message-log-max) (if (string= pretty-key-undefined pretty-key) (message "%s%s%s" pretty-key ... fn) (message "%s%s%s (from %s)" pretty-key ... fn pretty-key-undefined))) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-global-or-override)))))) (if (and tmp-overlay (not ergoemacs-read-key-overriding-overlay-save)) (progn (delete-overlay tmp-overlay)))) (let* (ergoemacs-read-input-keys ergoemacs-modal ergoemacs-shortcut-keys ergoemacs-no-shortcut-keys (hash (and key (gethash key ergoemacs-command-shortcuts-hash))) lookup tmp-overlay use-override tmp ret fn) (unwind-protect (progn (if overriding-terminal-local-map (progn (setq lookup (gethash (md5 ...) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-terminal-local-map lookup))))) (if overriding-local-map (progn (setq lookup (gethash (md5 ...) ergoemacs-extract-map-hash)) (if lookup (progn (setq use-override t) (setq overriding-local-map lookup))))) (if (get-char-property (point) (quote keymap)) (progn (setq lookup (gethash (md5 ...) ergoemacs-extract-map-hash)) (let (deactivate-mark) (if lookup (progn ... ... ...))))) (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp (nth 0 hash) t)) (ergoemacs-read-key--echo-command pretty-key (or (and ... ...) (ergoemacs-unicode-char "λ" "lambda"))) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp (nth 0 ...)) (not (nth 1 ...))) (ergoemacs-read-key--send-unread (read-kbd-macro (nth 0 ...) t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp (nth 0 ...))) (setq ret (list (nth 0 ...) (nth 1 ...) (nth 1 ...)))) ((progn (setq tmp (lookup-key local-function-key-map key)) (if (and tmp ...) (progn ...)) (if tmp nil (setq tmp ...) (if ... ...)) tmp) (cond ((or ...) (setq ret ...)) ((and ergoemacs-describe-key ...) (setq ergoemacs-single-command-keys nil) (message "%s translates to %s" pretty-key ...) (setq ergoemacs-describe-key nil) (setq ret ...)) ((and ... ...) (setq fn ...) (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key ...) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret ...)) ((vectorp tmp) (ergoemacs-read-key--send-unread tmp lookup use-override pretty-key) (setq ret ...)))) ((progn (setq fn (ergoemacs-get-override-function key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn ...)) (or ret (commandp fn t))) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret (quote local-function-override)))) ((progn (setq fn (ergoemacs-real-key-binding key)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (if (ergoemacs-smart-function-p fn) (progn ...)) (or ret (commandp fn t))) (if ret nil (setq fn (or ... fn)) (if (memq fn ergoemacs-universal-fns) (progn ...)) (if ret nil (setq ergoemacs-single-command-keys key) (ergoemacs-read-key--echo-command pretty-key ...) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret ...)))) ((progn (setq fn (or ... ...)) (if (ergoemacs-smart-function-p fn) (progn ...)) (setq ret (ergoemacs-read-key-lookup-get-ret fn)) (or ret (commandp fn t))) (if ret nil (setq fn (or ... fn)) (setq ergoemacs-single-command-keys key) (let (message-log-max) (if ... ... ...)) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-global-or-override)))))) (if (and tmp-overlay (not ergoemacs-read-key-overriding-overlay-save)) (progn (delete-overlay tmp-overlay)))) ret) (prog1 (let* (ergoemacs-read-input-keys ergoemacs-modal ergoemacs-shortcut-keys ergoemacs-no-shortcut-keys (hash (and key (gethash key ergoemacs-command-shortcuts-hash))) lookup tmp-overlay use-override tmp ret fn) (unwind-protect (progn (if overriding-terminal-local-map (progn (setq lookup (gethash ... ergoemacs-extract-map-hash)) (if lookup (progn ... ...)))) (if overriding-local-map (progn (setq lookup (gethash ... ergoemacs-extract-map-hash)) (if lookup (progn ... ...)))) (if (get-char-property (point) (quote keymap)) (progn (setq lookup (gethash ... ergoemacs-extract-map-hash)) (let (deactivate-mark) (if lookup ...)))) (cond ((and key (member key ergoemacs-shortcut-prefix-keys)) (setq ret (quote keymap))) ((and hash (commandp ... t)) (ergoemacs-read-key--echo-command pretty-key (or ... ...)) (ergoemacs-shortcut-remap (nth 0 hash)) (setq ergoemacs-single-command-keys nil) (setq ret (quote function-remap))) ((and hash (stringp ...) (not ...)) (ergoemacs-read-key--send-unread (read-kbd-macro ... t) lookup use-override pretty-key) (setq ret (quote unread))) ((and hash (stringp ...)) (setq ret (list ... ... ...))) ((progn (setq tmp ...) (if ... ...) (if tmp nil ... ...) tmp) (cond (... ...) (... ... ... ... ...) (... ... ... ... ... ... ...) (... ... ...))) ((progn (setq fn ...) (setq ret ...) (if ... ...) (or ret ...)) (if ret nil (ergoemacs-read-key-call fn nil key) (setq ret ...))) ((progn (setq fn ...) (setq ret ...) (if ... ...) (or ret ...)) (if ret nil (setq fn ...) (if ... ...) (if ret nil ... ... ... ... ...))) ((progn (setq fn ...) (if ... ...) (setq ret ...) (or ret ...)) (if ret nil (setq fn ...) (setq ergoemacs-single-command-keys key) (let ... ...) (ergoemacs-read-key-call fn nil key) (setq ergoemacs-single-command-keys nil) (setq ret ...))))) (if (and tmp-overlay (not ergoemacs-read-key-overriding-overlay-save)) (progn (delete-overlay tmp-overlay)))) ret) (if unread-command-events (progn (if ergoemacs-modal (progn (setq ergoemacs-modal-save ergoemacs-modal))) (setq ergoemacs-modal nil) (set-default (quote ergoemacs-modal) nil))) (if ergoemacs-single-command-keys (progn (setq ergoemacs-read-input-keys nil)))) ergoemacs-read-key-lookup([3 3] "^C】^C】") (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car (prog1 key-trials (setq key-trials (cdr key-trials))))) (if (plist-get next-key (intern (concat tmp "-key"))) (progn (setq key-trial (if ergoemacs-read-key (vconcat ergoemacs-read-key (plist-get next-key ...)) (plist-get next-key (intern ...))) pretty-key-trial (if pretty-key (concat pretty-key (concat ... ...)) (concat (plist-get next-key ...) (if ergoemacs-use-ergoemacs-key-descriptions "" " "))))))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn (quote keymap)) (let ((new-fn (and ergoemacs-read-key (let ... ...)))) (if (condition-case nil (progn (commandp new-fn t)) (error nil)) (progn (setq local-fn (quote major-minor-override-fn)) (ergoemacs-read-key-call new-fn nil ergoemacs-read-key)) (if real-read (progn (setq history ...))) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial))) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history (cons (list type ...) history)))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 (nth 0 current-prefix-arg)))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (cond ((eq local-fn (quote keymap)) (if real-read (progn (setq history (cons (list type ...) history)))) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history (cons (list type ...) history)))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 (nth 0 current-prefix-arg)))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (if key-trials nil (setq key-trial nil))) (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car (prog1 key-trials (setq key-trials (cdr key-trials))))) (if (plist-get next-key (intern (concat tmp "-key"))) (progn (setq key-trial (if ergoemacs-read-key (vconcat ergoemacs-read-key ...) (plist-get next-key ...)) pretty-key-trial (if pretty-key (concat pretty-key ...) (concat ... ...)))))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn (quote keymap)) (let ((new-fn (and ergoemacs-read-key ...))) (if (condition-case nil (progn ...) (error nil)) (progn (setq local-fn ...) (ergoemacs-read-key-call new-fn nil ergoemacs-read-key)) (if real-read (progn ...)) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial))) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history (cons ... history)))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 (nth 0 current-prefix-arg)))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (cond ((eq local-fn (quote keymap)) (if real-read (progn (setq history (cons ... history)))) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history (cons ... history)))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 (nth 0 current-prefix-arg)))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (if key-trials nil (setq key-trial nil))) nil) (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car (prog1 key-trials (setq key-trials ...)))) (if (plist-get next-key (intern (concat tmp "-key"))) (progn (setq key-trial (if ergoemacs-read-key ... ...) pretty-key-trial (if pretty-key ... ...))))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn (quote keymap)) (let ((new-fn ...)) (if (condition-case nil ... ...) (progn ... ...) (if real-read ...) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial))) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history ...))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 ...))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (cond ((eq local-fn (quote keymap)) (if real-read (progn (setq history ...))) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn (setq history ...))) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence (nth 0 local-fn)) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote (4))) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn (quote universal)) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list (* 4 ...))) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (if key-trials nil (setq key-trial nil))) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined)))) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp (gethash (plist-get next-key (intern (concat base "-key"))) ergoemacs-command-shortcuts-hash)) (if (and tmp (commandp (nth 0 tmp) t)) (progn (progn (let (...) (while --dolist-tail-- ...))))))) (if ergoemacs-translate-keys (progn (progn (let ((--dolist-tail-- (quote ...))) (while --dolist-tail-- (let (...) (setq key-trials ...) (setq next-key ...) (setq key-trials ...) (setq --dolist-tail-- ...))))))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car (prog1 key-trials ...))) (if (plist-get next-key (intern ...)) (progn (setq key-trial ... pretty-key-trial ...)))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn (quote keymap)) (let (...) (if ... ... ... ...)) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn ...)) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence ...) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn ...) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote ...)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn ...) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list ...)) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (cond ((eq local-fn (quote keymap)) (if real-read (progn ...)) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw (quote ergoemacs-key-trials) t)) ((eq (type-of local-fn) (quote cons)) (if real-read (progn ...)) (setq continue-read t ergoemacs--input (ergoemacs-to-sequence ...) ergoemacs-read-key nil pretty-key nil type (quote normal) real-type (nth 1 local-fn) key-trial nil key-trials nil pretty-key-trial nil first-type (nth 2 local-fn)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn ...) (not current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (quote ...)) (throw (quote ergoemacs-key-trials) t)) ((and (eq local-fn ...) (listp current-prefix-arg)) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg (list ...)) (throw (quote ergoemacs-key-trials) t)) (local-fn (throw (quote ergoemacs-key-trials) t))) (if key-trials nil (setq key-trial nil))) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined))))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp (gethash (plist-get next-key (intern ...)) ergoemacs-command-shortcuts-hash)) (if (and tmp (commandp (nth 0 tmp) t)) (progn (progn (let ... ...)))))) (if ergoemacs-translate-keys (progn (progn (let ((--dolist-tail-- ...)) (while --dolist-tail-- (let ... ... ... ... ...)))))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials (not key-trial)) (setq tmp (car ...)) (if (plist-get next-key ...) (progn ...))) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial (ergoemacs-read-key-lookup key-trial pretty-key-trial) nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ((eq local-fn ...) (let ... ...) (throw ... t)) ((eq ... ...) (if real-read ...) (setq continue-read t ergoemacs--input ... ergoemacs-read-key nil pretty-key nil type ... real-type ... key-trial nil key-trials nil pretty-key-trial nil first-type ...) (throw ... t)) ((and ... ...) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg ...) (throw ... t)) ((and ... ...) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg ...) (throw ... t)) (local-fn (throw ... t))) (cond ((eq local-fn ...) (if real-read ...) (setq continue-read t ergoemacs-read-key key-trial pretty-key pretty-key-trial) (throw ... t)) ((eq ... ...) (if real-read ...) (setq continue-read t ergoemacs--input ... ergoemacs-read-key nil pretty-key nil type ... real-type ... key-trial nil key-trials nil pretty-key-trial nil first-type ...) (throw ... t)) ((and ... ...) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg ...) (throw ... t)) ((and ... ...) (setq curr-universal t continue-read t ergoemacs-read-key nil pretty-key nil key-trial nil key-trials nil pretty-key-trial nil current-prefix-arg ...) (throw ... t)) (local-fn (throw ... t))) (if key-trials nil (setq key-trial nil))) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined)))))) (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn (setq history (cons (list type (listify-key-sequence ergoemacs-read-key)) history)))) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not (condition-case nil (progn (interactive-form local-fn)) (error nil))) (eq local-fn (quote ergoemacs-read-key-swap))) (progn (setq local-fn nil))) (if (memq local-fn (quote (ergoemacs-read-key-next-key-is-alt ergoemacs-read-key-next-key-is-ctl ergoemacs-read-key-next-key-is-alt-ctl ergoemacs-read-key-next-key-is-quoted))) (progn (setq next-key (funcall local-fn type pretty-key)) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp (gethash (plist-get next-key ...) ergoemacs-command-shortcuts-hash)) (if (and tmp (commandp ... t)) (progn (progn ...))))) (if ergoemacs-translate-keys (progn (progn (let (...) (while --dolist-tail-- ...))))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while (and key-trials ...) (setq tmp ...) (if ... ...)) (if pretty-key-undefined nil (setq pretty-key-undefined pretty-key-trial)) (setq ergoemacs-shift-translated (string-match "-shift-translated" tmp)) (setq deactivate-mark nil) (setq local-fn (if key-trial ... nil)) (setq ergoemacs-deactivate-mark deactivate-mark) (cond (... ... ...) (... ... ... ...) (... ... ...) (... ... ...) (local-fn ...)) (cond (... ... ... ...) (... ... ... ...) (... ... ...) (... ... ...) (local-fn ...)) (if key-trials nil (setq key-trial nil))) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined))))))) (if (eq local-fn (quote ergoemacs-read-key-undo-last)) (if (= 0 (length history)) (setq continue-read nil) (setq tmp (car (prog1 history (setq history (cdr history))))) (setq continue-read t ergoemacs--input (nth 1 tmp) real-read nil real-type (nth 0 tmp)) (setq ergoemacs-read-key nil pretty-key nil type (quote normal) key-trial nil key-trials nil pretty-key-trial nil pretty-key nil)) (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn (setq history (cons (list type ...) history)))) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not (condition-case nil (progn (interactive-form local-fn)) (error nil))) (eq local-fn (quote ergoemacs-read-key-swap))) (progn (setq local-fn nil))) (if (memq local-fn (quote (ergoemacs-read-key-next-key-is-alt ergoemacs-read-key-next-key-is-ctl ergoemacs-read-key-next-key-is-alt-ctl ergoemacs-read-key-next-key-is-quoted))) (progn (setq next-key (funcall local-fn type pretty-key)) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp (gethash ... ergoemacs-command-shortcuts-hash)) (if (and tmp ...) (progn ...)))) (if ergoemacs-translate-keys (progn (progn (let ... ...)))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials (setq key-trial nil) (while ... ... ...) (if pretty-key-undefined nil ...) (setq ergoemacs-shift-translated ...) (setq deactivate-mark nil) (setq local-fn ...) (setq ergoemacs-deactivate-mark deactivate-mark) (cond ... ... ... ... ...) (cond ... ... ... ... ...) (if key-trials nil ...)) nil) nil (beep) (if (minibufferp) nil (let (message-log-max) (message "%s is undefined!" pretty-key-undefined)))))))) (if (string= tmp (key-description (ergoemacs-key-fn-lookup (quote keyboard-quit)))) (cond ((and (not ergoemacs-read-key)) (ergoemacs-keyboard-quit)) ((and ergoemacs-read-key-last-help (boundp (quote guide-key-mode)) guide-key-mode) (setq ergoemacs-read-key-last-help nil guide-key/guide-key-sequence (delete (key-description ergoemacs-read-key) guide-key/guide-key-sequence) continue-read t) (guide-key/close-guide-buffer)) (t (if (minibufferp) nil (let (message-log-max) (setq tmp (gethash type ergoemacs-translation-text)) (message "%s%s%s Canceled with %s" (if ergoemacs-describe-key "Help for: " "") (if tmp (nth 5 tmp) "") (or pretty-key "") (if ergoemacs-use-ergoemacs-key-descriptions (plist-get next-key ...) (concat ... " ")))))) (setq ergoemacs-describe-key nil)) (setq tmp (plist-get next-key (quote :normal-key))) (setq local-keymap (ergoemacs-local-map type)) (if (and (or real-read (and (boundp (quote modal-default)) modal-default)) local-keymap) (setq local-fn (lookup-key local-keymap tmp)) (setq local-fn nil)) (if (eq local-fn (quote ergoemacs-read-key-undo-last)) (if (= 0 (length history)) (setq continue-read nil) (setq tmp (car (prog1 history (setq history (cdr history))))) (setq continue-read t ergoemacs--input (nth 1 tmp) real-read nil real-type (nth 0 tmp)) (setq ergoemacs-read-key nil pretty-key nil type (quote normal) key-trial nil key-trials nil pretty-key-trial nil pretty-key nil)) (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn (setq history (cons ... history)))) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not (condition-case nil (progn ...) (error nil))) (eq local-fn (quote ergoemacs-read-key-swap))) (progn (setq local-fn nil))) (if (memq local-fn (quote (ergoemacs-read-key-next-key-is-alt ergoemacs-read-key-next-key-is-ctl ergoemacs-read-key-next-key-is-alt-ctl ergoemacs-read-key-next-key-is-quoted))) (progn (setq next-key (funcall local-fn type pretty-key)) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons (concat base "-et") key-trials)) (setq key-trials (cons (concat base "-shift-translated") key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key (concat base "-shift-translated"))) (setq key-trials (cons (concat base "-shift-translated-et") key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn (setq tmp ...) (if ... ...))) (if ergoemacs-translate-keys (progn (progn ...))) (setq key-trials (reverse key-trials)) (if (catch (quote ergoemacs-key-trials) (while key-trials ... ... ... ... ... ... ... ... ... ...) nil) nil (beep) (if (minibufferp) nil (let ... ...)))))))) (while continue-read (setq continue-read nil) (if (and (not ergoemacs--input) real-type) (progn (setq type real-type) (setq curr-universal first-universal) (setq real-type nil))) (if (and ergoemacs-read-key (boundp (quote guide-key-mode)) guide-key-mode (not (equal ergoemacs-read-key-last-help ergoemacs-read-key)) (guide-key/popup-guide-buffer-p ergoemacs-read-key)) (progn (setq ergoemacs-read-key-last-help ergoemacs-read-key) (guide-key/popup-function ergoemacs-read-key))) (setq real-read (not ergoemacs--input)) (setq base (concat ":" (symbol-name type)) next-key (vector (ergoemacs-read-event type pretty-key nil curr-universal))) (setq next-key (ergoemacs-translate next-key)) (setq tmp (plist-get next-key (quote :normal))) (cond ((string= tmp "ESC") (setq tmp "")) ((string= tmp "RET") (setq tmp ""))) (if (string= tmp (key-description (ergoemacs-key-fn-lookup (quote keyboard-quit)))) (cond ((and (not ergoemacs-read-key)) (ergoemacs-keyboard-quit)) ((and ergoemacs-read-key-last-help (boundp (quote guide-key-mode)) guide-key-mode) (setq ergoemacs-read-key-last-help nil guide-key/guide-key-sequence (delete (key-description ergoemacs-read-key) guide-key/guide-key-sequence) continue-read t) (guide-key/close-guide-buffer)) (t (if (minibufferp) nil (let (message-log-max) (setq tmp (gethash type ergoemacs-translation-text)) (message "%s%s%s Canceled with %s" (if ergoemacs-describe-key "Help for: " "") (if tmp ... "") (or pretty-key "") (if ergoemacs-use-ergoemacs-key-descriptions ... ...))))) (setq ergoemacs-describe-key nil)) (setq tmp (plist-get next-key (quote :normal-key))) (setq local-keymap (ergoemacs-local-map type)) (if (and (or real-read (and (boundp (quote modal-default)) modal-default)) local-keymap) (setq local-fn (lookup-key local-keymap tmp)) (setq local-fn nil)) (if (eq local-fn (quote ergoemacs-read-key-undo-last)) (if (= 0 (length history)) (setq continue-read nil) (setq tmp (car (prog1 history (setq history ...)))) (setq continue-read t ergoemacs--input (nth 1 tmp) real-read nil real-type (nth 0 tmp)) (setq ergoemacs-read-key nil pretty-key nil type (quote normal) key-trial nil key-trials nil pretty-key-trial nil pretty-key nil)) (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn (setq history ...))) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not (condition-case nil ... ...)) (eq local-fn (quote ergoemacs-read-key-swap))) (progn (setq local-fn nil))) (if (memq local-fn (quote (ergoemacs-read-key-next-key-is-alt ergoemacs-read-key-next-key-is-ctl ergoemacs-read-key-next-key-is-alt-ctl ergoemacs-read-key-next-key-is-quoted))) (progn (setq next-key (funcall local-fn type pretty-key)) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials (cons base key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key base)) (setq key-trials (cons ... key-trials)) (setq key-trials (cons ... key-trials)) (setq next-key (ergoemacs-read-key-add-translation next-key ...)) (setq key-trials (cons ... key-trials)) (if (and ergoemacs-read-key ergoemacs-translate-emacs-keys) (progn ... ...)) (if ergoemacs-translate-keys (progn ...)) (setq key-trials (reverse key-trials)) (if (catch ... ... nil) nil (beep) (if ... nil ...)))))))) (let ((continue-read t) (guide-key/guide-key-sequence (quote nil)) (guide-key/recursive-key-sequence-flag t) (real-type (or type (quote normal))) (first-type (or type (quote normal))) deactivate-mark pretty-key pretty-key-undefined next-key (ergoemacs-read-key key) key-trial pretty-key-trial (type (or initial-key-type (quote normal))) base local-keymap local-fn key-trials real-read (first-universal universal) (curr-universal nil) ergoemacs--input tmp history) (setq ergoemacs--input (ergoemacs-to-sequence ergoemacs-read-key) ergoemacs-read-key nil) (while continue-read (setq continue-read nil) (if (and (not ergoemacs--input) real-type) (progn (setq type real-type) (setq curr-universal first-universal) (setq real-type nil))) (if (and ergoemacs-read-key (boundp (quote guide-key-mode)) guide-key-mode (not (equal ergoemacs-read-key-last-help ergoemacs-read-key)) (guide-key/popup-guide-buffer-p ergoemacs-read-key)) (progn (setq ergoemacs-read-key-last-help ergoemacs-read-key) (guide-key/popup-function ergoemacs-read-key))) (setq real-read (not ergoemacs--input)) (setq base (concat ":" (symbol-name type)) next-key (vector (ergoemacs-read-event type pretty-key nil curr-universal))) (setq next-key (ergoemacs-translate next-key)) (setq tmp (plist-get next-key (quote :normal))) (cond ((string= tmp "ESC") (setq tmp "")) ((string= tmp "RET") (setq tmp ""))) (if (string= tmp (key-description (ergoemacs-key-fn-lookup (quote keyboard-quit)))) (cond ((and (not ergoemacs-read-key)) (ergoemacs-keyboard-quit)) ((and ergoemacs-read-key-last-help (boundp (quote guide-key-mode)) guide-key-mode) (setq ergoemacs-read-key-last-help nil guide-key/guide-key-sequence (delete (key-description ergoemacs-read-key) guide-key/guide-key-sequence) continue-read t) (guide-key/close-guide-buffer)) (t (if (minibufferp) nil (let (message-log-max) (setq tmp ...) (message "%s%s%s Canceled with %s" ... ... ... ...)))) (setq ergoemacs-describe-key nil)) (setq tmp (plist-get next-key (quote :normal-key))) (setq local-keymap (ergoemacs-local-map type)) (if (and (or real-read (and (boundp ...) modal-default)) local-keymap) (setq local-fn (lookup-key local-keymap tmp)) (setq local-fn nil)) (if (eq local-fn (quote ergoemacs-read-key-undo-last)) (if (= 0 (length history)) (setq continue-read nil) (setq tmp (car (prog1 history ...))) (setq continue-read t ergoemacs--input (nth 1 tmp) real-read nil real-type (nth 0 tmp)) (setq ergoemacs-read-key nil pretty-key nil type (quote normal) key-trial nil key-trials nil pretty-key-trial nil pretty-key nil)) (if (and (eq local-fn (quote ergoemacs-read-key-swap)) (or (not curr-universal) ergoemacs-read-key)) (progn (if (and real-read ergoemacs-backspace-will-undo-swap-translation) (progn ...)) (setq type (ergoemacs-read-key-swap first-type type) continue-read t)) (setq curr-universal nil) (if (or (not ...) (eq local-fn ...)) (progn (setq local-fn nil))) (if (memq local-fn (quote ...)) (progn (setq next-key ...) (setq local-fn nil))) (if (eq local-fn (quote ergoemacs-read-key-help)) (setq continue-read (ergoemacs-read-key-help)) (if local-fn (ergoemacs-read-key-call local-fn) (setq pretty-key-undefined nil) (setq key-trials nil) (setq key-trials ...) (setq next-key ...) (setq key-trials ...) (setq key-trials ...) (setq next-key ...) (setq key-trials ...) (if ... ...) (if ergoemacs-translate-keys ...) (setq key-trials ...) (if ... nil ... ...)))))))) ergoemacs-read-key("C-c" normal) (cond ((eq ergoemacs-handle-ctl-c-or-ctl-x (quote only-copy-cut)) (funcall fn-cp arg)) ((eq ergoemacs-handle-ctl-c-or-ctl-x (quote only-C-c-and-C-x)) (ergoemacs-read-key key (quote normal))) (this-command-keys-shift-translated (ergoemacs-read-key key (quote normal))) ((and ergoemacs-ctl-c-or-ctl-x-delay (or (region-active-p) (and (boundp (quote cua--rectangle)) cua--rectangle (boundp (quote cua-mode)) cua-mode))) (let ((next-key (let ((-with-timeout-value- ...)) (if (eq -with-timeout-value- ...) (progn nil) -with-timeout-value-)))) (if next-key (progn (ergoemacs-read-key (concat key " " next-key) (quote normal))) (funcall fn-cp arg)))) ((or (region-active-p) (and (boundp (quote cua--rectangle)) cua--rectangle (boundp (quote cua-mode)) cua-mode)) (funcall fn-cp arg)) (t (ergoemacs-read-key key (quote normal)))) (let (fn-cp) (if (string= "C-c" key) (progn (setq fn-cp (quote ergoemacs-copy-line-or-region))) (progn (setq fn-cp (quote ergoemacs-cut-line-or-region)))) (cond ((eq ergoemacs-handle-ctl-c-or-ctl-x (quote only-copy-cut)) (funcall fn-cp arg)) ((eq ergoemacs-handle-ctl-c-or-ctl-x (quote only-C-c-and-C-x)) (ergoemacs-read-key key (quote normal))) (this-command-keys-shift-translated (ergoemacs-read-key key (quote normal))) ((and ergoemacs-ctl-c-or-ctl-x-delay (or (region-active-p) (and (boundp (quote cua--rectangle)) cua--rectangle (boundp (quote cua-mode)) cua-mode))) (let ((next-key (let (...) (if ... ... -with-timeout-value-)))) (if next-key (progn (ergoemacs-read-key (concat key " " next-key) (quote normal))) (funcall fn-cp arg)))) ((or (region-active-p) (and (boundp (quote cua--rectangle)) cua--rectangle (boundp (quote cua-mode)) cua-mode)) (funcall fn-cp arg)) (t (ergoemacs-read-key key (quote normal))))) ergoemacs-ctl-c-or-ctl-x("C-c" nil) ergoemacs-ctl-c(nil) call-interactively(ergoemacs-ctl-c nil nil)

As I tried to send the message again, I got that backtrace:

Debugger entered--Lisp error: (error "Key already exists in database") signal(error ("Key already exists in database")) error("Key already exists in database")

[(db key entry) "..." [key db entry tr --dolist-tail-- val gethash eieio-oref :data error "Key already exists in database" registry-full "registry max-hard size limit reached" puthash :tracked nil registry-lookup-secondary-value value-keys] 7 "Insert ENTRY under KEY into the registry-db THIS.\nUpdates the secondary ('tracked') indices as well.\nErrors out if the key exists already."]([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 %28sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE

apply(#[(db key entry) "...." [key db entry tr --dolist-tail-- val gethash eieio-oref :data error "Key already exists in database" registry-full "registry max-hard size limit reached" puthash :tracked nil registry-lookup-secondary-value value-keys] 7 "Insert ENTRY under KEY into the registry-db THIS.\nUpdates the secondary ('tracked') indices as well.\nErrors out if the key exists already."]([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 %28sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE registry-insert([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 (sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE gnus-registry-insert([object registry-db "Gnus Registry" "~/.gnus.registry.eioio" 0.1 2305843009213693951 2305843009213693951 0.1 (sender subject recipient mark group keyword) (gnorb-ids mark) #s(hash-table size 100 test eql rehash-size 2.0 rehash-threshold 0.8 data (subject #s(hash-table size 12800 test equal rehash-size 2.0 rehash-threshold 0.8 data ( LINE CUT HERE (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc)))) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (gnus-registry-set-id-key msg-id (quote gnorb-ids) org-ids) (if gcc (progn (gnus-registry-set-id-key msg-id (quote group) gcc))))) (progn (require (quote gnorb-org)) (setq gnorb-message-org-ids org-ids) (add-to-list (quote message-exit-actions) (quote gnorb-org-restore-after-send)) (if gnus-registry-enabled (progn (gnus-registry-insert gnus-registry-db msg-id (list (list (quote creation-time) (current-time)) (list (quote sender) from) (list (quote subject) subject))) (

brabalan commented 10 years ago

OK, I gave this a try. I sent a message to myself, created a task out of it, and did a gnorb-org-handle-mail on the task. There was no error when I sent the message, and I saw a GNORB_MSG_ID property added.

After sending the message, however, I did not get asked if I wanted to add a note or change the todo state. Is this expected? Here are my gnorb settings:

  (setq gnorb-gnus-mail-search-backend 'notmuch)

  (setq gnorb-org-mail-todos '("TODO" "NEXT")) 

  (setq gnorb-gnus-new-todo-capture-key "w")

  (setq gnorb-org-mail-scan-strategies
        '(((:type state :scope first-link) 2)
          (nil text)
          offer))

I then tried gnorb-org-view and it opened a mailbox with both the initial message and the reply, as expected. This is most convenient!

(By the way, I would really like to use your gnorb backend for gnus link in org-mode. The way org fetches the messages in gnus often makes an unrelated message read, if the last message in the target mailbox is unread.)

girzel commented 10 years ago

Cool!

Whether or not you get prompted for a note or state-change depends on a few things:

  1. The TODO state of your "w' capture template: what's that?
  2. The value of `gnorb-org-mail-todos', which you've noted below.
  3. The value of `gnorb-trigger-todo-default' -- can you tell me what that is?

I've noticed a little irregularity in this area as well, so it would be helpful to know what your settings are, and I'll go digging.

I am glad the `gnorb-org-view' results were as expected, that was one of the big original goals!

The built-in Org function for following Gnus links does many strange things. I think I have a better solution, but I'm very wary of the variety of people's different Gnus installations -- it's very hard to provide something that works reliably across all setups. Maybe I'll start with an option that says "use Gnorb's function for following Gnus links", and let people choose that if they like.

I'll warn you now that, if you call `gnorb-org-handle-mail' on a message, and that message is already displayed in a group's summary buffer, the function will find the message, then move down to the message below that one, and reply to that. That's why I say this is a hard problem :)

Ideally, I'll provide a patch to Org once I feel confident I've sorted all the issues out.

brabalan commented 10 years ago

My 'w' capture template is as follows:

          ("w" "Wait for reply" entry (file "refile-orgx.org")
           "* WAITING reply from %:to about %:subject\n%?Sent on %:date-timestamp-inactive, link: %a")

Note that the todo I was replying to had been created by another template:

          ("T" "todo with link" entry (file "refile-orgx.org")
           "* TODO %?\n %U\n\n%a")

so it was a "TODO" task.

I did not set gnorb-trigger-todo-default so its value is the default prompt.

In fact, I did not do things differently than before, and it used to prompt me for a task change.

Regarding linking and gnus, this is one reason I like using notmuch. But it's only a partial solution: since I have to get back into gnus at some point (I'm not ready to only use notmuch for my mail), I still need to fetch the message and I have the same issues as with org linking. It's good to know I should be careful with messages being displayed in a summary.

Finally, I've been testing refiling and expiring with the two patches I sent on gnus.general and it finally works (I was able to create a link to a message in a mailbox, have it expired and move to another mailbox, to finally have it found by the registry).

brabalan commented 10 years ago

In fact, I did not do things differently than before, and it used to prompt me for a task change.

I just noticed something: I was not prompted for a message when calling gnorb-org-handle-mail from an org buffer, but I was prompted when calling gnorb-org-handle-mail from the agenda. Is there an expected difference?

girzel commented 6 years ago

Ahem, my apologies for letting this go for three years; I'm going to assume the bug no longer applies, since many of the relevant customization options no longer exist! Please open a new issue if something's still not behaving correctly (assuming you're still using Gnorb!).