From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 25 12:47:37 2025 Received: (at submit) by debbugs.gnu.org; 25 Feb 2025 17:47:37 +0000 Received: from localhost ([127.0.0.1]:48310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tmz1s-0001C4-Ki for submit@debbugs.gnu.org; Tue, 25 Feb 2025 12:47:36 -0500 Received: from lists.gnu.org ([2001:470:142::17]:42874) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tmz1q-0001Bi-M4 for submit@debbugs.gnu.org; Tue, 25 Feb 2025 12:47:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tmz1k-0000ou-Hj for bug-gnu-emacs@gnu.org; Tue, 25 Feb 2025 12:47:28 -0500 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tmz1i-00085h-VJ for bug-gnu-emacs@gnu.org; Tue, 25 Feb 2025 12:47:28 -0500 Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-855bb6041a6so143991639f.0 for ; Tue, 25 Feb 2025 09:47:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740505643; x=1741110443; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=9dmeFpBClH8/tSNgWwHh21DSIduaWxhJZKZFIcLdihI=; b=T9Wc+ZzccNuYJBnzCEg8N7eGfHzQyI9YB2dRcleE0Y16n0P7wIRF+gaXzViNWXw9So XYBhle8ZDbJjrHCBu8qskuU16+34RoybmM8IoKpUygY27pvXRx8VWCXNLDXGJg1uBSOu 1eJCSqYjqq8UOkS0mtsO919d7k3xb/CQOGC9yfb3a0o96qdHrWjkUgxZbQfmNlRWxd/Y db6YHQPe0NaF/oppnuSNKwf7UqqwwEd5hI5Cf0MO+6MFYgmOZYMEE9SljOzZG5+OHzs6 4HFCaiGvIfVh3+BuXuD0Q6Bx2Q2HAUcSDH95fLFfJLsTAMhf2FQGEXygKBdkzhAzr9JT qsBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740505643; x=1741110443; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=9dmeFpBClH8/tSNgWwHh21DSIduaWxhJZKZFIcLdihI=; b=Ck7Lj3DsQGaltlHVdFfBZVd7+LfffbyCWYh7LZvH+S7Q4ywc5OHn8v+fFBuIn/2E0B Kd3sfud1PB9wJzZMOV+cmRWfx3ulKKCcCFC51bh3/eSNKK5LIr2LwAGKtqfOSNIXMMi0 bp+X/lTJ73HhM/A4YUKpxwddMiYRPSgX2Sp5Ij6N3m/UV9hz06DtrbUT1eEEqiuxVkD5 gRqzuzNw3+ZPlzuhR+0fF7YGgXmGWJBdO5U4hCqaRRPrbfKkyj3DZe29bM75frU83+VL RgQM+T936XBkukHrz5MEQaDh4e17vAgBLgrXS8iT0JobvS9WjKgQa8k3NpXJkRrpvRG8 PaLg== X-Gm-Message-State: AOJu0Yx8VI/tH52ON4ldVfMCHyGB7D5c31kpUmopE/VrjMU4bnnCOGdy InqycwFvwGlZJPql1Ltz6cywl6WAvbKxdF8ERYVVJuvBmp5ClMT0s3HJ21/S/weML+XpbrsMESt x423f4wxp9GNoH0zO422yw0k1hjD+NQ== X-Gm-Gg: ASbGncvMk16N8ERlrQpYhsnH9uzKPp0/VWbkgNgU6grhlyBQB2cgLI5w93Iw25e8cTH Q2RnfEJPEO96zSezeFAuU3SWtVwo/vVGbEQKAPRy6sAOiuR+Ke/dHvHIvIcFQy5l+U2H4vrbeYX LWoq3hGw== X-Google-Smtp-Source: AGHT+IFyIwswT+Ko4je5Zn98u+Ct0IwWFCF0j1oligOUMnU+biDhP9DC+acWHylUMIoblPFw46wwwtzuwDk+/jbc0cg= X-Received: by 2002:a05:6602:60cb:b0:855:6d7a:1820 with SMTP id ca18e2360f4ac-857ad6ee650mr21819639f.4.1740505643511; Tue, 25 Feb 2025 09:47:23 -0800 (PST) MIME-Version: 1.0 From: =?UTF-8?B?Sm/Do28gR3VlcnJh?= Date: Tue, 25 Feb 2025 18:46:47 +0100 X-Gm-Features: AWEUYZnkZrgIrt5OidnVIdD3q8dNCwkJrX0Unt2V25rjhzkDWnzb9FEt-PziiZc Message-ID: Subject: [PATCH] Promote desktop-dirname to a defcustom To: bug-gnu-emacs@gnu.org Content-Type: multipart/mixed; boundary="0000000000009c98e8062efb0c27" Received-SPF: pass client-ip=2607:f8b0:4864:20::d2e; envelope-from=joca.bt@gmail.com; helo=mail-io1-xd2e.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PYZOR_CHECK=1.392, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --0000000000009c98e8062efb0c27 Content-Type: text/plain; charset="UTF-8" --0000000000009c98e8062efb0c27 Content-Type: application/octet-stream; name="0001-Promote-desktop-dirname-to-a-defcustom.patch" Content-Disposition: attachment; filename="0001-Promote-desktop-dirname-to-a-defcustom.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_m7krweo50 RnJvbSAxNmM0ZTg4ZDdhZTA4ZDEwZjg5NjVlMzViYjA4ZDRmYjRkMDQ4YmM3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/Sm89QzM9QTNvPTIwR3VlcnJhPz0gPGpvY2Eu YnRAZ21haWwuY29tPgpEYXRlOiBUdWUsIDI1IEZlYiAyMDI1IDE4OjM2OjU3ICswMTAwClN1Ympl Y3Q6IFtQQVRDSF0gUHJvbW90ZSBkZXNrdG9wLWRpcm5hbWUgdG8gYSBkZWZjdXN0b20KClRoaXMg c2hvdWxkIG1ha2UgaXQgbW9yZSBleHBsaWNpdCB0aGF0IHRoaXMgdmFyaWFibGUgY2FuIGJlIGN1 c3RvbWl6ZWQgYnkgdGhlCnVzZXIuCi0tLQogbGlzcC9kZXNrdG9wLmVsIHwgOCArKysrKy0tLQog MSBmaWxlIGNoYW5nZWQsIDUgaW5zZXJ0aW9ucygrKSwgMyBkZWxldGlvbnMoLSkKCmRpZmYgLS1n aXQgYS9saXNwL2Rlc2t0b3AuZWwgYi9saXNwL2Rlc2t0b3AuZWwKaW5kZXggNzYxZDQ1NS4uODQx Mjk3MCAxMDA2NDQKLS0tIGEvbGlzcC9kZXNrdG9wLmVsCisrKyBiL2xpc3AvZGVza3RvcC5lbApA QCAtMjYzLDYgKzI2MywxMSBAQCBjYXNlIGlmIHlvdSBoYXZlIHJlbW90ZWx5IG1vdW50ZWQgKE5G UykgcGF0aHMgaW4KICAgOmdyb3VwICdkZXNrdG9wCiAgIDp2ZXJzaW9uICIyMi4yIikKIAorKGRl ZmN1c3RvbSBkZXNrdG9wLWRpcm5hbWUgbmlsCisgICJUaGUgZGlyZWN0b3J5IGluIHdoaWNoIHRo ZSBkZXNrdG9wIGZpbGUgc2hvdWxkIGJlIHNhdmVkLiIKKyAgOnR5cGUgJ2RpcmVjdG9yeQorICA6 Z3JvdXAgJ2Rlc2t0b3ApCisKIChkZWZjdXN0b20gZGVza3RvcC1iYXNlLWZpbGUtbmFtZQogICAo Y29udmVydC1zdGFuZGFyZC1maWxlbmFtZSAiLmVtYWNzLmRlc2t0b3AiKQogICAiTmFtZSBvZiBm aWxlIGZvciBFbWFjcyBkZXNrdG9wLCBleGNsdWRpbmcgdGhlIGRpcmVjdG9yeSBwYXJ0LiIKQEAg LTYyNiw5ICs2MzEsNiBAQCBTZWUgYWxzbyBgZGVza3RvcC1taW5vci1tb2RlLXRhYmxlJy4iKQog KHB1dCAnZGVza3RvcC1taW5vci1tb2RlLWhhbmRsZXJzICdyaXNreS1sb2NhbC12YXJpYWJsZSB0 KQogCiA7OyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0oZGVmdmFyIGRlc2t0b3AtZGlybmFtZSBuaWwK LSAgIlRoZSBkaXJlY3RvcnkgaW4gd2hpY2ggdGhlIGRlc2t0b3AgZmlsZSBzaG91bGQgYmUgc2F2 ZWQuIikKLQogKGRlZnVuIGRlc2t0b3AtZnVsbC1maWxlLW5hbWUgKCZvcHRpb25hbCBkaXJuYW1l KQogICAiUmV0dXJuIHRoZSBmdWxsIG5hbWUgb2YgdGhlIGRlc2t0b3AgZmlsZSBpbiBESVJOQU1F LgogRElSTkFNRSBvbWl0dGVkIG9yIG5pbCBtZWFucyB1c2UgYGRlc2t0b3AtZGlybmFtZScuIgot LSAKMi40NC4wLndpbmRvd3MuMQoK --0000000000009c98e8062efb0c27-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 25 12:59:20 2025 Received: (at 76561) by debbugs.gnu.org; 25 Feb 2025 17:59:21 +0000 Received: from localhost ([127.0.0.1]:48332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tmzDE-0001hB-EX for submit@debbugs.gnu.org; Tue, 25 Feb 2025 12:59:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60652) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tmzDC-0001gt-4O for 76561@debbugs.gnu.org; Tue, 25 Feb 2025 12:59:18 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tmzD6-00016a-OE; Tue, 25 Feb 2025 12:59:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=SzNiS+Gqxfc8+Klsug+AEN6BuGlixacsKCCWleIbHm0=; b=lq+WtjRA9CdULSAYR0Uh dp+l+NsJQMVYO1n1JT+/d37cN12rCqyRU2sOl9TkOgZXHYKsnGIuGspKLqoorBx8Y7Gb/Vrc39d3I O2OriyWtesE7ClWPeBrdjAjQHHzT+Z10V5CLRWDWfVIO+E7902OC6WtWKYLtX7N5Ntylk65gy48KT oyoxjY+iZosNjFB2UbE8PHfTNsJWKyHEbNhx2BoCRgPN6WAqPTz9XQp1VZdLFLh5tqS0b4mpwKorq FXGOvj1v7lk3CJsCqUVmLckvWr/yoDAnLYWNXpPABpCmz1lEloA0pSsT62jl9d0M5MU+YYMuyvxqr PPLTRzb1hdhRJA==; Date: Tue, 25 Feb 2025 19:59:03 +0200 Message-Id: <86ldttx5w8.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?Jo=C3=A3o?= Guerra In-Reply-To: (message from =?utf-8?Q?Jo=C3=A3o?= Guerra on Tue, 25 Feb 2025 18:46:47 +0100) Subject: Re: bug#76561: [PATCH] Promote desktop-dirname to a defcustom References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76561 Cc: 76561@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Guerra > Date: Tue, 25 Feb 2025 18:46:47 +0100 > > From 16c4e88d7ae08d10f8965e35bb08d4fb4d048bc7 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Jo=C3=A3o=20Guerra?= > Date: Tue, 25 Feb 2025 18:36:57 +0100 > Subject: [PATCH] Promote desktop-dirname to a defcustom > > This should make it more explicit that this variable can be customized by the > user. Thanks, but I don't think this is right. desktop-dirname is a variable, not a user option, because desktop.el modifies its value when the user reads or saves desktop, and it is wrong for a Lisp program to change the value of a user option. Moreover, one can read several different desktop filers in the same Emacs session, and desktop.el currently arranges for the subsequent desktop-save to save desktop to the file from which it was last read. If users customize desktop-dirname to some value, and desktop.el will be forced to use this value unconditionally (as it should do with user options), then this feature will be lost. May I ask what problem you are trying to solve by this change? Can you describe a situation where you needed to force a particular value of desktop-dirname? > +(defcustom desktop-dirname nil > + "The directory in which the desktop file should be saved." > + :type 'directory If the type is 'directory', then the value cannot be nil, because nil is not a valid directory. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 25 13:13:21 2025 Received: (at 76561) by debbugs.gnu.org; 25 Feb 2025 18:13:21 +0000 Received: from localhost ([127.0.0.1]:48404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tmzQn-0002Qm-0q for submit@debbugs.gnu.org; Tue, 25 Feb 2025 13:13:21 -0500 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]:52411) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tmzQl-0002QZ-7Z for 76561@debbugs.gnu.org; Tue, 25 Feb 2025 13:13:20 -0500 Received: by mail-il1-x12a.google.com with SMTP id e9e14a558f8ab-3d03d2bd7d2so56393425ab.0 for <76561@debbugs.gnu.org>; Tue, 25 Feb 2025 10:13:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740507193; x=1741111993; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=v/OFzWgDZb7s0UPbk3rLAhScymB464EjWCe++KPB3oM=; b=bh7Fw+onsHqLoSHHZPCiIafdCFIU241a5ayFB+4AIvwD0EdXhbYyAnkziumWjnatpa W6T3bvGpRNIhjikapBJ9OozTNOjokaufaaY6zx+6VmJvMpxHupnAPrwZV/L+6wXbOo3C y/UlNTQ8F6Qm4d9f0fHZ2W3zxEiLEU9oEjvI6O/adSbWU2M1BTMOw46Y0TNeHtRHNnBQ 0ic/cEBdPgWu563qPkBcW4VyAm5tCmYXojkfR7Q7qEf8hm/1Uu9GbICrz+pnBPyMP6ON BndVFIlA0aKLa4Nr70+U38H+RbX8+t7YQIWeqndlIh8HmdxktP8I/7UiAjE+lxoYpMwd K6Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740507193; x=1741111993; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v/OFzWgDZb7s0UPbk3rLAhScymB464EjWCe++KPB3oM=; b=kxRIMOI6Z35gfkXzQLZQyYb8VufO7LTvlvW83gL4DYOCuWtFyUKcc/yDX2bRYufFxl kQQnEQLk5dIZRinKkS2QIM6SyZUpuoT/1vb4IYzRMdCO/aN8MrFQHsQcEgh4bK9R6lQC AKVrRyydN4tMLBiXQPCJyzVVbDkH/0ltDK063zXVeKKCQusLWiZ0ldlRhLVKOGBfZahW /RQN1u6WkEgvTXrrekpK90WAmlLYbvAH4qae2lO5JTfpnMJ1W5gw/DsIYMeValwnR1OG IHJtfq8YTL4E7rZz/I+ShWX3F4pbl2MP9Hqrs50IJnXmADO+oprWRoOeGk9bZ7PDhUUc V7Fg== X-Gm-Message-State: AOJu0Yzd4mcaPSAJHepY7eGObEF5Hp+xFTmJKvqW0pyJfKBCP+JGz1t8 5HwJkRNWcHT1JMBJzbQ+Jl/tkcVcqoTUzX0o6BrFzWiP7n8dzw90jjkhhQtdDWhuWH+uE546oLY hN+d54IgZuWkz/jIzXw0bO75qQw7Ru8/g X-Gm-Gg: ASbGnctyXtHWb73+PV7untU4x0z0wf8JWbKWhXXCs/DqU6Q6bJZzyO+v3gk7ZTwkHuA ufFpMaiAetrBaZqIMGjC1YaiiOzGyc1acwZQaDms5HZ1IIkFUvzjeivw1/qXTKsFXteu0lHVQty b+EVMvdw== X-Google-Smtp-Source: AGHT+IGnxsAq5fwNso9RheTBLz754TV7soNgdySYR8epT71pyKjzZPUhAS5N0/HMvhMIA+ditJpSM1eqkC/3Z0jVvkM= X-Received: by 2002:a05:6e02:1f11:b0:3cf:b626:66c2 with SMTP id e9e14a558f8ab-3d30489c934mr44334315ab.19.1740507193344; Tue, 25 Feb 2025 10:13:13 -0800 (PST) MIME-Version: 1.0 References: <86ldttx5w8.fsf@gnu.org> In-Reply-To: <86ldttx5w8.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gR3VlcnJh?= Date: Tue, 25 Feb 2025 19:12:37 +0100 X-Gm-Features: AWEUYZl-fCFlCJbGKWsqJq6-UavDs1aLQOefZKJ7ZuKCH6Mx6hmi1uz1nk98oI0 Message-ID: Subject: Re: bug#76561: [PATCH] Promote desktop-dirname to a defcustom To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76561 Cc: 76561@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, the idea is to allow the user to customize where the desktop file is saved by default. Currently, the user can only customize the name for the file, its lock, and the directories where to search for desktop files for loading. I've been customizing desktop-dirname this way for a long time, but I don't use multiple desktops. Note that desktop-dirname appears in the documentation of other options, which can lead to the idea that it can be customized. For example: ``` (defcustom desktop-save 'ask-if-new "Specifies whether the desktop should be saved when it is killed. ... The variables `desktop-dirname' and `desktop-base-file-name' determine where the desktop is saved." ``` > If users customize desktop-dirname to some value, and desktop.el will be = forced to use this value unconditionally (as it should do with user options= ), then this feature will be lost. Since the user can only have one desktop active at a time, it shouldn't be problematic but I now understand that's not ideal. In that case, what about introducing a new option that feeds the variable? Unless there are already other alternatives. On Tue, 25 Feb 2025 at 18:59, Eli Zaretskii wrote: > > > From: Jo=C3=A3o Guerra > > Date: Tue, 25 Feb 2025 18:46:47 +0100 > > > > From 16c4e88d7ae08d10f8965e35bb08d4fb4d048bc7 Mon Sep 17 00:00:00 2001 > > From: =3D?UTF-8?q?Jo=3DC3=3DA3o=3D20Guerra?=3D > > Date: Tue, 25 Feb 2025 18:36:57 +0100 > > Subject: [PATCH] Promote desktop-dirname to a defcustom > > > > This should make it more explicit that this variable can be customized = by the > > user. > > Thanks, but I don't think this is right. desktop-dirname is a > variable, not a user option, because desktop.el modifies its value > when the user reads or saves desktop, and it is wrong for a Lisp > program to change the value of a user option. > > Moreover, one can read several different desktop filers in the same > Emacs session, and desktop.el currently arranges for the subsequent > desktop-save to save desktop to the file from which it was last read. > If users customize desktop-dirname to some value, and desktop.el will > be forced to use this value unconditionally (as it should do with user > options), then this feature will be lost. > > May I ask what problem you are trying to solve by this change? Can > you describe a situation where you needed to force a particular value > of desktop-dirname? > > > +(defcustom desktop-dirname nil > > + "The directory in which the desktop file should be saved." > > + :type 'directory > > If the type is 'directory', then the value cannot be nil, because nil > is not a valid directory. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 25 14:43:14 2025 Received: (at 76561) by debbugs.gnu.org; 25 Feb 2025 19:43:14 +0000 Received: from localhost ([127.0.0.1]:48551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tn0pm-0006WN-6O for submit@debbugs.gnu.org; Tue, 25 Feb 2025 14:43:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53324) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tn0pj-0006W6-J4 for 76561@debbugs.gnu.org; Tue, 25 Feb 2025 14:43:12 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tn0pd-0001Fi-Q4; Tue, 25 Feb 2025 14:43:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=CQURYmf5F8dnnmognn0FLxizxlJvbWGUbUa7u+G2N4k=; b=HtgkOeqpDIoVPmz+hLa2 T1wMFEpip0LHWigftsBIGmr/Nwik57SPqpP51ZasDYOzmcHkXPqBlx4h92VkbG2hir6N/GvrJ2woR R2+6Fi152IUfIERYui0x7XzvOWNW1Wn5TNCKziqEDi1rSpOYPdYD6HSLQZSpY7JSlB3+fWcLiCOlI nS5RsU4ZIHnykll3ijtWKbW8XBZ+O8pqvfO2Lr1YTcuPRA/sCWYqSp9IBjtgh8YwQHKV4UdzG7jT7 8ZVtN5br1l1/DtJ9EwUPrTX47T26IXjbpwOTHU/0lAJK/ZFGMG/joPeCgoz1+GwtWlGQ0t1huML3Z IJ8PXNDIb3hBxQ==; Date: Tue, 25 Feb 2025 21:42:38 +0200 Message-Id: <86ikoxx13l.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?Jo=C3=A3o?= Guerra In-Reply-To: (message from =?utf-8?Q?Jo=C3=A3o?= Guerra on Tue, 25 Feb 2025 19:12:37 +0100) Subject: Re: bug#76561: [PATCH] Promote desktop-dirname to a defcustom References: <86ldttx5w8.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76561 Cc: 76561@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Guerra > Date: Tue, 25 Feb 2025 19:12:37 +0100 > Cc: 76561@debbugs.gnu.org > > Hello, the idea is to allow the user to customize where the desktop > file is saved by default. Currently, the user can only customize the > name for the file, its lock, and the directories where to search for > desktop files for loading. That's not true: if you invoke "M-x desktop-save", it will prompt you for the directory in which to save, and will record that directory in the desktop-dirname variable for future saves. This is one way users have today to customize where the desktop is saved. > Note that desktop-dirname appears in the documentation of other > options, which can lead to the idea that it can be customized. For > example: > > ``` > (defcustom desktop-save 'ask-if-new > "Specifies whether the desktop should be saved when it is killed. > ... > The variables `desktop-dirname' and `desktop-base-file-name' > determine where the desktop is saved." > ``` Yes, because various commands, like desktop-save, desktop-read, desktop-change-dir, and others, set the variable. > > If users customize desktop-dirname to some value, and desktop.el will be forced to use this value unconditionally (as it should do with user options), then this feature will be lost. > > Since the user can only have one desktop active at a time, it > shouldn't be problematic but I now understand that's not ideal. In > that case, what about introducing a new option that feeds the > variable? Unless there are already other alternatives. See above: there are already other alternatives. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 25 15:04:28 2025 Received: (at 76561) by debbugs.gnu.org; 25 Feb 2025 20:04:28 +0000 Received: from localhost ([127.0.0.1]:48608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tn1AK-0007V4-5L for submit@debbugs.gnu.org; Tue, 25 Feb 2025 15:04:28 -0500 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]:58483) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tn1AG-0007Uk-GD for 76561@debbugs.gnu.org; Tue, 25 Feb 2025 15:04:25 -0500 Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-854a682d2b6so451001639f.0 for <76561@debbugs.gnu.org>; Tue, 25 Feb 2025 12:04:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740513858; x=1741118658; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=X0zPCJOrmzKiijHGL6PGVH7OvOW2Af12cTyfGZ92LKo=; b=YOSqUjoaMblL4rkwCNZbnqn6Rt6BfMCBr5WlHHbJDe6DpRZKtkC9zKYIrn2ld12G1I +seRKPbegnX502ml7fTH84zpBy4U6a6krnU0AeUZ69r59TXw4MOPJ2nXILmLkngLeyxr hdtb29IQrTyvESlPl1P1DvMYI/fldykjSuUqJcLaqxXJ5RbqXRHE1rUenI6PdmJqdKQe DmcFQP2nbohorUA5mghu9pmBAVoklje399Hn9Bpcp6qM1wLd0en/NezN/f8RAd5olHVn SSRYhmb3mC/ZAItq2Xzc1oooFjK0izZ/4hMOae+OD9wED7t6p3/YQyZMrOuqxq7odYKS vZWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740513858; x=1741118658; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X0zPCJOrmzKiijHGL6PGVH7OvOW2Af12cTyfGZ92LKo=; b=IsvU0wMfSuxOF8KwSO2t9R+O4d1XpBwkEULnWFikfy6BothBhYIVUrfm76zg4eHe3P T1iCo/LLhPkGQTfMhuc/3S7WTEzGZaHzBBQuFH6RcNNJ9JDB4hqL0061uNeNt2GRTimg dAaS7LIBqPk4uygCMWknxhG5Zj1ecDlCw2JCmveEklw8puZUbhkV4utMsas7zawsZzK/ uVnAKKUpId36mwUd0TtwIsDGXvsXhwlxuBRF0ceg6cEcrvMc0Sjedal0s1IjGkmP9mSj 1or9XJjmvu3oZYxie04Owh65gB1V2vhwBVoKbE11JK/8FuIOVBZKHu3bDXkswI/CuGbm ESMA== X-Gm-Message-State: AOJu0YxGPNJkVYsMSyyKGYtu4eakyYlrug1eNxtmmMDrfQyqBmXxdgQg 0ss5A2TjS4B+Gri7nGYNOLvfzVI74TN3wLWryfgxbypX8WUJ20XgMnb6YmrSUKgyWwuq4Q422Mt 9AzQlPy4Cv78DPh5m5BlUQ6014/GknAQv X-Gm-Gg: ASbGncvO7VgiZg/Xvc4fLFf4rM4oNTAFdl5g5dRVJTYv3yoZfSxnHfDF6q8VlTojtzz O94xJjr5G5/6rJKd8cvWSJuJWaYuQTYq1Kk15lPsuy4Eq8wopcNKXCAqlUuy+cM3WsIoIfkaF87 W5IRF7vg== X-Google-Smtp-Source: AGHT+IF+wEbAKSJ+7BHJsuLG8hejnAvrTfn5GLq7NYIaAm1eymycGxUmhe3MsanYUKLlbBrymNuE30fsDq60iEwDDIU= X-Received: by 2002:a05:6602:1644:b0:855:6044:3138 with SMTP id ca18e2360f4ac-857c1807163mr70247539f.10.1740513858526; Tue, 25 Feb 2025 12:04:18 -0800 (PST) MIME-Version: 1.0 References: <86ldttx5w8.fsf@gnu.org> <86ikoxx13l.fsf@gnu.org> In-Reply-To: <86ikoxx13l.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gR3VlcnJh?= Date: Tue, 25 Feb 2025 21:03:42 +0100 X-Gm-Features: AWEUYZndgc032UraB0tMKGTuJ2jna_C9TCvYA0Wa1sgHm1phZ2-NLiRceXSQ0SE Message-ID: Subject: Re: bug#76561: [PATCH] Promote desktop-dirname to a defcustom To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76561 Cc: 76561@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Eli, I was just testing it out again and overriding desktop-path is enough for the behaviour I was looking for. No need to manually run desktop-save or anything (which I wanted to avoid on the first run). I'm flabbergasted. I'm not sure why I was always overriding it. I've also seen similar configurations doing the same (e.g. no-littering). It seems as desktop-read sets desktop-dirname even if a file is not actually read due to not existing. Thanks! On Tue, 25 Feb 2025 at 20:43, Eli Zaretskii wrote: > > > From: Jo=C3=A3o Guerra > > Date: Tue, 25 Feb 2025 19:12:37 +0100 > > Cc: 76561@debbugs.gnu.org > > > > Hello, the idea is to allow the user to customize where the desktop > > file is saved by default. Currently, the user can only customize the > > name for the file, its lock, and the directories where to search for > > desktop files for loading. > > That's not true: if you invoke "M-x desktop-save", it will prompt you > for the directory in which to save, and will record that directory in > the desktop-dirname variable for future saves. This is one way users > have today to customize where the desktop is saved. > > > Note that desktop-dirname appears in the documentation of other > > options, which can lead to the idea that it can be customized. For > > example: > > > > ``` > > (defcustom desktop-save 'ask-if-new > > "Specifies whether the desktop should be saved when it is killed. > > ... > > The variables `desktop-dirname' and `desktop-base-file-name' > > determine where the desktop is saved." > > ``` > > Yes, because various commands, like desktop-save, desktop-read, > desktop-change-dir, and others, set the variable. > > > > If users customize desktop-dirname to some value, and desktop.el will= be forced to use this value unconditionally (as it should do with user opt= ions), then this feature will be lost. > > > > Since the user can only have one desktop active at a time, it > > shouldn't be problematic but I now understand that's not ideal. In > > that case, what about introducing a new option that feeds the > > variable? Unless there are already other alternatives. > > See above: there are already other alternatives. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 25 18:12:58 2025 Received: (at 76561-done) by debbugs.gnu.org; 25 Feb 2025 23:12:58 +0000 Received: from localhost ([127.0.0.1]:48955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tn46j-0000D2-Ny for submit@debbugs.gnu.org; Tue, 25 Feb 2025 18:12:57 -0500 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:50253) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tn46g-0000Cj-KV for 76561-done@debbugs.gnu.org; Tue, 25 Feb 2025 18:12:55 -0500 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5e04064af07so9771190a12.0 for <76561-done@debbugs.gnu.org>; Tue, 25 Feb 2025 15:12:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740525168; x=1741129968; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=YgaA+x1QnCL6TK+72XkvBp2qbXK+xgrbJVCffU0iQQU=; b=HT1Y9sUsczIQ967lpFepzwHvd8Q6XdE8uGjtqGyp+j1G559y+h4c9BwgWoQ6zMEXuA tUsLXrGtlfZQrhJDcdxYbEWVT1+koYE64jN5vZwSC3zAcdD6F/rhp2YiPypkC3jdhFx/ 2PJIAwd19hTzGRn/MohFsC2vWsUUVaB2YI8FhFVE/MrDQqwpgP8utgTuAOxTMQCcQpHU 0cI3dk3HMZC9D0T0g5K1YEWD5g/u0VIba8KeDVwpYFVXHpbwLiey9C5JvdJ9BpiU6uLI IR7ygKkwZPknApg+OevvbxBAzFCe9WMYUWi+T2Brdcc23omRNM7sswbqFSMuO4oJALBP KV+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740525168; x=1741129968; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=YgaA+x1QnCL6TK+72XkvBp2qbXK+xgrbJVCffU0iQQU=; b=GW8hcgSGGnHRps+hmL71AmQTTJ8O36usiRe92v7wK9bCH39X5n7758wqhm35uiRxUB PuM5AVwZPU0nGRvvoJKj44gTSFv+GL5/rqzYWCPPWWGb4lETLN26DksQWU71tCDOFF81 skNO/lcc2UMRZnrrlAAfe3tdHsRH3GmUfbGlGYxBdFZiUOt8tqXKljH56QmCggbSOhfH AKAqrtvzvTkGwctXM9u3h9WMOSDzwuoB/RwUiOF66MN0Gc/WB5V3GX07eUvkAXLQyFlG YDcyKEIbJQInR6FyReEx52gGhvuxwv5/rrUcqEhIclCZm6mBYie9K8deTqwV9OTxAruR bkyA== X-Gm-Message-State: AOJu0Yz65OFl5tN8lWN5wrDbGwGl2VvYN31WJzVgjW/UYvNGJrfJmPs+ huy9PYTPZ5IcSCumbWEMMK9FvtseIMAPHvitMooEtKfqf8Hi+1lQXrAAfuilbr+ZFNyn+S0T3k5 z9qGnfX0eaAPvqMPhYeI4U7ArvSZ8wuIC36s= X-Gm-Gg: ASbGncvoiHjjOMh5b1kvGr8S9NU81v97NiCnAi5fWsWZJYlCd6cPsKrVTh6RWy37q5y bH/S1WtmrBE5hlMFaTsH74rpuvCUZogpUUX1gDl9U4F1jBr2+DTarKnsRmBBLH5ALx4x2DK+eRt a3RQ+PG9I= X-Google-Smtp-Source: AGHT+IGRrxz/79DX+muCpz3ZSdRLeFL8XYE3FgNc2vj3kkHT7TyD16Aj/f5WaMlF43yzqxKXNM6aNNciucYPiywZURo= X-Received: by 2002:a05:6402:440b:b0:5de:aa54:dc30 with SMTP id 4fb4d7f45d1cf-5e444481387mr5560397a12.5.1740525167854; Tue, 25 Feb 2025 15:12:47 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 25 Feb 2025 23:12:47 +0000 From: Stefan Kangas In-Reply-To: References: <86ldttx5w8.fsf@gnu.org> <86ikoxx13l.fsf@gnu.org> MIME-Version: 1.0 Date: Tue, 25 Feb 2025 23:12:47 +0000 X-Gm-Features: AQ5f1Jo1SEp3_VPTZdajYqARcp_M6rSJDReYMP7U5ceff0S9-n1T0C2tRX5wu6c Message-ID: Subject: Re: bug#76561: [PATCH] Promote desktop-dirname to a defcustom To: =?UTF-8?B?Sm/Do28gR3VlcnJh?= , Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76561-done Cc: 76561-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jo=C3=A3o Guerra writes: > Hi Eli, I was just testing it out again and overriding desktop-path is > enough for the behaviour I was looking for. No need to manually run > desktop-save or anything (which I wanted to avoid on the first run). > I'm flabbergasted. I'm not sure why I was always overriding it. I've > also seen similar configurations doing the same (e.g. no-littering). We also have `desktop-path`. Mine is set to '("~/.emacs.d/cache" "~/.emacs.d/" "~") and it seems to always DTRT, i.e. save the desktop file to ~/.emacs.d/cache/ It seems like there was no bug here, so I'm closing this now. If this conclusion is incorrect and this is still an issue, please reply to this email (use "Reply to all" in your email client) and we can reopen the bug report. From unknown Sun Jun 15 08:47:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 26 Mar 2025 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator