From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Date: Thu, 24 Aug 2017 21:12:22 -0400 Message-ID: <87inhca1s9.fsf@users.sourceforge.net> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1503623486 8190 195.159.176.226 (25 Aug 2017 01:11:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 Aug 2017 01:11:26 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Cc: 24848@debbugs.gnu.org To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 25 03:11:22 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl39U-0001Ro-OF for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Aug 2017 03:11:12 +0200 Original-Received: from localhost ([::1]:51038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dl39b-0006wF-Bn for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Aug 2017 21:11:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dl39P-0006uz-Hp for bug-gnu-emacs@gnu.org; Thu, 24 Aug 2017 21:11:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dl39K-0002BX-IN for bug-gnu-emacs@gnu.org; Thu, 24 Aug 2017 21:11:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44702) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dl39K-0002BJ-DT for bug-gnu-emacs@gnu.org; Thu, 24 Aug 2017 21:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dl39K-0007Ic-0b for bug-gnu-emacs@gnu.org; Thu, 24 Aug 2017 21:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2017 01:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150362345228040 (code B ref 24848); Fri, 25 Aug 2017 01:11:01 +0000 Original-Received: (at 24848) by debbugs.gnu.org; 25 Aug 2017 01:10:52 +0000 Original-Received: from localhost ([127.0.0.1]:53383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl399-0007IC-Qd for submit@debbugs.gnu.org; Thu, 24 Aug 2017 21:10:51 -0400 Original-Received: from mail-it0-f43.google.com ([209.85.214.43]:38415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl397-0007Hy-FZ for 24848@debbugs.gnu.org; Thu, 24 Aug 2017 21:10:49 -0400 Original-Received: by mail-it0-f43.google.com with SMTP id n5so1534846itb.1 for <24848@debbugs.gnu.org>; Thu, 24 Aug 2017 18:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=iBNgmSlnqQTJcvVj+aqsDAv/GYst5jOtRRXq7gXaeBw=; b=l/5mcz6jlZ5+3nNl4uZm07uqJu/+NXF6Ea1XrtRBPkfHMt2GDeHWyTXssttbO9/j3Z HlkAmC3Nveg4UFlbtYst7naF6IDTewdXiSpRIAbsPMJOKD7Cp5By8d6/qlcNVKlSoM9A RZb4tw/Ce9cG7BRlnXih/SW3Z2pMzoUICIomUKM/OMpb6rhF44IErjFDDTEuRBhcX8ZA ze9qNPZ+nXI1Z+FUjrw+9jLMZI3APCRixpcUgb8TGrOI/gCFzwSLqbhEBtN+4Gx0s+3g lBz3r0jysKUdV+2+JpqunELrfA0nwi3kcwvMF0+nxAwE6zA8udAq7Ij7AiKtoyIB7kpz 2yYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=iBNgmSlnqQTJcvVj+aqsDAv/GYst5jOtRRXq7gXaeBw=; b=Zq8PefpgfeWN0aywbmtKuA+KCIvkJ5Z009/WmogXvY9LihQyrWb79lcNeQ0vgAOT6q vkeLc1h7NWboaVoUHLhTxlXBEAsvrZUeed1pRg8et99mVyN3ykEdt3oHkf2tGXDqiUXr u+zzAeSe3dAUJLi9QmjpqJPyeqWbzqrlGwkvWvhI63KQgHxuSWpqmvsYFvlJaKRjC/sx J85x3fG/JvPXCTMW8Y/jHJfkiVfhZE3vhOYEdCvf2ItsAFeAIya9G9d0cfgGS4sMRbUW l9OuwLVVGFj2FgEfbVxdF1AFdbEzDeByl+8dC017nHhm/K+UbgNRzdu81kYbuSt5GmH/ OtVQ== X-Gm-Message-State: AHYfb5iUDE2TKXc6K57X8c8uz227dmVTQ/LJvGu5QoMQ2ipSN8ur4muP lWc7rWc+9mF2ABoP X-Received: by 10.36.107.141 with SMTP id v135mr642764itc.33.1503623443674; Thu, 24 Aug 2017 18:10:43 -0700 (PDT) Original-Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id 193sm2589017ioo.84.2017.08.24.18.10.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Aug 2017 18:10:43 -0700 (PDT) In-Reply-To: <1503582257373.58386@bt.com> (richard wiseman's message of "Thu, 24 Aug 2017 13:44:17 +0000") 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: 208.118.235.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:136175 Archived-At: writes: > So the above seem to demonstrate that sh-name-buffer and > sh-save-styles-to-buffer don't save all indentation information. Oh, I think the commentary I found is actually for the old sh-script specific indentation. If 'sh-use-smie' is set (the default) you should rather use M-x smie-save-config. And then it seems an extra step is needed to activate it in the current session, evalute this expression: (customize-set-variable 'smie-config ;; This value is set by `smie-save-config'. '((sh-mode (-2 :before "then" 0)))) I'm not sure if this is because I'm testing with 'emacs -Q', or something is missing from 'smie-save-config'. I think normally the value would saved with the other customized options and work without any extra effort. > Please let me know if you'd like any further information. Could you also please post a script which gives the bad indentation? This could be another bug in itself.