Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: add basic implementation of global filters #261

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

porterjamesj
Copy link

First pass at the feature suggested in #260. Not sure if this is something you want or if there's a better way to do it, just opening up a discussion.

@Fuco1
Copy link
Owner

Fuco1 commented Nov 30, 2013

OKey, let's make this major-mode aware too. A format I quite like is like so:

(foo bar (emacs-lisp-mode baz bar) quux (c-mode flux tux) ...)

To get major mode specific data, you do (assoc major-mode data), to get global data you do (-remove 'listp data)

Can you implement something like that?

You can see the customize type declaration for similar setting here: https://github.com/Fuco1/guide-key/commit/627276e87f3816eac8fed8ff9514adbe7536541b#diff-cedbd6db45d2fc2bbf99bcdb1eabb601R179

@porterjamesj
Copy link
Author

Sorry for delay; I was in the middle of finals week and procrastinating with Emacs stuff and then had to actually go do school things. I'm happy to implement whatever design you think is good; but I'm a bit confused by (foo bar (emacs-lisp-mode baz bar) quux (c-mode flux tux) ...). What would this look like plugging in names appropriate for this feature instead of the placeholders?

@Fuco1
Copy link
Owner

Fuco1 commented Dec 23, 2013

Well that was just a suggestion, I don't particularly care about the format, but it should be possible to specify these globally and per major mode, and there should be some nice customization interface.

Since I'm lazy to produce the list you've asked for, here's the same datastructure used in guide-key package---instead of keybindings imagine the filter functions:

`("C-x r" "C-x 4" "C-x j" "C-x p" (calc-mode "V") (dired-mode "/" "*" "C-t") (ibuffer-mode "/" "*" "%"))

@porterjamesj
Copy link
Author

Ah I see what you mean now. Yeah I can do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

2 participants