all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* EMACS=t Joy and Happiness
@ 2018-05-24 20:46 Phillip Lord
  2018-05-24 20:52 ` Stefan Monnier
                   ` (7 more replies)
  0 siblings, 8 replies; 57+ messages in thread
From: Phillip Lord @ 2018-05-24 20:46 UTC (permalink / raw)
  To: Emacs-Devel devel; +Cc: 20202, Paul Eggert, Stefan Monnier, 20484



Well, it hardly seems like Mon, 11 Apr 2016 since last we discussed this
issue.

If you remember, we managed to blitz, EMACS=t everywhere, then Paul
restored it in term.el because it broke bash otherwise. master currently
looks like this:

  ;; This is for backwards compatibility with Bash 4.3 and earlier.
  ;; Remove this hack once Bash 4.4-or-later is common, because
  ;; it breaks './configure' of some packages that expect it to
  ;; say where to find EMACS.
  (format "EMACS=%s (term:%s)" emacs-version term-protocol-version)

I worry that "Bash 4.4 or later is common" is rather indeterminate; my
desktop is now 4.4.19. but another machine I am using has bash
4.2.46. Given that Emacs-26 is now destined to come out with
EMACS=26.1.0, I would like to propose that we now remove this on master,
i.e. make it happen for Emacs-27 which should be in about 2020.

Phil







^ permalink raw reply	[flat|nested] 57+ messages in thread
* bug#20202: 24.3; Comint mode sets a bad $EMACS
@ 2015-03-25 21:44 Eli Barzilay
  2018-05-24 20:46 ` bug#20202: EMACS=t Joy and Happiness Phillip Lord
  0 siblings, 1 reply; 57+ messages in thread
From: Eli Barzilay @ 2015-03-25 21:44 UTC (permalink / raw)
  To: 20202

I was surprised to see that compiling some random Emacs code via a
Makefile fails when running inside Emacs with an obscure

  /bin/sh: t: command not found

I found this setting in comint.el:

	  (unless (getenv "EMACS")
	    (list "EMACS=t"))

And that would obviously break such Makefile uses (and IIUC, $EMACS is
a popular choice for specifying which emacs binary to use).

It looks like this was done in this commit:

  commit cfefbbf4404963cdf042fb794e0456503aa8b591
  Author: Chong Yidong <cyd@stupidchicken.com>
  Date:   2006-11-18 21:01:33 +0000

    (comint-exec-1): Set EMACS and INSIDE_EMACS to t.

Before this commit, EMACS was set with

    (concat "EMACS=" invocation-directory invocation-name)

which doesn't look like a good idea either (if you happen to use some
other Emacs version, you still expect the shell to be a plain shell),
but it at least didn't break it.  But this change was done shortly
after:

  commit 4b1aaa8b07cf2797b5a57e2a1fd88f3ec0aa41e2
  Author: Paul Eggert <eggert@twinsun.com>
  Date:   2006-09-12 16:43:25 +0000

    * etc/NEWS: In terminal-oriented subshells, the EMACS environment
    variable now defaults to Emacs's absolute file name, instead of
    to "t".

and before that (all the way to the initial comint version in git), it
was always "t".  It looks like this was intended as a way to tell if
you're running inside emacs, which was superseded by $INSIDE_EMACS --
misc.texi says

  (It also sets the @env{EMACS} environment variable to @code{t}, if
  that environment variable is not already defined.  However, this
  environment variable is deprecated; programs that use it should
  switch to using @env{INSIDE_EMACS} instead.)

and the changelog dates this to the same date as the first commit
above.

So, since it has been deprecated for almost 8 years, it looks fine to
remove it.  If not, then setting it back to the running Emacs would
work too, but better to not do such an unexpected change, so something
like "EMACS=emacs" is probably going to be unobtrusive.

Or if there's some motivation behind intentionally making it some
string that is not an executable, then "EMACS=some-descriptive-text"
would be better.


As a sidenote, misc/efaq.texi uses $EMACS still.  (But for tcsh, so
not that anyone should care...)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!





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

end of thread, other threads:[~2018-06-14 20:54 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-24 20:46 EMACS=t Joy and Happiness Phillip Lord
2018-05-24 20:52 ` Stefan Monnier
2018-05-24 20:52 ` bug#20202: " Stefan Monnier
2018-05-24 22:03 ` Paul Eggert
2018-05-24 22:03 ` bug#20484: " Paul Eggert
2018-05-24 22:03 ` Paul Eggert
2018-05-25  2:25   ` bug#20202: " Van L
2018-05-25  6:11     ` bug#20484: " Ricardo Wurmus
2018-05-25  6:11     ` bug#20202: " Ricardo Wurmus
2018-05-25  6:11     ` Ricardo Wurmus
2018-05-25  7:12       ` Van L
2018-05-25 17:59     ` Paul Eggert
2018-05-26  0:17       ` Van L
2018-05-26  7:41         ` Eli Zaretskii
2018-05-26 10:07           ` Van L
2018-05-26 10:57             ` Eli Zaretskii
2018-05-26  0:43       ` Van L
2018-05-25 17:59     ` bug#20484: " Paul Eggert
2018-05-25 17:59     ` bug#20202: " Paul Eggert
2018-05-25  6:16   ` bug#20484: " Eli Zaretskii
2018-05-25  6:16   ` bug#20202: " Eli Zaretskii
2018-05-25  6:16   ` Eli Zaretskii
2018-05-25  7:28     ` Van L
2018-05-25  8:02       ` Eli Zaretskii
2018-05-26  0:01         ` Van L
2018-05-25  8:02       ` bug#20202: " Eli Zaretskii
2018-05-25  8:02       ` bug#20484: " Eli Zaretskii
2018-05-25  7:28     ` Van L
2018-05-25  7:28     ` bug#20202: " Van L
2018-05-25 17:50     ` Paul Eggert
2018-05-25 22:34   ` bug#20484: " Phillip Lord
2018-05-25 20:36 ` bug#20202: " Paul Eggert
2018-05-25 20:36 ` bug#20484: " Paul Eggert
2018-05-25 20:36 ` Paul Eggert
2018-05-25 22:49   ` bug#20202: " Phillip Lord
2018-05-26  7:20   ` bug#20484: " Eli Zaretskii
2018-05-26 20:54     ` bug#20202: " Paul Eggert
2018-05-26 20:54     ` Paul Eggert
2018-05-31 21:07       ` bug#20202: " Phillip Lord
2018-05-31 23:45         ` Paul Eggert
2018-05-31 23:45         ` Paul Eggert
2018-06-01  1:56           ` Stefan Monnier
2018-06-01  1:56           ` bug#20484: " Stefan Monnier
2018-06-01  1:56           ` bug#20202: " Stefan Monnier
2018-06-01  7:04           ` Eli Zaretskii
2018-06-01  7:04           ` bug#20484: " Eli Zaretskii
2018-06-01  7:04           ` Eli Zaretskii
2018-06-01 14:08             ` bug#20484: " Paul Eggert
2018-06-01 14:08             ` bug#20202: " Paul Eggert
2018-06-01 14:08             ` Paul Eggert
2018-06-01 14:14               ` bug#20484: " Eli Zaretskii
2018-06-14 20:54                 ` Paul Eggert
2018-06-14 20:54                 ` bug#20202: " Paul Eggert
2018-06-14 20:54                 ` bug#20484: " Paul Eggert
2018-05-31 23:45         ` Paul Eggert
2018-05-26 20:54     ` Paul Eggert
  -- strict thread matches above, loose matches on Subject: below --
2015-03-25 21:44 bug#20202: 24.3; Comint mode sets a bad $EMACS Eli Barzilay
2018-05-24 20:46 ` bug#20202: EMACS=t Joy and Happiness Phillip Lord

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.