* bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete
@ 2025-01-03 3:23 Stefan Kangas
2025-01-03 5:56 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 14+ messages in thread
From: Stefan Kangas @ 2025-01-03 3:23 UTC (permalink / raw)
To: 75306; +Cc: Michael Albinus
[-- Attachment #1: Type: text/plain, Size: 830 bytes --]
Severity: wishlist
The variable `small-temporary-file-directory` was created in 2000 for
MS-DOS systems and systems with widely different specs than what we run
now. Putting temporary files on a RAM disk should be done by the system
administrator (usually the user themselves), for example by simply using
tmpfs for _all_ temporary files (not just "small" ones, whatever that
means).
I think the variable doesn't make much sense these days, and should be
made obsolete. Note that it is barely used in Emacs and third-party
packages.
However, Tramp recently started using the variable as a place to create
OpenSSH Unix domain sockets. May I suggest that Tramp uses some other
variable for this purpose, perhaps a Tramp specific one?
I've attached a diff that makes the variable obsolete and removes all
uses, for reference.
[-- Attachment #2: rmvar.diff --]
[-- Type: text/x-patch, Size: 5838 bytes --]
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 620d16ddf11..b8314bbac37 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -599,11 +599,9 @@ Backup
@vindex backup-enable-predicate
@vindex temporary-file-directory
-@vindex small-temporary-file-directory
The default value of the @code{backup-enable-predicate} variable
prevents backup files being written for files in the directories used
-for temporary files, specified by @code{temporary-file-directory} or
-@code{small-temporary-file-directory}.
+for temporary files, specified by @code{temporary-file-directory}.
You can explicitly tell Emacs to make another backup file from a
buffer, even though that buffer has been saved before. If you save
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 1064f347a12..645827de85e 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -2803,21 +2803,6 @@ Unique File Names
non-@code{nil}.
@end defopt
-@defopt small-temporary-file-directory
-This variable specifies the directory name for
-creating certain temporary files, which are likely to be small.
-
-If you want to write a temporary file which is likely to be small, you
-should compute the directory like this:
-
-@example
-(make-temp-file
- (expand-file-name @var{prefix}
- (or small-temporary-file-directory
- temporary-file-directory)))
-@end example
-@end defopt
-
@defun make-temp-name base-name
This function generates a string that might be a unique file
name. The name starts with @var{base-name}, and has several random
diff --git a/lisp/files.el b/lisp/files.el
index 72128ea4af2..98e66aac1ea 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -229,6 +229,8 @@ small-temporary-file-directory
:group 'files
:initialize #'custom-initialize-delay
:type '(choice (const nil) directory))
+(make-obsolete-variable 'small-temporary-file-directory
+ 'temporary-file-directory "31.1")
;; The system null device. (Should reference NULL_DEVICE from C.)
(defvar null-device (purecopy "/dev/null") "The system null device.")
@@ -5592,8 +5594,7 @@ backup-directory-alist
(defun normal-backup-enable-predicate (name)
"Default `backup-enable-predicate' function.
-Checks for files in `temporary-file-directory',
-`small-temporary-file-directory', and \"/tmp\"."
+Checks for files in `temporary-file-directory' and \"/tmp\"."
(let ((temporary-file-directory temporary-file-directory)
caseless)
;; On MS-Windows, file-truename will convert short 8+3 aliases to
@@ -5611,14 +5612,7 @@ normal-backup-enable-predicate
name 0 nil)))
;; Directory is under /tmp.
(and (not (eq comp t))
- (< comp (- (length "/tmp")))))
- (if small-temporary-file-directory
- (let ((comp (compare-strings small-temporary-file-directory
- 0 nil
- name 0 nil caseless)))
- ;; Directory is under small-temporary-file-directory.
- (and (not (eq comp t))
- (< comp (- (length small-temporary-file-directory))))))))))
+ (< comp (- (length "/tmp")))))))))
(defun make-backup-file-name (file)
"Create the non-numeric backup file name for FILE.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 823ff81cb56..8252169783c 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4940,8 +4940,7 @@ tramp-ssh-controlmaster-options
(expand-file-name
(if (tramp-ssh-option-exists-p vec "ControlPath=tramp.%C")
"tramp.%%C" "tramp.%%r@%%h:%%p")
- (or small-temporary-file-directory
- tramp-compat-temporary-file-directory))))
+ tramp-compat-temporary-file-directory)))
;; ControlPersist option is introduced in OpenSSH 5.6.
(when (and (not (eq tramp-use-connection-share 'suppress))
diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el
index 35ebf506dfb..eaee29b8649 100644
--- a/lisp/progmodes/cmacexp.el
+++ b/lisp/progmodes/cmacexp.el
@@ -275,8 +275,7 @@ c-macro-expansion
(exit-status 0)
(tempname (make-temp-file
(expand-file-name "cmacexp"
- (or small-temporary-file-directory
- temporary-file-directory)))))
+ temporary-file-directory))))
(unwind-protect
(save-excursion
(save-restriction
diff --git a/lisp/simple.el b/lisp/simple.el
index b0490bb36d4..741229c9d60 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4646,8 +4646,7 @@ shell-command
(and error-buffer
(make-temp-file
(expand-file-name "scor"
- (or small-temporary-file-directory
- temporary-file-directory))))))
+ temporary-file-directory)))))
(barf-if-buffer-read-only)
(push-mark nil t)
(shell-command-save-pos-or-erase 'output-to-current-buffer)
@@ -4968,8 +4967,7 @@ shell-command-on-region
(if error-buffer
(make-temp-file
(expand-file-name "scor"
- (or small-temporary-file-directory
- temporary-file-directory)))
+ temporary-file-directory))
nil))
exit-status)
;; Unless a single contiguous chunk is selected, operate on multiple chunks.
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index 07c7f37cbe5..cdeced20db9 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -886,8 +886,7 @@ vc-rcs-update-changelog
;; Presumably not portable to non-Unixy systems, along with rcs2log:
(tempfile (make-temp-file
(expand-file-name "vc"
- (or small-temporary-file-directory
- temporary-file-directory))))
+ temporary-file-directory)))
(login-name (or user-login-name
(format "uid%d" (number-to-string (user-uid)))))
(full-name (or add-log-full-name
^ permalink raw reply related [flat|nested] 14+ messages in thread
* bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete
2025-01-03 3:23 bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete Stefan Kangas
@ 2025-01-03 5:56 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-03 8:26 ` Stefan Kangas
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2025-01-03 5:56 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 75306
Stefan Kangas <stefankangas@gmail.com> writes:
Hi Stefan,
> I think the variable doesn't make much sense these days, and should be
> made obsolete. Note that it is barely used in Emacs and third-party
> packages.
>
> However, Tramp recently started using the variable as a place to create
> OpenSSH Unix domain sockets. May I suggest that Tramp uses some other
> variable for this purpose, perhaps a Tramp specific one?
Is there a reason that it must be changed? What are the advantages? Does
it hurt to keep the user option?
And in the Tramp case, you break an existing interface. Users have been
instructed to change the value of small-temporary-file-directory when
needed. See (info "(tramp) Frequently Asked Questions"), which documents
a user problem reported on the <tramp-devel@gnu.org> ML.
Best regards, Michael.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete
2025-01-03 5:56 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2025-01-03 8:26 ` Stefan Kangas
2025-01-03 8:49 ` Eli Zaretskii
2025-01-03 8:39 ` Eli Zaretskii
` (3 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Stefan Kangas @ 2025-01-03 8:26 UTC (permalink / raw)
To: Michael Albinus; +Cc: 75306
Michael Albinus <michael.albinus@gmx.de> writes:
> Stefan Kangas <stefankangas@gmail.com> writes:
>
> Hi Stefan,
>
>> I think the variable doesn't make much sense these days, and should be
>> made obsolete. Note that it is barely used in Emacs and third-party
>> packages.
>>
>> However, Tramp recently started using the variable as a place to create
>> OpenSSH Unix domain sockets. May I suggest that Tramp uses some other
>> variable for this purpose, perhaps a Tramp specific one?
>
> Is there a reason that it must be changed? What are the advantages? Does
> it hurt to keep the user option?
It doesn't hurt to keep it. The advantage is that we get rid of a
redundant variable.
> And in the Tramp case, you break an existing interface. Users have been
> instructed to change the value of small-temporary-file-directory when
> needed. See (info "(tramp) Frequently Asked Questions"), which documents
> a user problem reported on the <tramp-devel@gnu.org> ML.
Thanks. Would something like this work?
(define-obsolete-variable-alias 'small-temporary-file-directory
'temporary-file-directory "31.1")
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete
2025-01-03 5:56 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-03 8:26 ` Stefan Kangas
@ 2025-01-03 8:39 ` Eli Zaretskii
2025-01-03 9:15 ` Stefan Kangas
2025-01-04 9:54 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
` (2 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2025-01-03 8:39 UTC (permalink / raw)
To: Michael Albinus; +Cc: 75306, stefankangas
> Cc: 75306@debbugs.gnu.org
> Date: Fri, 03 Jan 2025 06:56:03 +0100
> From: Michael Albinus via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> Stefan Kangas <stefankangas@gmail.com> writes:
>
> Hi Stefan,
>
> > I think the variable doesn't make much sense these days, and should be
> > made obsolete. Note that it is barely used in Emacs and third-party
> > packages.
> >
> > However, Tramp recently started using the variable as a place to create
> > OpenSSH Unix domain sockets. May I suggest that Tramp uses some other
> > variable for this purpose, perhaps a Tramp specific one?
>
> Is there a reason that it must be changed? What are the advantages? Does
> it hurt to keep the user option?
Exactly my questions.
The doc string says:
If non-nil, this directory is used instead of ‘temporary-file-directory’
by programs that create small temporary files. This is for systems that
have fast storage with limited space, such as a RAM disk.
This says nothing about MS-DOS, and makes perfect sense to me. It
gives our users a capability to direct small enough temporary files to
a fast temporary filesystem. If the OS sets this up, then users will
not need to customize this variable, whose default is nil. But if
some user has a good reason to customize this, why take that
flexibility from them? How do we justify removal of a feature which
could be useful to someone? From my POV, this feature needs zero
maintenance.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete
2025-01-03 8:26 ` Stefan Kangas
@ 2025-01-03 8:49 ` Eli Zaretskii
0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2025-01-03 8:49 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 75306, michael.albinus
> Cc: 75306@debbugs.gnu.org
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Fri, 3 Jan 2025 02:26:29 -0600
>
> Thanks. Would something like this work?
>
> (define-obsolete-variable-alias 'small-temporary-file-directory
> 'temporary-file-directory "31.1")
I don't see a need to annoy users of this variable with obsolescence
messages. I don't think we should make this variable obsolete.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete
2025-01-03 8:39 ` Eli Zaretskii
@ 2025-01-03 9:15 ` Stefan Kangas
2025-01-03 11:46 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Stefan Kangas @ 2025-01-03 9:15 UTC (permalink / raw)
To: Eli Zaretskii, Michael Albinus; +Cc: 75306
Eli Zaretskii <eliz@gnu.org> writes:
>> Cc: 75306@debbugs.gnu.org
>> Date: Fri, 03 Jan 2025 06:56:03 +0100
>> From: Michael Albinus via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>>
>> Stefan Kangas <stefankangas@gmail.com> writes:
>>
>> Hi Stefan,
>>
>> > I think the variable doesn't make much sense these days, and should be
>> > made obsolete. Note that it is barely used in Emacs and third-party
>> > packages.
>> >
>> > However, Tramp recently started using the variable as a place to create
>> > OpenSSH Unix domain sockets. May I suggest that Tramp uses some other
>> > variable for this purpose, perhaps a Tramp specific one?
>>
>> Is there a reason that it must be changed? What are the advantages? Does
>> it hurt to keep the user option?
>
> Exactly my questions.
>
> The doc string says:
>
> If non-nil, this directory is used instead of ‘temporary-file-directory’
> by programs that create small temporary files. This is for systems that
> have fast storage with limited space, such as a RAM disk.
>
> This says nothing about MS-DOS,
The docstring is one thing, but the variable _definition_ reads the same
today as when it was first introduced (in ffc0e1caf1a6):
(defvar small-temporary-file-directory
(if (eq system-type 'ms-dos) (getenv "TMPDIR"))
This makes it clear that the intention was, at least in part, to support
MS-DOS specifically, and it has remained that over the years.
> and makes perfect sense to me. It gives our users a capability to
> direct small enough temporary files to a fast temporary filesystem ...
> From my POV, this feature needs zero maintenance.
This feature would need maintenance just like any other, but it hasn't
seen too much of that. If people had taken it seriously, we would have
seen it used it in many more places.
I doubt that this micro-optimization (or whatever we should call it) is
likely to give much bang for your buck, especially not in an age when
users are starting to routinely throw 500 MiB or even 1 GiB at their
tmpfs RAM disks. Not everyone, of course, but this has been the general
direction; even low end systems have at minimum an order of magnitude
more resources now than when this variable was introduced 24 years ago.
> But if some user has a good reason to customize this, why take that
> flexibility from them? How do we justify removal of a feature which
> could be useful to someone?
Besides the Tramp use case (which is valid and deserves its own
variable), it is used only in some very old modules: vc-rcs.el and
cmacexp.el, in shell-command-on-region, and literally nowhere else.
I suspect that it's removal wouldn't be noticed by anyone, even if we
were to assume that someone somewhere is getting slightly better
performance out of RCS/C macro expansions/Shell commands from using this.
I do agree that there's no compelling reason why we must remove _this
particular piece of cruft_ specifically, but I also don't see any good
reason to keep it.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete
2025-01-03 9:15 ` Stefan Kangas
@ 2025-01-03 11:46 ` Eli Zaretskii
0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2025-01-03 11:46 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 75306, michael.albinus
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Fri, 3 Jan 2025 03:15:49 -0600
> Cc: 75306@debbugs.gnu.org
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > This says nothing about MS-DOS,
>
> The docstring is one thing, but the variable _definition_ reads the same
> today as when it was first introduced (in ffc0e1caf1a6):
>
> (defvar small-temporary-file-directory
> (if (eq system-type 'ms-dos) (getenv "TMPDIR"))
>
> This makes it clear that the intention was, at least in part, to support
> MS-DOS specifically, and it has remained that over the years.
no, the _default_value_ caters to MS-DOS specifically. But that
doesn't yet mean the variable itself is for that system.
> I doubt that this micro-optimization (or whatever we should call it) is
> likely to give much bang for your buck, especially not in an age when
> users are starting to routinely throw 500 MiB or even 1 GiB at their
> tmpfs RAM disks.
Maybe so, but we had this variable for eons, and I can easily imagine
valid use cases for it even today. For example, some system whose
disks are of different speed (say, SSD and spinning disk).
> > But if some user has a good reason to customize this, why take that
> > flexibility from them? How do we justify removal of a feature which
> > could be useful to someone?
>
> Besides the Tramp use case (which is valid and deserves its own
> variable), it is used only in some very old modules: vc-rcs.el and
> cmacexp.el, in shell-command-on-region, and literally nowhere else.
Except by an unknown number of users. Why break their setup?
> I do agree that there's no compelling reason why we must remove _this
> particular piece of cruft_ specifically, but I also don't see any good
> reason to keep it.
We should only remove or obsolete existing features if we have a good
reason for that. A valid, and a very good, reason to keep a feature
is that we already have it.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete
2025-01-03 5:56 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-03 8:26 ` Stefan Kangas
2025-01-03 8:39 ` Eli Zaretskii
@ 2025-01-04 9:54 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-04 9:54 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <87ttaezyyp.fsf@>
4 siblings, 0 replies; 14+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2025-01-04 9:54 UTC (permalink / raw)
To: 75306; +Cc: michael.albinus, stefankangas
Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:
> Stefan Kangas <stefankangas@gmail.com> writes:
>
> Hi Stefan,
>
>> I think the variable doesn't make much sense these days, and should be
>> made obsolete. Note that it is barely used in Emacs and third-party
>> packages.
>>
>> However, Tramp recently started using the variable as a place to create
>> OpenSSH Unix domain sockets. May I suggest that Tramp uses some other
>> variable for this purpose, perhaps a Tramp specific one?
>
> Is there a reason that it must be changed? What are the advantages? Does
> it hurt to keep the user option?
>
> And in the Tramp case, you break an existing interface. Users have been
> instructed to change the value of small-temporary-file-directory when
> needed. See (info "(tramp) Frequently Asked Questions"), which documents
> a user problem reported on the <tramp-devel@gnu.org> ML.
If the intend of the variable is the same as listed in the Tramp FAQ why
not set it by default to /run/user/<uid>?
For such use cases using /run/user/<uid> is much better as it more
secure and on a ramdisk.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete
2025-01-03 5:56 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
` (2 preceding siblings ...)
2025-01-04 9:54 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2025-01-04 9:54 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <87ttaezyyp.fsf@>
4 siblings, 0 replies; 14+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2025-01-04 9:54 UTC (permalink / raw)
To: 75306; +Cc: michael.albinus, stefankangas
Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:
> Stefan Kangas <stefankangas@gmail.com> writes:
>
> Hi Stefan,
>
>> I think the variable doesn't make much sense these days, and should be
>> made obsolete. Note that it is barely used in Emacs and third-party
>> packages.
>>
>> However, Tramp recently started using the variable as a place to create
>> OpenSSH Unix domain sockets. May I suggest that Tramp uses some other
>> variable for this purpose, perhaps a Tramp specific one?
>
> Is there a reason that it must be changed? What are the advantages? Does
> it hurt to keep the user option?
>
> And in the Tramp case, you break an existing interface. Users have been
> instructed to change the value of small-temporary-file-directory when
> needed. See (info "(tramp) Frequently Asked Questions"), which documents
> a user problem reported on the <tramp-devel@gnu.org> ML.
If the intend of the variable is the same as listed in the Tramp FAQ why
not set it by default to /run/user/<uid>?
For such use cases using /run/user/<uid> is much better as it more
secure and on a ramdisk.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete
[not found] ` <87ttaezyyp.fsf@>
@ 2025-01-04 11:26 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-04 22:16 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2025-01-04 11:26 UTC (permalink / raw)
To: Björn Bidar; +Cc: 75306, stefankangas
Björn Bidar <bjorn.bidar@thaodan.de> writes:
Hi Björn,
>> And in the Tramp case, you break an existing interface. Users have been
>> instructed to change the value of small-temporary-file-directory when
>> needed. See (info "(tramp) Frequently Asked Questions"), which documents
>> a user problem reported on the <tramp-devel@gnu.org> ML.
>
> If the intend of the variable is the same as listed in the Tramp FAQ why
> not set it by default to /run/user/<uid>?
>
> For such use cases using /run/user/<uid> is much better as it more
> secure and on a ramdisk.
Because it isn't portable. The Tramp manual gives just an example.
Best regards, Michael.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete
2025-01-04 11:26 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2025-01-04 22:16 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-04 22:16 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
` (2 subsequent siblings)
3 siblings, 0 replies; 14+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2025-01-04 22:16 UTC (permalink / raw)
To: Michael Albinus; +Cc: 75306, stefankangas
Michael Albinus <michael.albinus@gmx.de> writes:
> Björn Bidar <bjorn.bidar@thaodan.de> writes:
>
> Hi Björn,
>
>>> And in the Tramp case, you break an existing interface. Users have been
>>> instructed to change the value of small-temporary-file-directory when
>>> needed. See (info "(tramp) Frequently Asked Questions"), which documents
>>> a user problem reported on the <tramp-devel@gnu.org> ML.
>>
>> If the intend of the variable is the same as listed in the Tramp FAQ why
>> not set it by default to /run/user/<uid>?
>>
>> For such use cases using /run/user/<uid> is much better as it more
>> secure and on a ramdisk.
>
> Because it isn't portable. The Tramp manual gives just an example.
Portable across Unixes or Linux? For Linux /run/user is portable.
/var/run, which is symlinked to /run exists in BSD but not
/var/run/user.
However XDG_CACHE_HOME is already used in Tramp so using XDG_RUNTIME_DIR
should be a natural followup.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete
2025-01-04 11:26 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-04 22:16 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2025-01-04 22:16 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <6779b38c.050a0220.be2ea.a6e0SMTPIN_ADDED_BROKEN@mx.google.com>
[not found] ` <8734hyw7g4.fsf@>
3 siblings, 0 replies; 14+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2025-01-04 22:16 UTC (permalink / raw)
To: Michael Albinus; +Cc: 75306, stefankangas
Michael Albinus <michael.albinus@gmx.de> writes:
> Björn Bidar <bjorn.bidar@thaodan.de> writes:
>
> Hi Björn,
>
>>> And in the Tramp case, you break an existing interface. Users have been
>>> instructed to change the value of small-temporary-file-directory when
>>> needed. See (info "(tramp) Frequently Asked Questions"), which documents
>>> a user problem reported on the <tramp-devel@gnu.org> ML.
>>
>> If the intend of the variable is the same as listed in the Tramp FAQ why
>> not set it by default to /run/user/<uid>?
>>
>> For such use cases using /run/user/<uid> is much better as it more
>> secure and on a ramdisk.
>
> Because it isn't portable. The Tramp manual gives just an example.
Portable across Unixes or Linux? For Linux /run/user is portable.
/var/run, which is symlinked to /run exists in BSD but not
/var/run/user.
However XDG_CACHE_HOME is already used in Tramp so using XDG_RUNTIME_DIR
should be a natural followup.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete
[not found] ` <6779b38c.050a0220.be2ea.a6e0SMTPIN_ADDED_BROKEN@mx.google.com>
@ 2025-01-05 5:30 ` Stefan Kangas
0 siblings, 0 replies; 14+ messages in thread
From: Stefan Kangas @ 2025-01-05 5:30 UTC (permalink / raw)
To: Björn Bidar, Michael Albinus; +Cc: 75306
Björn Bidar via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@gnu.org> writes:
> Michael Albinus <michael.albinus@gmx.de> writes:
>
>> Björn Bidar <bjorn.bidar@thaodan.de> writes:
>>
>> Hi Björn,
>>
>>>> And in the Tramp case, you break an existing interface. Users have been
>>>> instructed to change the value of small-temporary-file-directory when
>>>> needed. See (info "(tramp) Frequently Asked Questions"), which documents
>>>> a user problem reported on the <tramp-devel@gnu.org> ML.
>>>
>>> If the intend of the variable is the same as listed in the Tramp FAQ why
>>> not set it by default to /run/user/<uid>?
>>>
>>> For such use cases using /run/user/<uid> is much better as it more
>>> secure and on a ramdisk.
>>
>> Because it isn't portable. The Tramp manual gives just an example.
>
> Portable across Unixes or Linux?
Portable across all systems that we support, see etc/MACHINES.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete
[not found] ` <8734hyw7g4.fsf@>
@ 2025-01-05 8:18 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 14+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2025-01-05 8:18 UTC (permalink / raw)
To: Björn Bidar; +Cc: 75306, stefankangas
Björn Bidar <bjorn.bidar@thaodan.de> writes:
Hi Björn,
> However XDG_CACHE_HOME is already used in Tramp so using XDG_RUNTIME_DIR
> should be a natural followup.
It is used only if it exists. And it isn't offered as user option, just
used internally.
Best regards, Michael.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-01-05 8:18 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-03 3:23 bug#75306: 31.0.50; Make `small-temporary-file-directory` variable obsolete Stefan Kangas
2025-01-03 5:56 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-03 8:26 ` Stefan Kangas
2025-01-03 8:49 ` Eli Zaretskii
2025-01-03 8:39 ` Eli Zaretskii
2025-01-03 9:15 ` Stefan Kangas
2025-01-03 11:46 ` Eli Zaretskii
2025-01-04 9:54 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-04 9:54 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <87ttaezyyp.fsf@>
2025-01-04 11:26 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-04 22:16 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-04 22:16 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <6779b38c.050a0220.be2ea.a6e0SMTPIN_ADDED_BROKEN@mx.google.com>
2025-01-05 5:30 ` Stefan Kangas
[not found] ` <8734hyw7g4.fsf@>
2025-01-05 8:18 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).