From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#18380: 24.3.93; sh-script multiline quoted subshell wreaks havoc with indentation Date: Mon, 30 Sep 2019 04:54:33 +0200 Message-ID: References: <877g1n1kjf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="203565"; mail-complaints-to="usenet@blaine.gmane.org" Cc: occitan@esperanto.org, Carlos Pita , 18380-done@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 30 04:55:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iElqB-000qmw-AD for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Sep 2019 04:55:11 +0200 Original-Received: from localhost ([::1]:43336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iElq9-0000Qn-FH for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2019 22:55:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38285) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iElq3-0000QN-P8 for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 22:55:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iElq2-0008By-Lx for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 22:55:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47593) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iElq2-0008Bp-IB for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 22:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iElq2-0007Jz-FI for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 22:55:02 -0400 In-Reply-To: <877g1n1kjf.fsf@gmail.com> Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Sep 2019 02:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 18380 X-GNU-PR-Package: emacs Mail-Followup-To: 18380@debbugs.gnu.org, stefan@marxist.se, carlosjosepita@gmail.com Original-Received: via spool by 18380-done@debbugs.gnu.org id=D18380.156981209228112 (code D ref 18380); Mon, 30 Sep 2019 02:55:01 +0000 Original-Received: (at 18380-done) by debbugs.gnu.org; 30 Sep 2019 02:54:52 +0000 Original-Received: from localhost ([127.0.0.1]:56412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iElps-0007JL-Ax for submit@debbugs.gnu.org; Sun, 29 Sep 2019 22:54:52 -0400 Original-Received: from mail-pl1-f182.google.com ([209.85.214.182]:42899) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iElpq-0007Iy-CT for 18380-done@debbugs.gnu.org; Sun, 29 Sep 2019 22:54:50 -0400 Original-Received: by mail-pl1-f182.google.com with SMTP id e5so3306691pls.9 for <18380-done@debbugs.gnu.org>; Sun, 29 Sep 2019 19:54:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=CxeSXo3eL+pEYOo3jL5ZPhmjKfm2CfU1HKae3NcBQ/U=; b=DqcbJQLXX5XRPnPcjTlLxta0/ikHg5XqA8femPCCK3puqLWCZ2NcJT24LzbwLVvqXa 5NnTvLlYnYzDwSAMG3blaQg4+/ZRd32i1H8JSW7ZnIamUqlW+0gNmIYKT2+rL0sy42BR e3j6fHgSBULXJqbnxFRsL6zPNh0Dpa3QHGjsaelqmCrLzQ5kemE76yPuUXM2msi+VVFm X72X5T82msIqUPKb9Rgz1goaMl+PgOqbMjpzNuj7x61iF6srRJ0lZ+PyNSLauU2brNno fb7L2UBQVEsf8fBGPOUEDTP/29hRXHVD6hbtlw3+LZEYpy6mMtLWPjStBFIhq2oYISrM 2HJg== X-Gm-Message-State: APjAAAUPsNhML99LrqvNViqbXK5na2QDE8fW9xrlgAe0EklBGKr0SJ9n ZJFhhuSCTAWKskKyi0Dr93Lk1dPgdtlz+OQfNCQ= X-Google-Smtp-Source: APXvYqzRM1DvGKP78Y27RkL9NgCeG4fqG7OYjtDPf+mNh6UJ2cCmSF1E0lEn70196AKVxiZ4fWYMDIg1a1iWS+jkaIo= X-Received: by 2002:a17:902:326:: with SMTP id 35mr18313417pld.128.1569812084786; Sun, 29 Sep 2019 19:54:44 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:167798 Archived-At: Stefan Monnier writes: >> This will see the { as quoted: >> "$(echo "{")" >> >> while this will not: >> >> "$(echo >> "{")" > > Actually, it depends: sometimes it will sometimes it won't :-( > >> after this line indentation is broken as Emacs thinks there is an >> unclosed open brace. >> >> The problem with multiline quoted subshells is more general, as >> remarked by this comment in sh-script.el: >> >> ;; FIXME: This can (and often does) match multiple lines, yet it makes no >> ;; effort to handle multiline cases correctly, so it ends up being >> ;; rather flaky. > > Indeed, the problem you show is the direct result of the problem alluded > to in the above comment. I installed the patch below which seems to help. I can't reproduce the original problem on current master. Since there also has been no further updates here in 5 years, I'm going to close this bug report. If any of this is still an issue, please reopen the bug report. Best regards, Stefan Kangas