[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Persistence of variables
From: |
Emanuel Berg |
Subject: |
Re: Persistence of variables |
Date: |
Sat, 24 Mar 2018 04:06:41 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Eli Zaretskii wrote:
>> From: Rolf Ade <rolf@pointsman.de>
>> Date: Thu, 22 Mar 2018 02:36:56 +0100
>>
>> >> (defun write-string-to-file (string file)
>> >> "Write STRING to FILE.
>> >> Create nonexistent FILE otherwise overwrite."
>> >> (interactive "sstring: \nFfile: ")
>> >> (with-temp-file file
>> >> (insert string "\n") ))
>> >
>> > We have append-to-file, which can do this out of the box.
>>
>> I'm sorry to nit, but Emanuels
>> write-string-to-file differs from
>> append-to-file in that it ensures the file
>> includes (only) string while append-to-file,
>> well, appends string to the file at the end,
>> if it exists.
>
> And I'm sorry to nit back, but creating an
> empty file is trivial, in which case
> append-to-file will do the same job.
>
> More to the point, I think this feature of
> append-to-file is largely unknown, which is
> why I made a point of mentioning it. (Btw,
> write-region supports a very
> similar feature.)
1) topic drift isn't OT unless its OT
2) one would even suspect - if Manny wasn't
such a skilled programmer - he would have
written that function because he didn't
*know* of the append-to-file-use! But of
course that seems completely unthinkable
You can fire your arrows from the tower of
Babylon. But you can NEVER strike God!
--
underground experts united
http://user.it.uu.se/~embe8573
- Re: Persistence of variables, (continued)
- Message not available
- Re: Persistence of variables, Robert L., 2018/03/24
- Re: Persistence of variables, Marcin Borkowski, 2018/03/25
- Re: Persistence of variables, Eric Abrahamsen, 2018/03/25
- Re: Persistence of variables, Marcin Borkowski, 2018/03/28
- Message not available
- Re: Persistence of variables, Emanuel Berg, 2018/03/21
- Re: Persistence of variables, Eli Zaretskii, 2018/03/21
- Message not available
- Re: Persistence of variables, Emanuel Berg, 2018/03/21
- Message not available
- Re: Persistence of variables, Rolf Ade, 2018/03/21
- Re: Persistence of variables, Eli Zaretskii, 2018/03/22
- Message not available
- Re: Persistence of variables,
Emanuel Berg <=