unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org>
To: help-gnu-emacs@gnu.org
Subject: Re: safe way to add contents to a file ?
Date: Thu, 19 Dec 2019 07:33:33 +0900	[thread overview]
Message-ID: <519A615E-447C-4376-8989-9D5C16FB8D1A@traduction-libre.org> (raw)
In-Reply-To: <87a77paifp.fsf@telefonica.net>

Thank you for your comments.

> On Dec 18, 2019, at 22:10, Óscar Fuentes <ofv@wanadoo.es> wrote:
> 
> Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org>
> writes:
> 
>>> What have you looked for?
>> 
>> The files chapter, the buffers chapter. It's all descriptions of
>> function after function and overall very confusing when you don't know
>> the basics of what's necessary.
> 
> IMHO the Elisp reference is not the place to teach how file systems
> handle content.

Yes but I'm not writing binary (or even C) code here. I'm using a high-level language that is supposed to hide the complexity of all that machinery and help me think at a higher level.

> As Stefan noted the Emacs workflow is not all that
> different from what you could do with most popular APIs (POSIX, WIN32,
> etc).

No issue about that.

> I think that the info nodes "Buffer basics" and the linked "Visiting
> files" give a good hint about how to solve your task, supposing that you
> know that on most operative systems it is not possible to directly
> insert content on a file and you need to fake the operation.

I was naïvely thinking that inserting contents in a file is a frequent enough task (think xml nodes for ex), and actually even more frequent than appending, that there would be a relatively standard workflow proposed in the reference.

Stephan proposed that we consider inserting some extra info in the reference. When I'm done sorting my thing, I'll work on that.


Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune





  reply	other threads:[~2019-12-18 22:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18  0:03 safe way to add contents to a file ? Jean-Christophe Helary
2019-12-18  0:36 ` Óscar Fuentes
2019-12-18  3:20   ` Jean-Christophe Helary
2019-12-20 13:50   ` Jean-Christophe Helary
2019-12-20 16:00     ` Stefan Monnier
2019-12-22  3:14       ` Jean-Christophe Helary
2019-12-22  4:42         ` Jean-Christophe Helary
2019-12-22 14:37           ` Óscar Fuentes
2019-12-22 22:18             ` Jean-Christophe Helary
2019-12-23  0:08               ` Óscar Fuentes
2019-12-22 18:23         ` Stefan Monnier
2019-12-18  3:59 ` Stefan Monnier
2019-12-18  9:41   ` Jean-Christophe Helary
2019-12-18 13:10     ` Óscar Fuentes
2019-12-18 22:33       ` Jean-Christophe Helary [this message]
2019-12-18 14:10     ` Stefan Monnier
2019-12-18 22:25       ` Jean-Christophe Helary
2019-12-18 22:27       ` Jean-Christophe Helary

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=519A615E-447C-4376-8989-9D5C16FB8D1A@traduction-libre.org \
    --to=jean.christophe.helary@traduction-libre.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).