diferença entre visitar um arquivo através do emacs ou com o emacsclient?

2

A razão pela qual eu peço é que a maioria das coisas pareçam semelhantes, exceto ao usar a Extensão do Editor Externo do Thunderbird (com o editor designado como emacsclient -c ). Fechar o quadro criado com essa instância do emacsclient com C-x C-c ( C-x # não funciona às vezes?) Também mata o buffer associado a esse quadro (não o comportamento usual do emacsclient).

E, em geral, C-x C-c apenas fechará o quadro a menos que outro buffer seja visitado nesse quadro - depois disso, C-x C-c tentará fechar todos os emacs. Como eu tento entender esse comportamento?

    
por hatmatrix 11.09.2011 / 15:20

1 resposta

2

No Emacs, você pode obter ajuda para qualquer tecla pressionando C -h k e digitando a combinação de teclas que deseja conhecer. Pressionando C-h k C-x # retorna isto:

C-x # runs the command server-edit, which is an interactive compiled Lisp function in 'server.el'.

It is bound to C-x #.

(server-edit &optional ARG)

Switch to next server editing buffer; say "Done" for current buffer. If a server buffer is current, it is marked "done" and optionally saved. The buffer is also killed if it did not exist before the clients asked for it. When all of a client's buffers are marked as "done", the client is notified.

Temporary files such as MH files are always saved and backed up, no questions asked. (The variable 'make-backup-files', if nil, still inhibits a backup; you can set it locally in a particular buffer to prevent a backup for it.) The variable 'server-temp-file-regexp' controls which filenames are considered temporary.

If invoked with a prefix argument, or if there is no server process running, starts server process and that is all. Invoked by C-x #. C-x # runs the command server-edit, which is an interactive compiled Lisp function in 'server.el'.

Similarmente para C-x C-c

C-x C-c runs the command save-buffers-kill-terminal, which is an interactive compiled Lisp function in 'files.el'.

It is bound to C-x C-c, .

(save-buffers-kill-terminal &optional ARG)

Offer to save each buffer, then kill the current connection. If the current frame has no client, kill Emacs itself.

With prefix ARG, silently save all file-visiting buffers, then kill.

If emacsclient was started with a list of filenames to edit, then only these files will be asked to be saved.

    
por 11.09.2011 / 16:32