all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* package that writes *Messages* to a file
@ 2005-10-27  0:23 Harry Putnam
  2005-10-27 16:16 ` Kevin Rodgers
  0 siblings, 1 reply; 5+ messages in thread
From: Harry Putnam @ 2005-10-27  0:23 UTC (permalink / raw)


Is there a package available that writes the *Messages* buffer to file
as an emacs session progresses?

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

* Re: package that writes *Messages* to a file
       [not found] <mailman.12846.1130373106.20277.help-gnu-emacs@gnu.org>
@ 2005-10-27  1:15 ` Bastien
  2005-10-27  7:28   ` Reiner Steib
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2005-10-27  1:15 UTC (permalink / raw)


Harry Putnam writes:

> Is there a package available that writes the *Messages* buffer to
> file as an emacs session progresses?

Maybe this?

(defun my-save-messages-to-file ()
  "Save *message* buffer to a file."
  (interactive)
  (save-window-excursion
    (switch-to-buffer "*Messages*")
    (write-file "~/emacs_messages.txt" nil)))

;; for me i won't use that, but...
(run-at-time nil 600 'my-save-messages-to-file)

-- 
Bastien

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

* Re: package that writes *Messages* to a file
  2005-10-27  1:15 ` package that writes *Messages* to a file Bastien
@ 2005-10-27  7:28   ` Reiner Steib
  2005-10-27  9:20     ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2005-10-27  7:28 UTC (permalink / raw)


On Thu, Oct 27 2005, Bastien wrote:

>   (save-window-excursion
>     (switch-to-buffer "*Messages*")

,----[ <f1> f switch-to-buffer RET ]
| switch-to-buffer is an interactive Lisp function.
| It is bound to C-c b b.
| (switch-to-buffer buffer &optional norecord)
| 
| [...]
| WARNING: This is NOT the way to work on another buffer temporarily
| within a Lisp program!  Use `set-buffer' instead.  That avoids messing with
| the window-buffer correspondences.
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: package that writes *Messages* to a file
  2005-10-27  7:28   ` Reiner Steib
@ 2005-10-27  9:20     ` Bastien
  0 siblings, 0 replies; 5+ messages in thread
From: Bastien @ 2005-10-27  9:20 UTC (permalink / raw)


Reiner Steib writes:

> On Thu, Oct 27 2005, Bastien wrote:
>
>>   (save-window-excursion
>>     (switch-to-buffer "*Messages*")
>
> ,----[ <f1> f switch-to-buffer RET ]
> | WARNING: This is NOT the way to work on another buffer temporarily
> | within a Lisp program!  Use `set-buffer' instead.  That avoids messing with
> | the window-buffer correspondences.
> `----
>
> Bye, Reiner.

... always learning! thx

-- 
Bastien

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

* Re: package that writes *Messages* to a file
  2005-10-27  0:23 Harry Putnam
@ 2005-10-27 16:16 ` Kevin Rodgers
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2005-10-27 16:16 UTC (permalink / raw)


Harry Putnam wrote:
 > Is there a package available that writes the *Messages* buffer to file
 > as an emacs session progresses?

Why not just:

(with-current-buffer "*Messages*"
   (setq buffer-offer-save t))

so you are queried when you exit emacs whether to save the buffer or
not.  Or:

(with-current-buffer "*Messages*"
   (set-visited-file-name "~/emacs_messages"))

so the buffer is auto-saved during the session, and then you are queried
when you exit.

-- 
Kevin Rodgers

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

end of thread, other threads:[~2005-10-27 16:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.12846.1130373106.20277.help-gnu-emacs@gnu.org>
2005-10-27  1:15 ` package that writes *Messages* to a file Bastien
2005-10-27  7:28   ` Reiner Steib
2005-10-27  9:20     ` Bastien
2005-10-27  0:23 Harry Putnam
2005-10-27 16:16 ` Kevin Rodgers

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.