8000 Update to JLine 2.14.6 for better Emacs integration by hvesalai · Pull Request #6478 · scala/scala · GitHub
[go: up one dir, main page]

Skip to content

Update to JLine 2.14.6 for better Emacs integration #6478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 3, 2018

Conversation

hvesalai
Copy link
Contributor
@hvesalai hvesalai commented Mar 28, 2018

This version of Jline fixes three things for Emacs, which means all
the special handling of emacs can be removed from scala-code.

The things fixed in Jline 2.14.6 are:

  • ANSI colors are now enabled for Emacs.
  • Terminal echo is now disabled for Emacs.
  • History is enabled for all dump terminals.

This PR should be cherry-picked or merged also to the 2.11 and 2.13 branches.

@scala-jenkins scala-jenkins added this to the 2.12.7 milestone Mar 28, 2018
@hvesalai
Copy link
Contributor Author

ping @fommil

This version of Jline fixes three things for Emacs, which means all
the special handling of emacs can be removed from scala-code.

The things fixed in Jline 2.14.6 are:
- ANSI colors are now enabled for Emacs.
- Terminal echo is now disabled for Emacs.
- History is enabled for all dump terminals.
@hvesalai hvesalai force-pushed the tmp/update-jline-fix-emacs branch from 7e167cc to 3e597e7 Compare March 28, 2018 14:21
@SethTisue SethTisue modified the milestones: 2.12.7, 2.12.6 Mar 28, 2018
@SethTisue
Copy link
Member

assignment to 2.12.6 milestone is tentative, we need to consider whether it's sufficiently safe

@fommil
Copy link
Contributor
fommil commented Mar 28, 2018

the only thing I could imagine that this might impact is ammonite... could somebody maybe manually check it against this build?

@hvesalai
Copy link
Contributor Author

The changes between jline-2.14.5 and jline-2.14.6 are really small and can be summarized as:

  • changes that affect jline terminal selection when the environment variable INSIDE_EMACS is set
  • a new constructor to UnsupportedTerminal (old default constructor intact)
  • storing of input history: it is stored also for dumb terminals
  • a new constructor to FileHistory (old constructors intact)

Two of the changes change public interfaces of classes, but only by adding new constructors. To my knowledge that will not break anything, except some very twisted reflective thing that is expecting only one constructor.

Copy link
Contributor
@adriaanm adriaanm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! With one small change, I'm happy to include this in 2.12.6.

@@ -28,9 +28,6 @@ object Properties extends scala.util.PropertiesTrait {
// a newline so as not to break the user's terminal)
def shellInterruptedString = scalaPropOrElse("shell.interrupted", f":quit$lineSeparator")

// derived values
def isEmacsShell = propOrEmpty("env.emacs") != ""
Copy link
8000
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be used elsewhere. Juuuuust to be remain on the safe side, let's deprecate instead of removing.

@hvesalai
Copy link
Contributor Author
hvesalai commented Apr 3, 2018

Added the review request as a separate commit, can be squash merged.

Copy link
Contributor
@adriaanm adriaanm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SethTisue SethTisue merged commit 84112e8 into scala:2.12.x Apr 3, 2018
@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Apr 3, 2018
@SethTisue SethTisue changed the title Update to Jline 2.14.6 Update to Jline 2.14.6 for better Emacs integration Apr 26, 2018
@SethTisue SethTisue changed the title Update to Jline 2.14.6 for better Emacs integration Update to JLine 2.14.6 for better Emacs integration Apr 27, 2018
@hvesalai hvesalai deleted the tmp/update-jline-fix-emacs branch September 7, 2018 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes worth highlighting in next release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0