From: Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Emacs keybindings according to file type
Date: Thu, 24 Sep 2020 01:05:45 +0200 [thread overview]
Message-ID: <87h7ro14c6.fsf@ebih.ebihd> (raw)
In-Reply-To: trinity-e35408dc-e41d-473e-b64a-3bc19ed1c1b5-1600842796906@3c-app-mailcom-bs02
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
prev parent reply other threads:[~2020-09-23 23:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 6:46 Emacs keybindings according to file type Christopher Dimech
2020-09-21 14:16 ` Eli Zaretskii
2020-09-21 14:20 ` Christopher Dimech
2020-09-21 15:57 ` Eric S Fraga
2020-09-23 6:33 ` Christopher Dimech
2020-09-23 7:33 ` Yuri Khan
2020-09-23 7:44 ` Christopher Dimech
2020-09-23 7:52 ` Yuri Khan
2020-09-23 8:03 ` Christopher Dimech
2020-09-23 8:06 ` Marcin Borkowski
2020-09-23 23:05 ` Emanuel Berg via Users list for the GNU Emacs text editor [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h7ro14c6.fsf@ebih.ebihd \
--to=help-gnu-emacs@gnu.org \
--cc=moasenwood@zoho.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).