From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: How to stop desktop.lock file creation Date: Sat, 26 Mar 2022 08:48:41 +0300 Message-ID: <83ils1b6x2.fsf@gnu.org> References: <1843424395.177680.1648161239137@mail1.libero.it> <838rsyczh6.fsf@gnu.org> <1960767723.287175.1648248799870@mail1.libero.it> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12256"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Angelo Graziosi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 26 06:51:50 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nXzL3-00032v-6Y for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Mar 2022 06:51:49 +0100 Original-Received: from localhost ([::1]:53472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nXzL2-0000fn-0z for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Mar 2022 01:51:48 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXzI6-0006tu-D4 for emacs-devel@gnu.org; Sat, 26 Mar 2022 01:48:46 -0400 Original-Received: from [2001:470:142:3::e] (port=47002 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXzI5-0006GX-Fa; Sat, 26 Mar 2022 01:48:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=aoEmtHhBGGLkbO3q2pEqcTQzbvEuGH1UlkVTP08UOjs=; b=NHH2AD759W7q Vdiz5JebwHE4cltoGhxC31Oh08rBUww14RNJbXSZ/o+0pnFl6d9mztar/DRoYBzN5wq3C8mYBWXD3 kqobyVZsi6M3Dn0X86N8X9oNwcNSpnzw+yH2tvi9hH3LMR5rkwL8RZR+lJOhxBU1VdaSGQoTVTHTe qtTKLPXWv5YR88OoYhuut99keuDQB6HdB3qHtPsnovKa+zZ0A9zmWLS7VFUVL+oX6/kFAGaviCS+0 J2vwlhvkNEHyG+YSPUiiw1UVDjjI906FVVbEbZ+He+loXxjHSr6jAOpHtVs7CJNd7J+b+HgU9LN+s 08gKbXEAFf4Ff5QQE/nnLA==; Original-Received: from [87.69.77.57] (port=3477 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXzI4-0003Rv-Kg; Sat, 26 Mar 2022 01:48:45 -0400 In-Reply-To: <1960767723.287175.1648248799870@mail1.libero.it> (message from Angelo Graziosi on Fri, 25 Mar 2022 23:53:19 +0100 (CET)) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:287471 Archived-At: > Date: Fri, 25 Mar 2022 23:53:19 +0100 (CET) > From: Angelo Graziosi > Cc: emacs-devel@gnu.org > > > Why do you need to delete the desktop lock file? If you are annoyed > > The alternative is to accept to load it or not but why should i play this game.. You don't need to play this game. If you set desktop-load-locked-desktop to t, Emacs will unconditionally load the desktop even if locked, no questions asked. Its effect is the same as not having the lock at all, when the process which locked the desktop no longer runs. > > by the question Emacs asks when you invoke it the next time, you can > > simply customize desktop-load-locked-desktop to the value t, then it > > will not ask any questions. > > You do not say if Emacs can be configured to avoid its creation, i.e. the creation of the 'desktop.lock' file.. That's because you cannot, not without changing desktop.el. Maybe you can do that by customizing desktop-base-lock-name to "NUL", but I didn't test that and am not sure it will work. The customization of desktop-load-locked-desktop I suggested above will have the same effect, so I see no reason for you to try something that is unsupported and untested instead. > > If there's some other problem with that lock file, please describe it, > > so we understand what problem you are trying to solve. > > I don't like it, I don't see its usefulness in my case, I am the only user of this PC and the only user of Emacs and I only start it once. Then I think customizing desktop-load-locked-desktop to t is exactly for your situation. Does it cause any further problems? If not, why not use it? > Emacs worked the same before its introduction... The lock was introduced in Emacs 22.2, quite some time ago. It isn't a new feature.