all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Question About Nuking 'Ranger.el' Package's 'Deer' Portion's 'deer-from-dired' Function
@ 2022-02-19  1:11 Samuel Banya
  2022-02-19  2:03 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 8+ messages in thread
From: Samuel Banya @ 2022-02-19  1:11 UTC (permalink / raw)
  To: Emanuel Berg

Hey there,

I have a question regarding configuring Emacs so that the following function is not able to be pressed with 'C-p':
'deer-from-dired'

Reason being is that I hate everything about 'deer' since I think its everything that is the antithesis of 'Ranger.el' since if I wanted to just have a single pane file manager, I'd still be using Dired.

The thing that is annoying is that sometimes I will use Dired for weird reasons while using Tramp Mode on a server, and more so because there are a few things I haven't fully learned yet on 'Ranger.el' in comparison.

That being said, I keep accidentally hitting 'C-p' which then toggles 'Deer' mode hell which is hard to get out of.

Is there any way I can nuke both the function mentioned above, and free up the keybinding so Dired acts normally again on the chance I do use it?

Thanks,

Sam


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

* Re: Question About Nuking 'Ranger.el' Package's 'Deer' Portion's 'deer-from-dired' Function
  2022-02-19  1:11 Question About Nuking 'Ranger.el' Package's 'Deer' Portion's 'deer-from-dired' Function Samuel Banya
@ 2022-02-19  2:03 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-19 15:36   ` Samuel Banya
  0 siblings, 1 reply; 8+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-19  2:03 UTC (permalink / raw)
  To: help-gnu-emacs

Samuel Banya wrote:

> Is there any way I can nuke both the function mentioned
> above, and free up the keybinding so Dired acts normally
> again on the chance I do use it?

Uhm, set the key to whatever you like to happen ... or to
nil ... or to `ignore' if you want nothing at all?

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Question About Nuking 'Ranger.el' Package's 'Deer' Portion's 'deer-from-dired' Function
  2022-02-19  2:03 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-19 15:36   ` Samuel Banya
  2022-02-19 16:04     ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 8+ messages in thread
From: Samuel Banya @ 2022-02-19 15:36 UTC (permalink / raw)
  To: Emanuel Berg

How do you do this?

On Fri, Feb 18, 2022, at 9:03 PM, Emanuel Berg via Users list for the GNU Emacs text editor wrote:
> Samuel Banya wrote:
> 
> > Is there any way I can nuke both the function mentioned
> > above, and free up the keybinding so Dired acts normally
> > again on the chance I do use it?
> 
> Uhm, set the key to whatever you like to happen ... or to
> nil ... or to `ignore' if you want nothing at all?
> 
> -- 
> underground experts united
> https://dataswamp.org/~incal
> 
> 
> 


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

* Re: Question About Nuking 'Ranger.el' Package's 'Deer' Portion's 'deer-from-dired' Function
  2022-02-19 15:36   ` Samuel Banya
@ 2022-02-19 16:04     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-19 16:52       ` Samuel Banya
  0 siblings, 1 reply; 8+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-19 16:04 UTC (permalink / raw)
  To: help-gnu-emacs

Samuel Banya wrote:

> How do you do this?

If you for example never want to view `view-emacs-problems'
and can think of no better use of `C-h C-p' then eval

  (global-set-key "\C-h\C-p" #'ignore)

and the next time you it it (by mistake maybe) nothing
will happen.

You can put it like this:

  (global-set-key "\C-h\C-p" #'ignore) ; view-emacs-problems

so when you see it, you remember what function it was.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Question About Nuking 'Ranger.el' Package's 'Deer' Portion's 'deer-from-dired' Function
  2022-02-19 16:04     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-19 16:52       ` Samuel Banya
  2022-02-19 16:59         ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 8+ messages in thread
From: Samuel Banya @ 2022-02-19 16:52 UTC (permalink / raw)
  To: Emanuel Berg

Hmm... I don't know if that would help be cause I only want this for the Ranger specific function, and specifically only to avoid it in Dired mode itself.

On Sat, Feb 19, 2022, at 11:04 AM, Emanuel Berg via Users list for the GNU Emacs text editor wrote:
> Samuel Banya wrote:
> 
> > How do you do this?
> 
> If you for example never want to view `view-emacs-problems'
> and can think of no better use of `C-h C-p' then eval
> 
>   (global-set-key "\C-h\C-p" #'ignore)
> 
> and the next time you it it (by mistake maybe) nothing
> will happen.
> 
> You can put it like this:
> 
>   (global-set-key "\C-h\C-p" #'ignore) ; view-emacs-problems
> 
> so when you see it, you remember what function it was.
> 
> -- 
> underground experts united
> https://dataswamp.org/~incal
> 
> 
> 


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

* Re: Question About Nuking 'Ranger.el' Package's 'Deer' Portion's 'deer-from-dired' Function
  2022-02-19 16:52       ` Samuel Banya
@ 2022-02-19 16:59         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-19 21:28           ` Thibaut Verron
  0 siblings, 1 reply; 8+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-19 16:59 UTC (permalink / raw)
  To: help-gnu-emacs

Samuel Banya wrote:

> Hmm... I don't know if that would help be cause I only want
> this for the Ranger specific function, and specifically only
> to avoid it in Dired mode itself.

You look to disable the function itself or the keystroke that
invokes the function?

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Question About Nuking 'Ranger.el' Package's 'Deer' Portion's 'deer-from-dired' Function
  2022-02-19 16:59         ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-19 21:28           ` Thibaut Verron
  2022-02-21  0:40             ` Samuel Banya
  0 siblings, 1 reply; 8+ messages in thread
From: Thibaut Verron @ 2022-02-19 21:28 UTC (permalink / raw)
  To: Emanuel Berg, help-gnu-emacs

For the use-case in question, you need to unbind the key in ranger's
keymap, rather than the global keymap
(define-key dired-mode-map (kbd "C-p") #'ignore)

But it's set in a hook, every time dired-mode is loaded, so not really helpful.

Instead, you can delete the function from the hook:
(remove-hook 'dired-mode-hook 'ranger-set-dired-key)

The cleanest way is to have
(setq ranger-key nil)
before ranger is loaded.

Best wishes,
Thibaut

Le sam. 19 févr. 2022 à 17:59, Emanuel Berg via Users list for the GNU
Emacs text editor <help-gnu-emacs@gnu.org> a écrit :
>
> Samuel Banya wrote:
>
> > Hmm... I don't know if that would help be cause I only want
> > this for the Ranger specific function, and specifically only
> > to avoid it in Dired mode itself.
>
> You look to disable the function itself or the keystroke that
> invokes the function?
>
> --
> underground experts united
> https://dataswamp.org/~incal
>
>



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

* Re: Question About Nuking 'Ranger.el' Package's 'Deer' Portion's 'deer-from-dired' Function
  2022-02-19 21:28           ` Thibaut Verron
@ 2022-02-21  0:40             ` Samuel Banya
  0 siblings, 0 replies; 8+ messages in thread
From: Samuel Banya @ 2022-02-21  0:40 UTC (permalink / raw)
  To: Emanuel Berg

Hey Thibaut, 

Thanks so much!

This fixed it for me:
*** Force 'ranger.el' to stop allowing 'Deer' mode from 'dired'
#+begin_src emacs-lisp
(remove-hook 'dired-mode-hook 'ranger-set-dired-key)
#+end_src

On Sat, Feb 19, 2022, at 4:28 PM, Thibaut Verron wrote:
> For the use-case in question, you need to unbind the key in ranger's
> keymap, rather than the global keymap
> (define-key dired-mode-map (kbd "C-p") #'ignore)
> 
> But it's set in a hook, every time dired-mode is loaded, so not really helpful.
> 
> Instead, you can delete the function from the hook:
> (remove-hook 'dired-mode-hook 'ranger-set-dired-key)
> 
> The cleanest way is to have
> (setq ranger-key nil)
> before ranger is loaded.
> 
> Best wishes,
> Thibaut
> 
> Le sam. 19 févr. 2022 à 17:59, Emanuel Berg via Users list for the GNU
> Emacs text editor <help-gnu-emacs@gnu.org> a écrit :
> >
> > Samuel Banya wrote:
> >
> > > Hmm... I don't know if that would help be cause I only want
> > > this for the Ranger specific function, and specifically only
> > > to avoid it in Dired mode itself.
> >
> > You look to disable the function itself or the keystroke that
> > invokes the function?
> >
> > --
> > underground experts united
> > https://dataswamp.org/~incal
> >
> >
> 
> 


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

end of thread, other threads:[~2022-02-21  0:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-19  1:11 Question About Nuking 'Ranger.el' Package's 'Deer' Portion's 'deer-from-dired' Function Samuel Banya
2022-02-19  2:03 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-19 15:36   ` Samuel Banya
2022-02-19 16:04     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-19 16:52       ` Samuel Banya
2022-02-19 16:59         ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-19 21:28           ` Thibaut Verron
2022-02-21  0:40             ` Samuel Banya

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.