X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=mk9L QBLJYMCqJtBX5GbAf3iKeVY5a00IfN2VWCTctF/6XmZCkRz4BaKPvm+A0VzcBiHb XViAm1ejO5o8vwUlqrv13Z2uCRKR8TuxZ7IzrMY2/xXsGj+bF3rhI/vC+5rdfWD+ q/EuBZG6QcRrAEX90V+c6xLzmrK4nQiun6gjSB8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=mMmkSLNVnI i4lJk7AdmsRCNAho4=; b=GKe3QbdJUZS5u5Q92BHYKc7n9MvUL9pdAk9J5pnBT6 E6/IT2mwDe9FsC9sFbXQifrSsF8jRFkzDmkzZtPQbH0maDYRcH5fdBb849+XpdVX 1wsiLPuaJa0W7meCi6J5Fs8D1S3h2lzXc9mKk7/DrXldsPTGNckC+swuf8kJ7j2T c= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:D*cornell.edu, H*i:sk:56EBE7B, H*MI:sk:56EBE7B, H*f:sk:56EBE7B X-HELO: mail-wm0-f54.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=OeWKWcA98qNYnouxy9T3dZFmIPZ88corqrBNY+pJThY=; b=d6XSy5bXNklIGk5yIb6n//od+SAazN9YhqiV2bO8J7XnwfGaiLWdUzpBk6CFMXHOzo HpKlzuXpnHUrM+KRC8/vgaPvBMx/C/4jnAw8XXmzNSimemyG8ONo58WE2yvvPxq50rQu Pts5cr1RCxjha5KobrTAJZZkNowxa5nzLMcMTj7YPGnDaflwwM58sHwv/HI0dmO0CVCg 2ByAGsltl5HB1V30vTJnPyJlODUBmGLb9sG5hDmkOMYm+P2t4WA/PjNaLpBNaP/LCB9J mgjkhUfSod3IAuWaqWSW+TmE2Cr4e938ecDJrgWZJA6wH0mR+D2IPi5pKissuan7oUWD Dy1A== X-Gm-Message-State: AD7BkJKdAtQqL0IBEUV14eIhNWBmipzmD8oJdyblZis/4jS6/updAgTfzRZSuW0Ek+PAKA== X-Received: by 10.194.192.36 with SMTP id hd4mr14859170wjc.85.1458301496616; Fri, 18 Mar 2016 04:44:56 -0700 (PDT) Date: Fri, 18 Mar 2016 11:44:53 +0000 From: Adam Dinwoodie To: Ken Brown Cc: cygwin AT cygwin DOT com Subject: Re: Running texconfig breaks backspace in Bash/MinTTY Message-ID: <20160318114453.GA29016@dinwoodie.org> References: <20160316114546 DOT GO29016 AT dinwoodie DOT org> <56E952E5 DOT 2000205 AT cornell DOT edu> <20160316140012 DOT GP29016 AT dinwoodie DOT org> <56E9769B DOT 5050901 AT cornell DOT edu> <56E9DA19 DOT 4000700 AT towo DOT net> <56EA97AF DOT 8080703 AT cornell DOT edu> <56EBE7B4 DOT 2010600 AT cornell DOT edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56EBE7B4.2010600@cornell.edu> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes On Fri, Mar 18, 2016 at 07:34:12AM -0400, Ken Brown wrote: > On 3/17/2016 7:40 AM, Ken Brown wrote: > > On 3/16/2016 6:11 PM, Thomas Wolff wrote: > >> Am 16.03.2016 um 16:07 schrieb Ken Brown: > >>> On 3/16/2016 10:00 AM, Adam Dinwoodie wrote: > >>>> On Wed, Mar 16, 2016 at 08:34:45AM -0400, Ken Brown wrote: > >>>>> On 3/16/2016 7:45 AM, Adam Dinwoodie wrote: > >>>>>> Here's an interesting bug: normally in a Bash session in MinTTY, > >>>>>> backspace and Ctrl+H both delete the previous character, as expected. > >>>>>> However, after running texconfig and returning to the shell, both the > >>>>>> backspace key and Ctrl+H appear to just print "^H" to the terminal. > >>>>>> > >>>>>> It looks like this is genuinely the terminal trying to render a > >>>>>> backspace character, rather than just backspacing, given the > >>>>>> following: > >>>>>> > >>>>>> $ printf ^H | xxd > >>>>>> 00000000: 08 . > >>>>>> > >>>>>> (To get that, I typed "printf {backspace} | xxd".) > >>>>>> > >>>>>> It's not clear to me whether this is Bash, MinTTY or texconfig that's > >>>>>> misbehaving. Ctrl+W to delete a word, Ctrl+R to get (for me) fzf's > >>>>>> history search, and using the up and down arrows to navigate > >>>>>> history all > >>>>>> work. Running Vim, opening a new Bash shell from within the duff > >>>>>> one, > >>>>>> or SSHing to another box has Ctrl+H working just fine within that > >>>>>> process, but the bugged behaviour resumes when I return to the > >>>>>> original > >>>>>> Bash shell. > >>>>> > >>>>> I can't reproduce this on my system. I tried 'texconfig --help' and > >>>>> 'texconfig conf'. What's the precise texconfig command that you > >>>>> used? > >>>> > >>>> I'm just running `texconfig`, with no arguments. There's a warning > >>>> prompt, that you press Enter to clear, then there's an interactive menu > >>>> that appears -- I'm assuming it's something about that interactive menu > >>>> that's causing the problem. > >>> > >>> In the interactive case, texconfig calls texconfig-dialog, which calls > >>> dialog. > >>> > >>>> Turns out, after some digging, MinTTY's "Keys" > "Backspace sends ^H" > >>>> setting is critical here -- my .minttyrc has `BackspaceSendsBS=yes`, > >>>> but > >>>> if I remove that line and restart MinTTY, everything works fine. If I > >>>> add that setting to a fresh Cygwin install that contains only the Base > >>>> packages, texlive-collection-basic, and their dependencies, I can > >>>> reproduce the issue. > >>>> > >>>> That probably explains why you can't reproduce it, but it still seems > >>>> like a bug -- I wouldn't expect backspace behaviour to change in that > >>>> fashion regardless of that bit of configuration. > >>> > >>> So it appears to be a MinTTY/dialog issue. > >> Checking stty -a before and after texconfig reveals that texconfig > >> mangles the stty erase setting and does not restore it. > >> That is clearly a bug of texconfig. > > > > I'm not sure how you ruled out dialog as the culprit, but in fact you're > > right. texconfig-dialog calls 'reset' and 'stty sane' at various places, > > and that seems to be the problem. I'll report this upstream. > > I've done this in http://tug.org/pipermail/tex-live/2016-March/037852.html, where you can also see responses by two of the TeX Live developers. > > The best long-term solution is to get rid of the need for texconfig by making tlmgr work on Cygwin[*]. In the meantime, upstream TeX Live will consider patches that make texconfig stop messing with terminal settings. [If it turns out that dialog also messes with terminal settings, then we'll have to find a different workaround.] > > Here's one possibility: > > --- /usr/share/texmf-dist/scripts/texlive/texconfig-dialog.sh.orig 2015-10-08 16:04:18.000000000 -0400 > +++ /usr/share/texmf-dist/scripts/texlive/texconfig-dialog.sh 2016-03-18 07:26:50.708149300 -0400 > @@ -43,7 +43,7 @@ > rc=$1 > $needsCleanup && test -n "$tmpdir" && test -d "$tmpdir" \ > && { cd / && rm -rf "$tmpdir"; } > - termCtl reset > + termCtl clear > (exit $rc); exit $rc > } > > Adam, please give this a try and let me know if it solves the problem without creating new ones. > > Ken > > [*] tlmgr is currently incompatible with the Cygwin packaging of TeX Live. I'll look into fixing this for TeX Live 2016. I should be able to simply disable some features of tlmgr, while retaining those that replace the functionality of texconfig. Just tested it, and it fixes my problem and hasn't obviously broken anything else. Thank you! -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple