bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Emacs crashes with too many temp buffers?


From: Alex Schroeder
Subject: Emacs crashes with too many temp buffers?
Date: 22 Apr 2001 23:43:42 +0200
User-agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/20.7

In GNU Emacs 20.7.1 (i686-pc-linux-gnu, X toolkit)
 of Sun Apr  8 2001 on snail

Hm, the current copy of the code I just posted with another subject
crashes Emacs as well.  In my case it crashed Emacs while writing file
~/tmp/commands-31, therefore it must have written more than 3100
commands.

I know that the code still has bugs, never mind that now.  :)

Alex.


;; Generate a fortune cookie file for all emacs commands

(require 'cl)
(defun command-cookies (file)
  (interactive "FWrite cookie files: ")
  (setq file (or file "~/tmp/commands"))
  (my-append-string-to-file "%\n%\n" file)
  (loop with i = 1
        for num from 1
        when (> num 99) do (setq num 1 i (1+ i))
        for s being the symbols
        when (commandp s) do
        (my-append-string-to-file
         (concat (describe-function s)
                 "\n\nInvoke with:\n\n"
                 (with-temp-buffer
                   (where-is s t)
                   (buffer-string))
                 "\n%\n")
         (concat file "-" i))))

(defun my-append-string-to-file (str file)
  "Append string STR to FILE."
  (with-temp-buffer
    (insert str)
    (append-to-file (point-min) (point-max) file)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]