unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Trent W. Buck" <trentbuck@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 58137-done@debbugs.gnu.org
Subject: bug#58137: 28.1; M-x setenv RET PATH RET should default to the current $PATH
Date: Thu, 29 Sep 2022 13:26:44 +1000	[thread overview]
Message-ID: <YzUQdGNPIyAJQvAc@hera.lan> (raw)
In-Reply-To: <87leq3ycn1.fsf@gnus.org>

On Wed 28 Sep 2022 13:14:10 +0200, Lars Ingebrigtsen wrote:
> "Trent W. Buck" <trentbuck@gmail.com> writes:
> 
> > I wish M-x setenv, when setting a variable that already has a value,
> > defaulted to that value (instead of the empty string).
> >
> > This would make it easier to make minor adjustments to a long messy value.
> > The history is already there (M-p), but it's input history.
> > If the variable was initially set outside of Emacs, it won't be in history.
> 
> M-x setenv RET PATH RET M-n
> 
> will bring you the current value from the "future history".  This is how
> most prompting commands in Emacs work.

I confirm that this works -- thanks.

I can't believe I never discovered this before!
If I had known about this 20 years ago I might not have bothered with ido :-P





  reply	other threads:[~2022-09-29  3:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28  9:56 bug#58137: 28.1; M-x setenv RET PATH RET should default to the current $PATH Trent W. Buck
2022-09-28 11:14 ` Lars Ingebrigtsen
2022-09-29  3:26   ` Trent W. Buck [this message]
2022-09-28 12:42 ` Gregory Heytings
2022-09-28 12:45 ` Andreas Schwab
2022-09-28 13:09 ` Robert Pluim
2022-09-28 14:28   ` Gregory Heytings
2022-09-28 14:56     ` Robert Pluim
2022-09-28 13:35 ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YzUQdGNPIyAJQvAc@hera.lan \
    --to=trentbuck@gmail.com \
    --cc=58137-done@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).