emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org mode pollutes the narrow-map
@ 2019-08-23  0:47 Omar Antolín Camarena
  2019-08-23  8:40 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Omar Antolín Camarena @ 2019-08-23  0:47 UTC (permalink / raw)
  To: emacs-orgmode

Hello everyone,

Does it seems a little rude that Org mode binds its own narrowing commands in the global narrow-map?

You can find this in org.el starting at line 19018:

#+begin_src emacs-lisp
  ;;;; Narrow map
  (org-defkey narrow-map "s" #'org-narrow-to-subtree)
  (org-defkey narrow-map "b" #'org-narrow-to-block)
  (org-defkey narrow-map "e" #'org-narrow-to-element)
#+end_src

I don't need or really want those commands bound in non-org buffers. I think it would be better to bind them (to C-x n s, C-x n b and C-x n e) in org-mode-map. This is the approach taken by AUCTeX, for example. (To be clear, I mean AUCTeX has some narrowing commands and it binds them to C-x n e and C-x n g in its own keymaps.)

-- 
Omar Antolín Camarena

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Org mode pollutes the narrow-map
  2019-08-23  0:47 Org mode pollutes the narrow-map Omar Antolín Camarena
@ 2019-08-23  8:40 ` Nicolas Goaziou
  2019-08-23 10:10   ` Omar Antolín Camarena
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2019-08-23  8:40 UTC (permalink / raw)
  To: Omar Antolín Camarena; +Cc: emacs-orgmode

Hello,

Omar Antolín Camarena <omar@matem.unam.mx> writes:

> Hello everyone,
>
> Does it seems a little rude that Org mode binds its own narrowing commands in the global narrow-map?
>
> You can find this in org.el starting at line 19018:
>
> #+begin_src emacs-lisp
>   ;;;; Narrow map
>   (org-defkey narrow-map "s" #'org-narrow-to-subtree)
>   (org-defkey narrow-map "b" #'org-narrow-to-block)
>   (org-defkey narrow-map "e" #'org-narrow-to-element)
> #+end_src
>
> I don't need or really want those commands bound in non-org buffers.
> I think it would be better to bind them (to C-x n s, C-x n b and C-x
> n e) in org-mode-map. This is the approach taken by AUCTeX, for
> example. (To be clear, I mean AUCTeX has some narrowing commands and
> it binds them to C-x n e and C-x n g in its own keymaps.)

It sounds reasonable. I changed the bindings in master. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Org mode pollutes the narrow-map
  2019-08-23  8:40 ` Nicolas Goaziou
@ 2019-08-23 10:10   ` Omar Antolín Camarena
  0 siblings, 0 replies; 3+ messages in thread
From: Omar Antolín Camarena @ 2019-08-23 10:10 UTC (permalink / raw)
  To: Omar Antolín Camarena, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1092 bytes --]

Great, thanks!

On Fri, Aug 23, 2019, 3:40 AM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Omar Antolín Camarena <omar@matem.unam.mx> writes:
>
> > Hello everyone,
> >
> > Does it seems a little rude that Org mode binds its own narrowing
> commands in the global narrow-map?
> >
> > You can find this in org.el starting at line 19018:
> >
> > #+begin_src emacs-lisp
> >   ;;;; Narrow map
> >   (org-defkey narrow-map "s" #'org-narrow-to-subtree)
> >   (org-defkey narrow-map "b" #'org-narrow-to-block)
> >   (org-defkey narrow-map "e" #'org-narrow-to-element)
> > #+end_src
> >
> > I don't need or really want those commands bound in non-org buffers.
> > I think it would be better to bind them (to C-x n s, C-x n b and C-x
> > n e) in org-mode-map. This is the approach taken by AUCTeX, for
> > example. (To be clear, I mean AUCTeX has some narrowing commands and
> > it binds them to C-x n e and C-x n g in its own keymaps.)
>
> It sounds reasonable. I changed the bindings in master. Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou
>

[-- Attachment #2: Type: text/html, Size: 1596 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-23 10:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-23  0:47 Org mode pollutes the narrow-map Omar Antolín Camarena
2019-08-23  8:40 ` Nicolas Goaziou
2019-08-23 10:10   ` Omar Antolín Camarena

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).