all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Hot to prevent emacs from generating ".#xxxx" files?
@ 2008-08-30 18:57 gooood
  2008-08-31  7:43 ` David Hansen
  0 siblings, 1 reply; 6+ messages in thread
From: gooood @ 2008-08-30 18:57 UTC (permalink / raw)
  To: Help-gnu-emacs


When edit files with emacs, emacs will generate a broken symbolic link.
For example if you open ~/a.txt in emacs and type some words, 
there will be a symbolic lnk named .#a.txt in your home directory.
Is there some method to prevent emacs from generating this file? 
Or put it in another directory such as '/tmp'?
-- 
View this message in context: http://www.nabble.com/Hot-to-prevent-emacs-from-generating-%22.-xxxx%22-files--tp19235974p19235974.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Hot to prevent emacs from generating ".#xxxx" files?
  2008-08-30 18:57 Hot to prevent emacs from generating ".#xxxx" files? gooood
@ 2008-08-31  7:43 ` David Hansen
  2008-08-31  8:37   ` s ticket
  0 siblings, 1 reply; 6+ messages in thread
From: David Hansen @ 2008-08-31  7:43 UTC (permalink / raw)
  To: help-gnu-emacs

On Sat, 30 Aug 2008 11:57:51 -0700 (PDT) gooood wrote:

> When edit files with emacs, emacs will generate a broken symbolic link.
> For example if you open ~/a.txt in emacs and type some words, 
> there will be a symbolic lnk named .#a.txt in your home directory.
> Is there some method to prevent emacs from generating this file? 

Why would you want to do that?  Emacs uses them for locking and auto
saving.  Unless you like painful data loss you should be happy they are
there.

> Or put it in another directory such as '/tmp'?

I don't think so.

David





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Hot to prevent emacs from generating ".#xxxx" files?
  2008-08-31  7:43 ` David Hansen
@ 2008-08-31  8:37   ` s ticket
  2008-08-31  8:41     ` David Hansen
  0 siblings, 1 reply; 6+ messages in thread
From: s ticket @ 2008-08-31  8:37 UTC (permalink / raw)
  To: help-gnu-emacs

> Why would you want to do that?  Emacs uses them for locking and auto
> saving.  Unless you like painful data loss you should be happy they are
> there.
>
Because when emacs exits abnormally, it may leave a lot of ".#xxx" files.
It may break some compiling as some compile tools just search all ".c" files
in the directory and complain "can't open .#xxx.c" ;


                                                     yours

                                                  jianbin




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Hot to prevent emacs from generating ".#xxxx" files?
  2008-08-31  8:37   ` s ticket
@ 2008-08-31  8:41     ` David Hansen
  2008-08-31  9:01       ` s ticket
  0 siblings, 1 reply; 6+ messages in thread
From: David Hansen @ 2008-08-31  8:41 UTC (permalink / raw)
  To: help-gnu-emacs

On Sun, 31 Aug 2008 16:37:04 +0800 s. ticket wrote:

>> Why would you want to do that?  Emacs uses them for locking and auto
>> saving.  Unless you like painful data loss you should be happy they are
>> there.
>>
> Because when emacs exits abnormally, it may leave a lot of ".#xxx" files.
> It may break some compiling as some compile tools just search all ".c" files
> in the directory and complain "can't open .#xxx.c" ;

That's exactly why you want them.  After a crash you can M-x
recover-this-file and get you changes back.

David





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Hot to prevent emacs from generating ".#xxxx" files?
  2008-08-31  8:41     ` David Hansen
@ 2008-08-31  9:01       ` s ticket
  2008-08-31  9:21         ` David Hansen
  0 siblings, 1 reply; 6+ messages in thread
From: s ticket @ 2008-08-31  9:01 UTC (permalink / raw)
  To: help-gnu-emacs

>> Because when emacs exits abnormally, it may leave a lot of ".#xxx" files.
>> It may break some compiling as some compile tools just search all ".c" files
>> in the directory and complain "can't open .#xxx.c" ;
>
> That's exactly why you want them.  After a crash you can M-x
> recover-this-file and get you changes back.
Yes. But it's better if I can put them in a special directory like
backup files and auto-save files.






                                                          Jianbin




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Hot to prevent emacs from generating ".#xxxx" files?
  2008-08-31  9:01       ` s ticket
@ 2008-08-31  9:21         ` David Hansen
  0 siblings, 0 replies; 6+ messages in thread
From: David Hansen @ 2008-08-31  9:21 UTC (permalink / raw)
  To: help-gnu-emacs

On Sun, 31 Aug 2008 17:01:55 +0800 s. ticket wrote:

>>> Because when emacs exits abnormally, it may leave a lot of ".#xxx" files.
>>> It may break some compiling as some compile tools just search all ".c" files
>>> in the directory and complain "can't open .#xxx.c" ;
>>
>> That's exactly why you want them.  After a crash you can M-x
>> recover-this-file and get you changes back.
> Yes. But it's better if I can put them in a special directory like
> backup files and auto-save files.

If such a file is present you have a far more serious problem, namely
potential data loss.  After you solved that (M-x recover-this-file) the
auto-save file will disappear automatically and the minor problem is
solved as well.

If you insist you can have a look how the tramp package works around
this.  AFAIK it doesn't use the remote directory for auto-save files, or
at least it can be configured to not do so.

David





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-08-31  9:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-30 18:57 Hot to prevent emacs from generating ".#xxxx" files? gooood
2008-08-31  7:43 ` David Hansen
2008-08-31  8:37   ` s ticket
2008-08-31  8:41     ` David Hansen
2008-08-31  9:01       ` s ticket
2008-08-31  9:21         ` David Hansen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.