all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: steve-humphreys@gmx.com
To: steve-humphreys@gmx.com
Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Insert text in command-log-mode buffer before logging
Date: Mon, 3 May 2021 15:51:48 +0200	[thread overview]
Message-ID: <trinity-975501e4-685f-4163-88ab-0dcd920873ef-1620049908215@3c-app-mailcom-bs06> (raw)
In-Reply-To: <trinity-9e6216d3-001c-4694-8606-f1733ff56560-1620044673008@3c-app-mailcom-bs06>

How is it that I cannot call (insert "test" clm-command-log-buffer)
to print something to tho command log buffer?

Seems quite more complicated to do than I initially thought.

(defun clm-open-command-log-buffer (&optional arg)
  "Opens (and creates, if non-existant) a buffer used for logging keyboard commands.
If ARG is non-nil, the existing command log buffer is cleared."
  (interactive "P")
  (with-current-buffer
      (setq clm-command-log-buffer
            (get-buffer-create " *command-log*"))
    (text-scale-set 1))
  (when arg
    (with-current-buffer clm-command-log-buffer
      (erase-buffer)))
  (let ((new-win (split-window-horizontally
                  (- 0 command-log-mode-window-size))))
    (set-window-buffer new-win clm-command-log-buffer)
    (set-window-dedicated-p new-win t)))


> Sent: Tuesday, May 04, 2021 at 12:24 AM
> From: steve-humphreys@gmx.com
> To: steve-humphreys@gmx.com
> Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: Re: Insert text in command-log-mode buffer before logging
>
> Have tried inserting text in the following function but it is not being
> displayed.  I think the buffer is not available at that point.
>
> (defun clm/open-command-log-buffer (&optional arg)
>
> On the other hand "clm/log-command (&optional cmd)" intercepts command activation
> but I do not want my text to appear every time there is command activation.
>
>
>
>
> > Sent: Monday, May 03, 2021 at 3:26 PM
> > From: steve-humphreys@gmx.com
> > To: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> > Subject: Insert text in command-log-mode buffer before logging
> >
> > I am using "command-log-mode" and want to insert some text after
> > the log buffer is opened, but before logging starts.
> >
> > I am struggling to figure out where and how I should do this.
> >
> > Steve
> >
> >
> >
> >
> >
> >
>
>



  reply	other threads:[~2021-05-03 13:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-03  3:26 Insert text in command-log-mode buffer before logging steve-humphreys
2021-05-03 12:24 ` steve-humphreys
2021-05-03 13:51   ` steve-humphreys [this message]
2021-05-03 20:40     ` Christopher Dimech
2021-05-03 21:45       ` Jean Louis
2021-05-03 21:54         ` Christopher Dimech

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-975501e4-685f-4163-88ab-0dcd920873ef-1620049908215@3c-app-mailcom-bs06 \
    --to=steve-humphreys@gmx.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.