[Top][All Lists]

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

Re: good examples of Emacs modules?

From: Óscar Fuentes
Subject: Re: good examples of Emacs modules?
Date: Thu, 31 Mar 2016 22:23:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> Thank you, that file acts as a nice cookbook. Still need to figure out
>> how to best handle a long-lived session with an external API.
> Not sure what you mean by "a long-lived session with an external
> API".  Can you elaborate?

Some APIs are session-based. Those give the user an object that lives
through the session and needs to be disposed at the end. On the case of
VC or Magit, Emacs would request from libgit2 to work with a given repo,
operate on it and close the session. That means that if the user kills
the magit-status buffer that was visiting a repo, the associated session
object must be closed (this is a simplistic scenario, in practice things
are more complicated.) It would be nice to explain how to handle this
use case on a robust way (the failure to properly close a session,
transaction, whatever on some packages can produce very annoying
consequences.) How objects created by the module system interact with
garbage collection is an start.


reply via email to

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