From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Insert text in command-log-mode buffer before logging Date: Mon, 3 May 2021 22:40:39 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10876"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 03 22:41:45 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldfNw-0002fg-0h for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 03 May 2021 22:41:44 +0200 Original-Received: from localhost ([::1]:46596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfNv-0004m0-3K for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 03 May 2021 16:41:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfNU-0004lp-7t for help-gnu-emacs@gnu.org; Mon, 03 May 2021 16:41:16 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:42827) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfNS-0006Ge-3g for help-gnu-emacs@gnu.org; Mon, 03 May 2021 16:41:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620074440; bh=6rIFRLQ7QCnX8a418rR7Dz0OZRFCoBsTlvzElsogGHY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=dJGcv1wxmWIg1lnUWSLKV17Fc9yeZ8y92roGGc7eZx67T9Vfu3vsOX1HBwJUUayaQ P0G9RwkuJhdgeFPclEYoCNnPt3P7M45YCgfdkPDsQt1o9znX1MDyNEMJiTyobnrHf2 rrldyZ3lt+wQOd35+c/t/I97vhd4WA5ToypbQQgI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs06.server.lan [172.19.170.174]) (via HTTP); Mon, 3 May 2021 22:40:39 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:S4SlJzVEVrrU5cXiN5dVbCorcbJV8luJKBiND7pcGDflheJ/7AFWCeNtct/OK3f99+TAi b0RdrKtiumaLgXqfRgBEoN23CnDXtAowmYoNITwOLUltPFwVXJGoUrcxfm9nrBy6mM8PvoBAs3ta CcgRYZyj8pYQcz6UWfjbFrs2AsYInGMdoxxaGl0IcxOpY3JEmNd7tvsCruaHXQrgKIOrAFCbqqnv HNG1qQMFZolIFQA/yZkBRf6zDFmmkATCrCyTNyuhUzDvsf9q5tBHRgIPKYzUUgEaNI+zIZGX06Ou Ok= X-UI-Out-Filterresults: notjunk:1;V03:K0:oZMFPYpNZVY=:Et8hqLDmyhy0v3NKhcIDrF 37aDvXNnjINrFkCGseFDzPcXGLFhaxdEs9XWVWMt4sgEjSCm6GK/JSsPYUE1ZVeqjKC8WmZcL IvoZk3zYYOmBJZ+oMpBS+RtG37Lzn8+mUvd2bkSUsrJ5MuUdX3dcQAWrTthzl9mw9aOnhvurW PFAm1F9rvtc612p5eGvkXCqReHiHNUNd405nwgUZ/aPGB1LHNmKj6EZcEoLsZEq/vwcVnCy0S JfFIKesRm2wpSG0mPShvd2l7qwGuICzgTpYtkTNwAe7BSw4bBlY5xa4prLUAqAX23v2ZkfB4b K2HZFtK23KYTDFIeqb7MdOZ1CxlY4GdK0E7U8a2qwxnWRpvXuejS78vQ7yl9MMolNyFPz8hgi uxcMoY7rpMLyqoUaR36sv0Lod6w+975d9kqzAFRt4jkrP8bwmVUGbAiJ6bLwUytu/OkxZiN0s tkrKIB5ILxfZavh57vMKAnPXdTfrj6HSNopY+A1dG6NvE3xD27cNCEvpRsDoRGDJqKIUuiWHx 2r4O/Ev/P9WZz63qkqmHBVKNdGjyuXQ2tzjrUcWEYZTTyfgwrHfo9zAjVgh88cfjMlz/AO+58 AChoYzK9o4ax5W7AVHZ/dwEMaVn7/U2sRF8xnZFg+YN0nRV/H09oHQXdDZMbcA9yIFTMNna4y Ezn9ogqhy/hpqzZKPIpPFIsMwMfgrwS5IUN+NhnF/ADNOrvENeupZ6N+8pqq7C4NpMjr8rpVa KASd5ZPV7Ryg4bT5cp+Pz2MQdPGT3uN0D4C9TO+d2KjmYJnsp0//rj9D9Al1zeWB5AEJgETk Received-SPF: pass client-ip=212.227.15.18; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129383 Archived-At: 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 ten= d 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" > 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 keyboa= rd 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" > > Subject: Re: Insert text in command-log-mode buffer before logging > > > > Have tried inserting text in the following function but it is not bein= g > > 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 activa= tion. > > > > > > > > > > > Sent: Monday, May 03, 2021 at 3:26 PM > > > From: steve-humphreys@gmx.com > > > To: "Help Gnu Emacs" > > > 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 > > > > > > > > > > > > > > > > > > > > > > > > =2D-------------------- 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