Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

n and p should move between next/previous toots in home view #199

Closed
TeMPOraL opened this issue Aug 6, 2018 · 6 comments
Closed

n and p should move between next/previous toots in home view #199

TeMPOraL opened this issue Aug 6, 2018 · 6 comments

Comments

@TeMPOraL
Copy link

TeMPOraL commented Aug 6, 2018

It's customary in Emacs for read-only modes to use n/p keys as logical navigation. Everything from dired, through org mode agendas, magit, to Twitter modes work like this. I think for consistency's sake this would be a good default for Mastodon too :).

@jdenen
Copy link
Collaborator

jdenen commented Aug 10, 2018

So I originally thought about this when I made that navigation choice. The use of j/k to move up and down by toot was chosen for two reasons:

  1. I'm a Spacemacs user and j/k is natural to me. I would be lying if that didn't play a part.
  2. You still may want to move line by line. I would assume you'd use C-n/C-p to do that. It seems weird to me to have both n/p and C-n/C-p as navigation controls.

I'm willing to hear more opinions on this. I want to integrate better evil support into this anyway, so I could be persuaded to move j/k navigation into an only-with-evil default and default vanilla Emacs usage to n/p.

@TeMPOraL
Copy link
Author

TeMPOraL commented Aug 10, 2018

Thanks for mentioning the rationale!

Not sure how evil handles it, but in vanilla Emacs, n/p in read-only mode seems really common to have a meaning, sometimes a special one. Another example I noticed recently - and definitely official one - Custom mode (i.e. the one from M-x customize-*). There, n/p are bound to widget-forward/widget-backward respectively.

This issue is a bit of nitpicking anyway, so I'm not pushing for it hard, unless other people also agree; maybe most users of this mode are also users of evil.

(Personally, I've rebound n and p for myself for the stated reason, also g to mastodon-tl--update, and c as a new mastodon-toot, which is incidentally also customary in vanilla Emacs.)

EDIT: I see evil handles things by having some default key remappings built in, and relying on extra packages (like evil-collection or evil-magit) for changes specific to other modes.

@hdurer
Copy link
Collaborator

hdurer commented Aug 10, 2018

The default keybindings are indeed not intuitive/customary. +1 to improving that; they cost me a few brain cycles each time I try to remember how to do things.

@jdenen jdenen mentioned this issue Aug 10, 2018
@jdenen jdenen changed the title Suggestion: n and p should move between next/previous toots in home view n and p should move between next/previous toots in home view Aug 10, 2018
@kaushalmodi
Copy link

kaushalmodi commented Aug 21, 2018

Folks used to n/p for navigation might prefer these bindings for mastodon-mode-map: https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-mastodon.el

(Ignore the bindings to modi/* functions; those are defined in my config.)

I was also troubled that g was undefined.

@jdenen
Copy link
Collaborator

jdenen commented Nov 19, 2018

If you don't mind, @kaushalmodi, I'll probably steal these bindings for some upcoming changes.

@yisraeldov
Copy link

You might just want to make it conditional, detect for evil mode and then use j/k, but default should be standard emacs bindings.

jdenen added a commit that referenced this issue Feb 28, 2019
jdenen added a commit that referenced this issue Mar 5, 2019
@ghost ghost assigned jdenen Mar 5, 2019
@ghost ghost added the review label Mar 5, 2019
@jdenen jdenen closed this as completed Mar 5, 2019
@ghost ghost removed the review label Mar 5, 2019
jdenen added a commit that referenced this issue Mar 5, 2019
jdenen added a commit that referenced this issue Mar 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants