ergoemacs / ergoemacs-mode

ergoemacs-mode
ergoemacs.github.io/
GNU General Public License v3.0
293 stars 35 forks source link

How to unset <f6> in ergoemacs-mode #349

Closed magichowl closed 9 years ago

magichowl commented 9 years ago

I rarely use <Alt+> command mode, and I want to make use of the key ,

However, neither of the followings worked,

(global-unset-key (kbd "<f6>"))
(ergoemacs-theme-component pan ()
(global-unset-key (kbd "<f6>"))
)
mattfidler commented 9 years ago

Have you tried global-set-key? I don't have access to a computer until Monday.

On Sat, Aug 1, 2015, 2:06 PM SPan notifications@github.com wrote:

I rarely use command mode, and I want to make use of the key ,

However, both the followings are not work,

(global-unset-key (kbd ""))

(ergoemacs-theme-component pan () (global-unset-key (kbd "")) )

— Reply to this email directly or view it on GitHub https://github.com/ergoemacs/ergoemacs-mode/issues/349.

mattfidler commented 9 years ago

(global-set-key [f6] 'undefined) may work

On Sat, Aug 1, 2015, 3:32 PM Matthew Fidler matthew.fidler@gmail.com wrote:

Have you tried global-set-key? I don't have access to a computer until Monday.

On Sat, Aug 1, 2015, 2:06 PM SPan notifications@github.com wrote:

I rarely use command mode, and I want to make use of the key ,

However, both the followings are not work,

(global-unset-key (kbd ""))

(ergoemacs-theme-component pan () (global-unset-key (kbd "")) )

— Reply to this email directly or view it on GitHub https://github.com/ergoemacs/ergoemacs-mode/issues/349.

magichowl commented 9 years ago

Matthew Fidler notifications@github.com writes:

(global-set-key [f6] 'undefined) may work

Yes, it works.

However, I want to set a local-key for

(setq pdf-annot-minor-mode-map-prefix (kbd "<f6>"))

which is variable defined in pdf-tools mode

global key of [f6] override the local key, even set [f6] as undefined.

On Sat, Aug 1, 2015, 3:32 PM Matthew Fidler matthew.fidler@gmail.com wrote:

Have you tried global-set-key? I don't have access to a computer until Monday.

On Sat, Aug 1, 2015, 2:06 PM SPan notifications@github.com wrote:

I rarely use command mode, and I want to make use of the key ,

However, both the followings are not work,

(global-unset-key (kbd ""))

(ergoemacs-theme-component pan () (global-unset-key (kbd "")) )

— Reply to this email directly or view it on GitHub https://github.com/ergoemacs/ergoemacs-mode/issues/349.

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

mattfidler commented 9 years ago

Did you make sure to add

(ergoemacs-require 'pan) after your theme component?

On Sun, Aug 2, 2015, 12:06 AM SPan notifications@github.com wrote:

Matthew Fidler notifications@github.com writes:

(global-set-key [f6] 'undefined) may work

Yes, it works.

However, I want to set a local-key for

(setq pdf-annot-minor-mode-map-prefix (kbd "<f6>"))

which is variable defined in pdf-tools mode

global key of [f6] override the local key, even set [f6] as undefined.

On Sat, Aug 1, 2015, 3:32 PM Matthew Fidler matthew.fidler@gmail.com wrote:

Have you tried global-set-key? I don't have access to a computer until Monday.

On Sat, Aug 1, 2015, 2:06 PM SPan notifications@github.com wrote:

I rarely use command mode, and I want to make use of the key ,

However, both the followings are not work,

(global-unset-key (kbd ""))

(ergoemacs-theme-component pan () (global-unset-key (kbd "")) )

— Reply to this email directly or view it on GitHub https://github.com/ergoemacs/ergoemacs-mode/issues/349.

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

— Reply to this email directly or view it on GitHub https://github.com/ergoemacs/ergoemacs-mode/issues/349#issuecomment-126988162 .

magichowl commented 9 years ago

Matthew Fidler notifications@github.com writes:

Did you make sure to add

(ergoemacs-require 'pan) after your theme component?

Yes, I added. Now the problem is when I view pdf files under pdf-view-mode and press , the result is

" is undefined".

However, I want to enable local key binding of under pdf-view-mode.

(setq pdf-annot-minor-mode-map-prefix (kbd "<f6>"))

which unfortunately takes effect only when ergoemacs-mode is disabled.

mattfidler commented 9 years ago

I have a fix for it in the unstable branch modify-maps-new-engine.

mattfidler commented 9 years ago

Somehow there are some mark issues with the new fix.

magichowl commented 9 years ago

I've update my repo to the latest "modify-maps-new-engine", but nothing is changed.

magichowl commented 9 years ago

Not solved yet.

The odd thing is if I enable ergoemacs-mode under "pdf-view-mode"

one kbd is

<ergoemacs-user> <f6> t

compared to

<f6> t

when ergoemacs-mode disabled.

mattfidler commented 9 years ago

Are you sure you deleted the old elc files. The current implementation no longer uses the ergoemacs user key entries.

magichowl commented 9 years ago

After I delete .elc files, error comes:

Debugger entered--Lisp error: (setting-constant nil) set(nil nil) (progn (set hook (mapcar (function (lambda (fn) (if (or (eq fn t) (and ... ... ...)) fn (list (quote lambda) nil "Ergoemacs protect local" (list ... ... ...) (list ... ...))))) (symbol-value hook)))) (if (boundp hook) (progn (set hook (mapcar (function (lambda (fn) (if (or ... ...) fn (list ... nil "Ergoemacs protect local" ... ...)))) (symbol-value hook))))) (if (consp hook) (let ((--dolist-tail-- hook)) (while --dolist-tail-- (let ((lhook (car --dolist-tail--))) (ergoemacs-map-properties--modify-run-mode-hooks lhook) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if (boundp hook) (progn (set hook (mapcar (function (lambda (fn) (if ... fn ...))) (symbol-value hook)))))) (let ((hook (car --dolist-tail--))) (if (consp hook) (let ((--dolist-tail-- hook)) (while --dolist-tail-- (let ((lhook (car --dolist-tail--))) (ergoemacs-map-properties--modify-run-mode-hooks lhook) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if (boundp hook) (progn (set hook (mapcar (function (lambda ... ...)) (symbol-value hook)))))) (setq --dolist-tail-- (cdr --dolist-tail--))) (while --dolist-tail-- (let ((hook (car --dolist-tail--))) (if (consp hook) (let ((--dolist-tail-- hook)) (while --dolist-tail-- (let ((lhook ...)) (ergoemacs-map-properties--modify-run-mode-hooks lhook) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if (boundp hook) (progn (set hook (mapcar (function ...) (symbol-value hook)))))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (let ((--dolist-tail-- hooks)) (while --dolist-tail-- (let ((hook (car --dolist-tail--))) (if (consp hook) (let ((--dolist-tail-- hook)) (while --dolist-tail-- (let (...) (ergoemacs-map-properties--modify-run-mode-hooks lhook) (setq --dolist-tail-- ...)))) (if (boundp hook) (progn (set hook (mapcar ... ...))))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (let (tmp) (let ((--dolist-tail-- hooks)) (while --dolist-tail-- (let ((hook (car --dolist-tail--))) (if (consp hook) (let ((--dolist-tail-- hook)) (while --dolist-tail-- (let ... ... ...))) (if (boundp hook) (progn (set hook ...)))) (setq --dolist-tail-- (cdr --dolist-tail--)))))) ergoemacs-map-properties--modify-run-mode-hooks(nil) ad-Advice-run-mode-hooks(#[128 "\203

magichowl commented 9 years ago

thanks, I use the branch v5.14.7.3.1, problem is solved.

mattfidler commented 9 years ago

Thanks for the backtrace; it was useful.