all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Insert text in command-log-mode buffer before logging
@ 2021-05-03  3:26 steve-humphreys
  2021-05-03 12:24 ` steve-humphreys
  0 siblings, 1 reply; 6+ messages in thread
From: steve-humphreys @ 2021-05-03  3:26 UTC (permalink / raw)
  To: Help Gnu Emacs

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







^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Insert text in command-log-mode buffer before logging
  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
  0 siblings, 1 reply; 6+ messages in thread
From: steve-humphreys @ 2021-05-03 12:24 UTC (permalink / raw)
  To: steve-humphreys; +Cc: Help Gnu Emacs

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
>
>
>
>
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Insert text in command-log-mode buffer before logging
  2021-05-03 12:24 ` steve-humphreys
@ 2021-05-03 13:51   ` steve-humphreys
  2021-05-03 20:40     ` Christopher Dimech
  0 siblings, 1 reply; 6+ messages in thread
From: steve-humphreys @ 2021-05-03 13:51 UTC (permalink / raw)
  To: steve-humphreys; +Cc: Help Gnu Emacs

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
> >
> >
> >
> >
> >
> >
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Insert text in command-log-mode buffer before logging
  2021-05-03 13:51   ` steve-humphreys
@ 2021-05-03 20:40     ` Christopher Dimech
  2021-05-03 21:45       ` Jean Louis
  0 siblings, 1 reply; 6+ messages in thread
From: Christopher Dimech @ 2021-05-03 20:40 UTC (permalink / raw)
  To: Jean Louis; +Cc: Help Gnu Emacs

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Insert text in command-log-mode buffer before logging
  2021-05-03 20:40     ` Christopher Dimech
@ 2021-05-03 21:45       ` Jean Louis
  2021-05-03 21:54         ` Christopher Dimech
  0 siblings, 1 reply; 6+ messages in thread
From: Jean Louis @ 2021-05-03 21:45 UTC (permalink / raw)
  To: Christopher Dimech; +Cc: Help Gnu Emacs

* Christopher Dimech <dimech@gmx.com> [2021-05-03 23:41]:
> 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.

Me? I have not research that package. 

My suggestion is to post the issue on Github as to ask authors there.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
https://rms-support-letter.github.io/




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Insert text in command-log-mode buffer before logging
  2021-05-03 21:45       ` Jean Louis
@ 2021-05-03 21:54         ` Christopher Dimech
  0 siblings, 0 replies; 6+ messages in thread
From: Christopher Dimech @ 2021-05-03 21:54 UTC (permalink / raw)
  To: Jean Louis; +Cc: Help Gnu Emacs


> Sent: Tuesday, May 04, 2021 at 9:45 AM
> From: "Jean Louis" <bugs@gnu.support>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: Re: Insert text in command-log-mode buffer before logging
>
> * Christopher Dimech <dimech@gmx.com> [2021-05-03 23:41]:
> > 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.
>
> Me? I have not research that package.

I thought to inquire a genius, perhaps you could have a quick solution. :)

Happy smelting

> My suggestion is to post the issue on Github as to ask authors there.
>
> --
> Jean
>
> Take action in Free Software Foundation campaigns:
> https://www.fsf.org/campaigns
>
> Sign an open letter in support of Richard M. Stallman
> https://stallmansupport.org/
> https://rms-support-letter.github.io/
>
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-03 21:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2021-05-03 20:40     ` Christopher Dimech
2021-05-03 21:45       ` Jean Louis
2021-05-03 21:54         ` Christopher Dimech

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.