help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs keybindings according to file type


From: Emanuel Berg
Subject: Re: Emacs keybindings according to file type
Date: Thu, 24 Sep 2020 01:05:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Christopher Dimech wrote:

> ( defun Transpose-Org-Line ()
>     "Binds up and down keys to org-drag-line* commands"
>     (local-set-key (kbd "C-t l f") 'org-drag-line-forwarrd)
>     (local-set-key (kbd "C-t l b") 'org-drag-line-backward)
> )
>
> ( add-hook 'org-mode-hook 'Transpose-Org-Line )

Uhm, what is the purpose of that Elisp?

You want to set the keys for org-mode? Or globally,
using the org functions? (actually, I don't have
them, even in org-mode)

If you want to set it for org-mode, why set them
locally? Anyway, assuming you have `required'
someplace where they are defined, or otherwise made
access to them possible:

  (require 'org)
  (defun set-org-keys ()
    (define-key org-mode-map "\C-tlf" #'org-drag-line-forwarrd)
    (define-key org-mode-map "\C-tlb" #'org-drag-line-backward) )
  (add-hook 'org-mode-hook #'set-org-keys)

(also note differences in style ...)

If you want it globally, why the org-mode hook?

I agree with the people who say shortcuts should
be... short. But something just as important are that
they are _close_. Put your fingers at asdf (left
hand) and jkl; (right). Look down, and, hit the
shortcut. See, and feel, how far did your fingers
have to go? So short, close -> comfortable and fast!
...

> ---------------------
> Christopher Dimech
> Chief Administrator - Naiad Informatics - GNU Project (Geocomputation)
> - Geophysical Simulation
> - Geological Subsurface Mapping
> - Disaster Preparedness and Mitigation
> - Natural Resource Exploration and Production
> - Free Software Advocacy

Hint: RFC 3676, section 4.3 (Usenet Signature
Convention):

  https://www.ietf.org/rfc/rfc3676.txt

:)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]