From: Christopher Dimech <dimech@gmx.com>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Emacs keybindings according to file type
Date: Wed, 23 Sep 2020 09:44:33 +0200 [thread overview]
Message-ID: <trinity-136d37b6-ae62-4dfd-996f-ecc0a00345c4-1600847073140@3c-app-mailcom-bs02> (raw)
In-Reply-To: <CAP_d_8WAO02YtAy+zU4GBa+dcpm8wjY9Ue9NFNrcUeVWt1hVFw@mail.gmail.com>
Thank you for pointing the misspelling, it now works correctly.
In the meantime I have used the following
( org-defkey org-mode-map (kbd "C-t l f") 'org-drag-line-forward )
( org-defkey org-mode-map (kbd "C-t l b") 'org-drag-line-backward )
Concerning the repeatable binding, have you practiced, because I have not.
How do you go about it?
> Sent: Wednesday, September 23, 2020 at 7:33 AM
> From: "Yuri Khan" <yuri.v.khan@gmail.com>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "Eli Zaretskii" <eliz@gnu.org>, "help-gnu-emacs" <help-gnu-emacs@gnu.org>
> Subject: Re: Emacs keybindings according to file type
>
> On Wed, 23 Sep 2020 at 13:33, Christopher Dimech <dimech@gmx.com> wrote:
>
> > I wrote the following code to swap line for org files.
> > Did not work after trying it. I need to have the thing work for
> > org files and other files on whicn I call M-x org-mode.
> >
> > ( 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 )
>
> Works for me in emacs -Q, except that you misspelled ‘forward’.
>
> Also, org-mode already binds M-S-<up> and M-S-<down> to commands that
> work the same way as org-drag-line-* unless you are in a table or on a
> clock timestamp. It’s likely that you will want to drag a line more
> than once in a row, so a repeatable binding (a key that you can hold
> down) is better than a long sequence such as C-t l f.
>
next prev parent reply other threads:[~2020-09-23 7:44 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 [this message]
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-136d37b6-ae62-4dfd-996f-ecc0a00345c4-1600847073140@3c-app-mailcom-bs02 \
--to=dimech@gmx.com \
--cc=help-gnu-emacs@gnu.org \
--cc=yuri.v.khan@gmail.com \
/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.
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.