[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Insert text in command-log-mode buffer before logging
From: |
Christopher Dimech |
Subject: |
Re: Insert text in command-log-mode buffer before logging |
Date: |
Mon, 3 May 2021 22:40:39 +0200 |
Hi Jean, could you help out with this. It is quite minor but have not
got a solution to it yet.
The code is here
https://github.com/lewang/command-log-mode/blob/master/command-log-mode.el
The user wants to add some text at the start of the logging window. I tend
to agree that the text has to be inserted in "clm/open-command-log-buffer"
but cannot quite see how that could be made to work.
Regards
Christopher
> Sent: Tuesday, May 04, 2021 at 1:51 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
>
> 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
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>
---------------------
Christopher Dimech
General Administrator - Naiad Informatics - GNU Project (Geocomputation)
- Geophysical Simulation
- Geological Subsurface Mapping
- Disaster Preparedness and Mitigation
- Natural Resource Exploration and Production
- Free Software Advocacy