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

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

Why won't this command kill a buffer?


From: Joe Fineman
Subject: Why won't this command kill a buffer?
Date: Fri, 11 Feb 2011 17:48:22 -0500
User-agent: Gnus/5.101 (Gnus v5.10.10) Emacs/22.3 (windows-nt)

I am using Emacs 22.3.1 under Windows XP.  I have used the following
kluge for many years:

(defun marklog ()
  "Insert a backslash into the Log file for the current directory, and into 
Today if it is in /b."
  (interactive)
  (save-window-excursion
    (let ((dir default-directory)
          (require-final-newline))
      (find-file "~/timing/Logmark")
      (write-region 1 2 (concat dir "Log") t 0)
      (if (equal (substring dir 0 15) "c:/usr/own/f/b/")
          (write-region 1 2 "~/b/Today" t 0))
      (kill-this-buffer))
      ))

The Logmark file consists of a single backslash.

The command kill-this-buffer does not work, and neither do attempts to
use kill-buffer with an argument.  The buffer hangs around and is
sometimes a nuisance.

And, incidentally, is there any simpler way to tell Emacs to append a
character to a file?
-- 
---  Joe Fineman    address@hidden

||:  In other words, uninteresting immature ideas undergo violent  :||
||:  conflict during their latency.                                :||


reply via email to

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