OVH Cloud OVH Cloud

[VM 6.72] fonction revert-buffer

2 réponses
Avatar
fred
Bonjour,

Lorsque je veux faire un « Revert Folder » de mon Inbox, celui-ci me
répond invariablement

« Buffer does not seem to be associated with any file »

ce qui ne me surprend pas outre mesure mais... à quoi sert cette
fonction dans ce cas ?

J'aimerais en effet mettre mon Inbox à jour lorsqu'il est modifié/lu par
un autre lecteur de mail.

Une idée ?


Merci.

--
FP.

2 réponses

Avatar
Patrice Karatchentzeff
fred writes:

Bonjour,

Lorsque je veux faire un « Revert Folder » de mon Inbox, celui-ci me
répond invariablement

« Buffer does not seem to be associated with any file »

ce qui ne me surprend pas outre mesure mais... à quoi sert cette
fonction dans ce cas ?



Aucune idée mais cela fait la même chose avec VM 7.01. Par contre, ce
n'est accessible que si INBOX est modifié. Donc, si je comprends bien,
cela revient à sauvegarder l'état courant dans INBOX.

D'habitude, je fais cela avec C-x C-s...

Si cela ne fait rien chez toi, je t'engage à changer de version : on
doit être à la version 7.10 ou plus et il y avait de mémoire plein de
trucs qui ne fonctionnaient par sur la version 6.72. Tu est sur une
Potato ? À l'époque, j'avais dû rétroporté une version plus récente...

J'aimerais en effet mettre mon Inbox à jour lorsqu'il est modifié/lu par
un autre lecteur de mail.

Une idée ?



Non. J'ai l'impression que cela ne fonctionne que si INBOX est bougé
en #INBOX#... Mais j'ai fait juste un essai rapide.

PK

--
      |      _,,,---,,_       Patrice KARATCHENTZEFF
ZZZzz /,`.-'`'    -.  ;-;;,_   mailto:
     |,4-  ) )-,_. , (  `'-'  http://p.karatchentzeff.free.fr
    '---''(_/--'  `-'_)       
Avatar
Patrice Karatchentzeff
fred writes:

Bonjour,

Lorsque je veux faire un « Revert Folder » de mon Inbox, celui-ci me
répond invariablement

« Buffer does not seem to be associated with any file »

ce qui ne me surprend pas outre mesure mais... à quoi sert cette
fonction dans ce cas ?



Bon, j'ai trouvé : c'est dans la FAQ tout simplement :

Crash Recovery

When Emacs crashes, its last action before dying is to try to write
out an autosave file that contains changes to files that you were
editing. VM folders are file buffers inside Emacs, so folders are
autosaved also. Changes, with regard to VM folders, means attribute
changes, label additions and deletions, message edits, and
expunges. VM keeps track of whether a message is new or old, whether
it has been replied to, whether it is flagged for deletion and so on,
by writing special headers into the folder buffer. These headers are
saved to disk when you save the folder. If Emacs crashes before the
folder has been saved, VM may forget some attribute changes unless
they were written to the autosave file.

Note that when VM retrieves mail from spool files it always writes
them to disk immediately and at least one copy of the message is on
disk at all times. So while you can lose attribute changes from
crashes, you should not lose messages unless the disk itself is
compromised.

When you visit a folder, VM checks for the existence of an autosave
file that has been modified more recently than the folder file. If
such an autosave file exists, there is a good chance that Emacs or
your operating system crashed while VM was visiting a folder. VM will
then write a message to the echo area informing you of the existence
of the autosave file and visit the folder in read-only mode. Visiting
the folder in read-only mode prevents you from modifying the folder,
which in turn prevents Emacs from wanting to write new changes to the
autosave file. VM will not retrieve new mail for a folder that is in
read-only mode. VM also skips summary generation and MIME decoding to
help catch your attention.

If you want to recover the lost changes, run M-x recover-file or use
the Recover toolbar button. At the `Recover File: ' prompt press
RET. Emacs will then display a detailed directory listing showing the
folder file and the autosave file and ask if you want to recover from
the autosave file. A good rule of thumb is to answer "yes" if the
autosave file is larger than the folder file. If the autosave file is
significantly smaller, Emacs may not have completed writing the
autosave file. Or it could be that the smaller autosave file reflects
the results of an expunge that you had not yet committed to disk
before the crash. If so, answering "no" means you might have to do
that expunge again, but this is better than not knowing whether the
autosave file was truncated.

Assuming you answered "yes", the folder buffer's contents will be
replaced by the contents of the autosave file and VM will reparse the
folder. At this point the contents of the folder buffer and the disk
copy of the folder are different. Therefore VM will not get new mail
for this folder until the two copies of the folder are
synchronized. When you are satisfied that the recovered folder is
whole and intact, type S to save it to disk. After you do this, VM
will allow you to use g to retrieve any new mail that has arrived in
the spool files for the folder.

Assuming you answered "no" to the recovery question, you should type
C-x C-q, which is bound to vm-toggle-read-only in VM folder
buffers. The folder will be taken out of read-only mode and you can
read and retrieve your mail normally.

donc, a priori, cela ne peut pas servir à ce que tu veux faire.

PK

--
      |      _,,,---,,_       Patrice KARATCHENTZEFF
ZZZzz /,`.-'`'    -.  ;-;;,_   mailto:
     |,4-  ) )-,_. , (  `'-'  http://p.karatchentzeff.free.fr
    '---''(_/--'  `-'_)