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 08:41:50 -0400 Message-ID: <87o9r59lyp.fsf_-_@users.sourceforge.net> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1503578482 23757 195.159.176.226 (24 Aug 2017 12:41:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 Aug 2017 12:41:22 +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 Thu Aug 24 14:41:18 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 1dkrRa-0005IP-7y for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Aug 2017 14:41:06 +0200 Original-Received: from localhost ([::1]:48454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkrRf-00047F-EL for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Aug 2017 08:41:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkrRZ-000463-AV for bug-gnu-emacs@gnu.org; Thu, 24 Aug 2017 08:41:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkrRW-0005o9-2g for bug-gnu-emacs@gnu.org; Thu, 24 Aug 2017 08:41:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43591) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dkrRV-0005o3-VI for bug-gnu-emacs@gnu.org; Thu, 24 Aug 2017 08:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dkrRV-0005Y6-LU for bug-gnu-emacs@gnu.org; Thu, 24 Aug 2017 08:41:01 -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: Thu, 24 Aug 2017 12:41: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.150357841921273 (code B ref 24848); Thu, 24 Aug 2017 12:41:01 +0000 Original-Received: (at 24848) by debbugs.gnu.org; 24 Aug 2017 12:40:19 +0000 Original-Received: from localhost ([127.0.0.1]:52272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkrQp-0005Wx-9n for submit@debbugs.gnu.org; Thu, 24 Aug 2017 08:40:19 -0400 Original-Received: from mail-it0-f49.google.com ([209.85.214.49]:36401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkrQn-0005Wd-Cl; Thu, 24 Aug 2017 08:40:17 -0400 Original-Received: by mail-it0-f49.google.com with SMTP id j62so2285371ith.1; Thu, 24 Aug 2017 05:40:17 -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=sIznALQmLlQkCgv1xK2DwLlYxmhrpkZUZYSLNJei8/8=; b=UoQ12oAyZzD3BkgRe/p8Vpsux8EcLltLBNX/2pqrWbma1guCeXpxpTN4wIP4LphxIW ul9Z5EJY0ucgnZu1GTizRXyWET/TDzP2g/8Xz4JGf9VNSD+tZ+FgXfrhjfltgL7Q7UPa Sjf1zcyUB9xK9qp2s+cRDyN/FHXsbsosMy/826UOvyZujEWuRhpYxdoEU4lMoniUt/cO JJ5fv1BDa3/bkmZPnBBIsbsbr5Do3HKeDo2QK9njyoiZbKPD48qXSmXHWjRaEOag50+2 zVLv/Lr39ZX9whbAwdWkujBoqLa8iLn5guQmKvLtqfBcjx8rEzRqwlLKyqry+jJtp0fz xoyA== 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=sIznALQmLlQkCgv1xK2DwLlYxmhrpkZUZYSLNJei8/8=; b=IU8lK4lkuHXyvQMDq8JHfD3UZ9HohzTn4stB9II9+/xZQar2wyjD3p1CW7zhUH3JwT 7874H6C3CwA/4vRzVI52qb7gm0IpUJ6AP+vGZZYaORwu5utst83EDewaPBJ7IjiF/uU4 wki1y5QffW7+Q1GjLXLTuxhltXz8hkrszsi7N32N6q7QK2oYEIZ3LjaC0C+xL5bK0DEA Yq29XCa04KF6Qv+BiRD7J3BNVDJ22HJWQF21Tl6NbQhXg2W0d+GDgra1gOQseHumNLrH QId/xZAfpGkUiuhk2L59AbbToZo2YN7Wl4eNTyiCTCspv+9t6ymmfFvz49dtqGeoFnsM kNEA== X-Gm-Message-State: AHYfb5jz75fJd27aLb3Qwee0PIks8UlPwo3PNFwBoD9wes+gH7EHNkAI 18++za6yWU0Bdl7t X-Received: by 10.36.250.3 with SMTP id v3mr6635771ith.132.1503578411467; Thu, 24 Aug 2017 05:40:11 -0700 (PDT) Original-Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id h187sm2131265ita.1.2017.08.24.05.40.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Aug 2017 05:40:10 -0700 (PDT) In-Reply-To: <1503574770199.95054@bt.com> (richard wiseman's message of "Thu, 24 Aug 2017 11:39:30 +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:136144 Archived-At: retitle 24848 [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? quit writes: > I've looked at the bug online and all I can see is my own report, > which was submitted 295 days ago. Hi, sorry nobody responded earlier. Actually I would generally recommend that you send a followup message after a week or two if there hasn't been any response. By that time it's probably fallen off the radar from "current" bugs and become one of thousands of "open" bugs. (Also, your title could be a bit more descriptive, it's so vague that I would probably skip over it without noticing if I saw it in a list.) > Once I've done sh-learn-buffer-indent, all I really need to know is > how to save the "local rules". Perhaps it isn't a bug ... but if it > isn't, how come when I do M-x customize-unsaved it responds "No user > options are set but unsaved"? Perhaps it is not stored as an option, > I don't know, but this is why I submitted the bug: nobody seems to > know where this "local config" is saved or how to make it permanent! Does this commentary from sh-script.el help? (not that info hidden away in comments is a substitute for actual docs; I'm just trying to make sure we understand the problem.) ;; Saving indentation values ;; ------------------------- ;; After you've learned the values in a buffer, how to you remember ;; them? Originally I had hoped that `sh-learn-buffer-indent' ;; would make this unnecessary; simply learn the values when you visit ;; the buffer. ;; You can do this automatically like this: ;; (add-hook 'sh-set-shell-hook 'sh-learn-buffer-indent) ;; ;; However... `sh-learn-buffer-indent' is extremely slow, ;; especially on large-ish buffer. Also, if there are conflicts the ;; "last one wins" which may not produce the desired setting. ;; ;; So...There is a minimal way of being able to save indentation values and ;; to reload them in another buffer or at another point in time. ;; ;; Use `sh-name-style' to give a name to the indentation settings of ;; the current buffer. ;; Use `sh-load-style' to load indentation settings for the current ;; buffer from a specific style. ;; Use `sh-save-styles-to-buffer' to write all the styles to a buffer ;; in lisp code. You can then store it in a file and later use ;; `load-file' to load it.