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

Org layer: There should be a key binding to enter the org-agenda from any buffer #1296

Closed
ocharles opened this issue Apr 21, 2015 · 29 comments
Closed

Comments

@ocharles
Copy link
Contributor

I generally want to view the agenda when I'm not already editing files in my agenda. For example, I finish a piece of work and need to know what to work on next. Perhaps we could have SPC a o, which is currently unused?

@cpaulik
Copy link
Contributor

cpaulik commented Apr 21, 2015

You are right. I think there also should be a global keybinding for org-capture which I proposed to be SPC C c

@syl20bnr
Copy link
Owner

Org is so important that we can add a convention for it and give it a global key binding. Pity that SPC o is reserved for the user :-) We could use SPC O but I feel that it should be left to the user too.

Any proposal for a global prefix for all org related stuff ?

@cpaulik
Copy link
Contributor

cpaulik commented Apr 21, 2015

I'm not sure if a global prefix is necessary. The only commands that should be available globally are org-agenda and org-capture. Am I missing commands? All others are org buffer specific.

@moesasji
Copy link

I think you are indeed missing one more command that needs to be available globally to make good use of org-mode, ie the command to store a link. From the org-manual:

The four Org commands org-store-link, org-capture, org-agenda, and org-iswitchb should be accessible through global keys (i.e., anywhere in Emacs, not just in Org buffers). Here are suggested bindings for these keys, please modify the keys to your own liking.

See: http://orgmode.org/org.html#Activation I think in reality only org-capture org-store-link and org-agenda are still needed as I think the iswitchb has disappeared in emacs 24.4?

@punassuming
Copy link
Contributor

I agree SPC O is a good option. It is how I have been using my private org layer for a while now. There are about 5 org specific bindings that I have accessible in all buffers. I will submit a PR later today for review if someone doesn't already have one started for this. This could also allow other org packages like pomodoro and org-repo-todo to use O as well.

@punassuming
Copy link
Contributor

Here are some bindings I have bound:

      ;; use O as org global bindings
      (evil-leader/set-key
        "Oa" 'org-agenda
        "Og" 'helm-org-agenda-files-headings
        "Oo" 'org-clock-out
        "Oc" 'org-capture
        "OC" 'helm-org-capture-templates ;requires templates to be defined.
        "Ol" 'org-store-link)

@syl20bnr
Copy link
Owner

SPC O is very appealing but it is like stealing a key that is reserved to the user, I know the doc says o not o and O.... mmmhhh
I could add SPC , to the reserved keys for the user and we take SPC O.

@punassuming
Copy link
Contributor

How about making another leader, a localleader if you will, for users' use. In Vim, I normally mapped localleader to \. Granted though, this makes three leader prefix keys: spacemacs, major mode, and user

@syl20bnr
Copy link
Owner

It can be possible but it should reference a SPC something, like , leader is a remapping of SPC m.
So SPC , could be reserved to the user and we setup \ as a shortcut (can be modified in the dotfile). I like the idea. :-)

@tshemeng
Copy link
Contributor

@syl20bnr how about SPC o for org mode and SPC . for users' use
SPC . is easy to press, and no worry duplication of names.

@jasoncyu
Copy link

👍 for SPC . for user use. I think SPC , is a little confusing since , is already the major mode leader SPC M

@louy2
Copy link
Contributor

louy2 commented May 24, 2015

👍 SPC .

@mkaito
Copy link
Contributor

mkaito commented Jul 10, 2015

👍 SPC . for user, SPC o for global org-mode.

@emmanueltouzery
Copy link
Contributor

Just a little minus: in some languages you need to press shift for .

@sexptherapy
Copy link

I agree Org deserves the SPC o spot and both SPC , and SPC . are good solutions for the user space.

@mkaito
Copy link
Contributor

mkaito commented Jul 12, 2015

@emmanueltouzery

in some languages you need to press shift for .

Well, what is the unshifted character on that key?

@emmanueltouzery
Copy link
Contributor

In the case of the french keyboard from what i see online it's ; -- don't have one in front of me now.

@mkaito
Copy link
Contributor

mkaito commented Jul 12, 2015

Shouldn't SPC ; be pretty safe too?

Edit: Nevermind, I'm dumb. Any suggestions for a safe alternative?

@sexptherapy
Copy link

I still think SPC . or SPC , are the best alternatives. You can't really take all the keyboard layouts into consideration, and that comes from someone using Dvorak. My . is your e. Even with the need to shift, it's still pretty easy for the poor French folks who by now are probably accustomed to entering periods. :)

@punassuming
Copy link
Contributor

Where are we on this? Does anyone even use SPC o for anything? Typically if I want to map a new command, I set it up in my dotspacemacs config section, so it doesn't matter what spacemacs has already set. If we were to change user reserved binding to SPC ., is there anything in the source that needs to be changed?

@ZucchiniZe
Copy link

Is there any progress on this issue, because I would love it as a feature!

@TheBB
Copy link
Collaborator

TheBB commented Oct 9, 2015

I don't think there's any official ruling on this. FWIW I don't want to move the user reserved space. I feel the few global org bindings fit well under SPC a o (a for applications, which the agenda certainly is). That's my proposition.

@ZucchiniZe
Copy link

SPC a o sounds reasonable for the agenda.

@syl20bnr
Copy link
Owner

syl20bnr commented Oct 9, 2015

There are other global key bindings useful for org. Agenda is one of them, but capture bindings should be global too. I think @TheBB proposes to put all org global key bindings under SPC a o which would give SPC aoa for org-agenda. Am I right ?

@ZucchiniZe
Copy link

If you put all global org bindings on SPC a o to get to the agenda you would have to run SPC a o a a.

@syl20bnr
Copy link
Owner

syl20bnr commented Oct 9, 2015

Why doubling the a ?

@TheBB
Copy link
Collaborator

TheBB commented Oct 9, 2015

This is what I propose.

  • SPC aoa: agenda
  • SPC aoc: capture
  • SPC aol: store link
  • SPC aoO: clock out (for example... to mirror SPC m O, but we could make it whatever else)
  • etc.

They aren't really longer than any other application binding.

@ZucchiniZe
Copy link

Why doubling the a?

Because when using org-agenda it brings up a list of things to select:

@TheBB
Copy link
Collaborator

TheBB commented Oct 9, 2015

Since the agenda is probably the most interesting thing, we can replicate all or most of those bindings directly on SPC ao, thus SPC aoa is agenda, SPC aot is todo list, etc. Maybe SPC aoA can be the regular agenda menu. That should still leave plenty of space for the 3-4 other global org bindings.

StreakyCobra added a commit to StreakyCobra/spacemacs that referenced this issue Oct 12, 2015
Related to syl20bnr#1296.

Use `SPC a o` as prefix for org related applications like `org-agenda`
or `org-capture`. The `a` is for "application", and `o` for "org". To
avoid long keystrokes for `agenda`, direct bindings are offered through
`SPC a o <key>`.

Because `org-agenda` is one of the principal application, it has be
mapped to repeating the last letter (`SPC a o o`).
syl20bnr pushed a commit that referenced this issue Oct 18, 2015
Related to #1296.

Use `SPC a o` as prefix for org related applications like `org-agenda`
or `org-capture`. The `a` is for "application", and `o` for "org". To
avoid long keystrokes for `agenda`, direct bindings are offered through
`SPC a o <key>`.

Because `org-agenda` is one of the principal application, it has be
mapped to repeating the last letter (`SPC a o o`).
zv pushed a commit to zv/spacemacs that referenced this issue Dec 23, 2015
Related to syl20bnr#1296.

Use `SPC a o` as prefix for org related applications like `org-agenda`
or `org-capture`. The `a` is for "application", and `o` for "org". To
avoid long keystrokes for `agenda`, direct bindings are offered through
`SPC a o <key>`.

Because `org-agenda` is one of the principal application, it has be
mapped to repeating the last letter (`SPC a o o`).

(cherry picked from commit 2b5b2d3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests