GNU bug report logs - #69786
[PATCH] docs: mention the keymap to add keybindings to for term-mode

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>

Date: Wed, 13 Mar 2024 23:41:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 69786-done <at> debbugs.gnu.org
Subject: bug#69786: [PATCH] docs: mention the keymap to add keybindings to for term-mode
Date: Sat, 16 Mar 2024 16:20:49 +0300
On Sat, 2024-03-16 at 13:31 +0200, Eli Zaretskii wrote:
> > From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> > Cc: 69786 <at> debbugs.gnu.org
> > Date: Sat, 16 Mar 2024 13:36:20 +0300
> >
> > On Thu, 2024-03-14 at 13:09 +0200, Eli Zaretskii wrote:
> > >
> > > > Okay then, I'll add docs to the `term-mode` if you think it
> > > > might
> > > > be
> > > > useful for someone and (re: the other email) to `term-mode-map`
> > > > and
> > > > `term-raw-map` variables 😊
> > >
> > > Thanks.
> >
> > Done, please see if it's okay now.
>
> Thanks, installed on the emacs-29 branch, and closing the bug.

Thank you!

> Please in the future try to remember mentioning the bug number (if
> known) in the commit log message, and also quote symbols `like this'
> or 'like this', but not `like this`.

Ah, sorry about that, point taken.  I thought the `' style of quoting is only of
importance in doc-strings (where I have them correct).  I had them different in
commit message though, I see.

I just wrote a config to replace the quote if I'm editing a commit inside Emacs repo,
so hopefully that won't a problem in the future.  😊 Sharing the code for posterity:

    (use-package smartparens-config
      …
      (defun sp-emacs-style-backtick (_ _ _)
        "Text-mode is used for editing the commit messages. Emacs has style where
    a backtick ends with a sungular quote, so let's check if current dir is
    part of Emacs repo, in which case replace the pair that SP inserted."
        (save-excursion
          (when (string-match-p "\\bemacs\\b" default-directory)
            (delete-char 1)
            (insert "'"))))

      (sp-local-pair 'text-mode "`" nil :post-handlers '(:add sp-emacs-style-backtick))
      )


> > While at it, could you please remind me how to use `C-x 4 a` to get
> > a
> > log of changes to be copied to the commit? I'm trying to use it but
> > always seem to get random results: sometimes I get "COMMIT_MSG"
> > file,
> > other times I get a `* lisp/term.el (term-mode-map):` line even
> > though
> > the `term.el` has also `term-mode` and `term-raw-map` modified… I
> > presume I might need some special setup for this to work, right?
> > Like,
> > Idk, having the changes in the git-stash or something like that…? I
> > dunno, I'm just making things up.
>
> You need to have point in the body of the function/variable when you
> type "C-x 4 a".  I think that's the cause of the problems you
> describe.

Oh, that's unfortunate, I thought it's gathering all changed functions and not just
the one at point.




This bug report was last modified 1 year and 126 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.