all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* can shell mode keep a log?
@ 2022-09-07  5:02 Samuel Wales
  2022-09-07  5:26 ` Jude DaShiell
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Samuel Wales @ 2022-09-07  5:02 UTC (permalink / raw)
  To: help-gnu-emacs

is it possible and reasonable to log everything in every shell buffer
to a file?  i can imagine lots of output, but i could have the logs go
into an auto-expired dir.  but would performance ok?



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

* Re: can shell mode keep a log?
  2022-09-07  5:02 can shell mode keep a log? Samuel Wales
@ 2022-09-07  5:26 ` Jude DaShiell
  2022-09-07  5:43 ` Emanuel Berg
  2022-09-07 17:12 ` Philip Kaludercic
  2 siblings, 0 replies; 9+ messages in thread
From: Jude DaShiell @ 2022-09-07  5:26 UTC (permalink / raw)
  To: Samuel Wales, help-gnu-emacs

can shell-mode run tee?  If yes it ought to be possible.  That may not
even be necessary if shell-mode can create and save history.
run command in shell-mode you want logged, and suffix it with | tee
<file>.log where <file> is the name of the log to save.
This is one problem I have had outside of shell-mode and finally learned
how to use the tee command.


Jude <jdashiel at panix dot com>
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)

.

On Tue, 6 Sep 2022, Samuel Wales wrote:

> is it possible and reasonable to log everything in every shell buffer
> to a file?  i can imagine lots of output, but i could have the logs go
> into an auto-expired dir.  but would performance ok?
>
>



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

* Re: can shell mode keep a log?
  2022-09-07  5:02 can shell mode keep a log? Samuel Wales
  2022-09-07  5:26 ` Jude DaShiell
@ 2022-09-07  5:43 ` Emanuel Berg
  2022-09-07 17:12 ` Philip Kaludercic
  2 siblings, 0 replies; 9+ messages in thread
From: Emanuel Berg @ 2022-09-07  5:43 UTC (permalink / raw)
  To: help-gnu-emacs

Samuel Wales wrote:

> is it possible and reasonable to log everything in every
> shell buffer to a file? i can imagine lots of output, but
> i could have the logs go into an auto-expired dir. but would
> performance ok?

You must believe the fairy tales I tell you
Love your princess find your way
To your castle if you do
My fairy tales will help you through

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: can shell mode keep a log?
  2022-09-07  5:02 can shell mode keep a log? Samuel Wales
  2022-09-07  5:26 ` Jude DaShiell
  2022-09-07  5:43 ` Emanuel Berg
@ 2022-09-07 17:12 ` Philip Kaludercic
  2022-09-07 18:23   ` Eli Zaretskii
  2 siblings, 1 reply; 9+ messages in thread
From: Philip Kaludercic @ 2022-09-07 17:12 UTC (permalink / raw)
  To: Samuel Wales; +Cc: help-gnu-emacs

Samuel Wales <samologist@gmail.com> writes:

> is it possible and reasonable to log everything in every shell buffer
> to a file?  i can imagine lots of output, but i could have the logs go
> into an auto-expired dir.  but would performance ok?

Does it have to be automatic?  If not, you can always just write out the
contents of a buffer using M-x write-file.



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

* Re: can shell mode keep a log?
  2022-09-07 17:12 ` Philip Kaludercic
@ 2022-09-07 18:23   ` Eli Zaretskii
  2022-09-08  0:40     ` Samuel Wales
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2022-09-07 18:23 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Philip Kaludercic <philipk@posteo.net>
> Cc: help-gnu-emacs@gnu.org
> Date: Wed, 07 Sep 2022 17:12:17 +0000
> 
> Samuel Wales <samologist@gmail.com> writes:
> 
> > is it possible and reasonable to log everything in every shell buffer
> > to a file?  i can imagine lots of output, but i could have the logs go
> > into an auto-expired dir.  but would performance ok?
> 
> Does it have to be automatic?  If not, you can always just write out the
> contents of a buffer using M-x write-file.

A slightly more "automatic" alternative is to save the buffer using
the facilities in midnight.el or something similar.



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

* Re: can shell mode keep a log?
  2022-09-07 18:23   ` Eli Zaretskii
@ 2022-09-08  0:40     ` Samuel Wales
  2022-09-08  0:59       ` Emanuel Berg
  2022-09-10  4:47       ` James Thomas
  0 siblings, 2 replies; 9+ messages in thread
From: Samuel Wales @ 2022-09-08  0:40 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

thank you all for your replies.  here are why i think those soliutions
will not work.

i need ti to be automatic, for the entire shell session, for all
comand including prompts,  sort of like typescrpt ut that would likely
have issues i am unware of such as commands outputtig to termianl or
osehting.

iow a complete history o the shell sessions in my shell buffers, saved
continuously or continually to files efficiently.

it is not for a ingle command.  i would indeed use tee for such things.

soign write-file is good for manual saves and i should remember it
morel  although i think that changes the visited filename or so.  but
it is not the automatic solution i am looking or.  i want a log of the
session.

thank youl.

On 9/7/22, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Philip Kaludercic <philipk@posteo.net>
>> Cc: help-gnu-emacs@gnu.org
>> Date: Wed, 07 Sep 2022 17:12:17 +0000
>>
>> Samuel Wales <samologist@gmail.com> writes:
>>
>> > is it possible and reasonable to log everything in every shell buffer
>> > to a file?  i can imagine lots of output, but i could have the logs go
>> > into an auto-expired dir.  but would performance ok?
>>
>> Does it have to be automatic?  If not, you can always just write out the
>> contents of a buffer using M-x write-file.
>
> A slightly more "automatic" alternative is to save the buffer using
> the facilities in midnight.el or something similar.
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



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

* Re: can shell mode keep a log?
  2022-09-08  0:40     ` Samuel Wales
@ 2022-09-08  0:59       ` Emanuel Berg
  2022-09-10  4:47       ` James Thomas
  1 sibling, 0 replies; 9+ messages in thread
From: Emanuel Berg @ 2022-09-08  0:59 UTC (permalink / raw)
  To: help-gnu-emacs

Samuel Wales wrote:

> i need it to be automatic

Of course it should be.

> it is not for a single command. i would indeed use tee for
> such things

Of course it should be a general solution.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: can shell mode keep a log?
  2022-09-08  0:40     ` Samuel Wales
  2022-09-08  0:59       ` Emanuel Berg
@ 2022-09-10  4:47       ` James Thomas
  2022-09-11  2:08         ` Samuel Wales
  1 sibling, 1 reply; 9+ messages in thread
From: James Thomas @ 2022-09-10  4:47 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Eli Zaretskii, help-gnu-emacs

Samuel Wales wrote:

> i need ti to be automatic, for the entire shell session, for all
> comand including prompts,  sort of like typescrpt ut that would likely
> have issues i am unware of such as commands outputtig to termianl or
> osehting.

You can enable auto-save-mode in the shell buffer. Make sure to read the
manual about the options to control its application.

> soign write-file is good for manual saves and i should remember it
> morel  although i think that changes the visited filename or so.  but
> it is not the automatic solution i am looking or.  i want a log of the
> session.

Once you use write-file, from then on, auto-save-mode is enabled in it
by default.

> iow a complete history o the shell sessions in my shell buffers, saved
> continuously or continually to files efficiently.

You can probably use shell-mode-hook to do one of the above in all such
buffers.

--



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

* Re: can shell mode keep a log?
  2022-09-10  4:47       ` James Thomas
@ 2022-09-11  2:08         ` Samuel Wales
  0 siblings, 0 replies; 9+ messages in thread
From: Samuel Wales @ 2022-09-11  2:08 UTC (permalink / raw)
  To: James Thomas; +Cc: Eli Zaretskii, help-gnu-emacs

comint scrolls off top.  would auto save mode take that into account?

idk about shell-mode-hook, but i was thinking
comint-preoutput-filter-functions would maybe allow saving each set of
output [idk if per chunk of output or per prompt pair], but this
definitely seems like a feature only i need.  :/

On 9/9/22, James Thomas <jimjoe@gmx.net> wrote:
> Samuel Wales wrote:
>
>> i need ti to be automatic, for the entire shell session, for all
>> comand including prompts,  sort of like typescrpt ut that would likely
>> have issues i am unware of such as commands outputtig to termianl or
>> osehting.
>
> You can enable auto-save-mode in the shell buffer. Make sure to read the
> manual about the options to control its application.
>
>> soign write-file is good for manual saves and i should remember it
>> morel  although i think that changes the visited filename or so.  but
>> it is not the automatic solution i am looking or.  i want a log of the
>> session.
>
> Once you use write-file, from then on, auto-save-mode is enabled in it
> by default.
>
>> iow a complete history o the shell sessions in my shell buffers, saved
>> continuously or continually to files efficiently.
>
> You can probably use shell-mode-hook to do one of the above in all such
> buffers.
>
> --
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



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

end of thread, other threads:[~2022-09-11  2:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07  5:02 can shell mode keep a log? Samuel Wales
2022-09-07  5:26 ` Jude DaShiell
2022-09-07  5:43 ` Emanuel Berg
2022-09-07 17:12 ` Philip Kaludercic
2022-09-07 18:23   ` Eli Zaretskii
2022-09-08  0:40     ` Samuel Wales
2022-09-08  0:59       ` Emanuel Berg
2022-09-10  4:47       ` James Thomas
2022-09-11  2:08         ` Samuel Wales

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.