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: Mon, 11 Sep 2017 14:48:10 -0400 Message-ID: <87h8w9kr6d.fsf@users.sourceforge.net> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com> <871sns8vm0.fsf@users.sourceforge.net> <1504513809301.60282@bt.com> <87o9qkg4tn.fsf@users.sourceforge.net> <1505115881331.63387@bt.com> <1505123630318.10795@bt.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1505155779 12816 195.159.176.226 (11 Sep 2017 18:49:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 11 Sep 2017 18:49:39 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: 24848@debbugs.gnu.org To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 11 20:49:31 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 1drTlg-00024q-G8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Sep 2017 20:49:12 +0200 Original-Received: from localhost ([::1]:59978 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drTlm-0007Rh-8I for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Sep 2017 14:49:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drTla-0007O4-Df for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2017 14:49:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drTlW-0002jE-DR for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2017 14:49:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53533) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1drTlW-0002jA-9b for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2017 14:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1drTlW-0002k4-2x for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2017 14:49: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: Mon, 11 Sep 2017 18:49:02 +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: patch Original-Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150515570210489 (code B ref 24848); Mon, 11 Sep 2017 18:49:02 +0000 Original-Received: (at 24848) by debbugs.gnu.org; 11 Sep 2017 18:48:22 +0000 Original-Received: from localhost ([127.0.0.1]:33981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drTks-0002j7-5R for submit@debbugs.gnu.org; Mon, 11 Sep 2017 14:48:22 -0400 Original-Received: from mail-wr0-f174.google.com ([209.85.128.174]:34332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drTkq-0002is-Ge for 24848@debbugs.gnu.org; Mon, 11 Sep 2017 14:48:21 -0400 Original-Received: by mail-wr0-f174.google.com with SMTP id v109so16485352wrc.1 for <24848@debbugs.gnu.org>; Mon, 11 Sep 2017 11:48:20 -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=9NmovgL8zT/wAPzaf2sHLWIR+Y2+Ctdt8y24rrxfP20=; b=lQWCDuQnlFr0EkatG/RyVjbUrt9d/66R0LgAw6S5/GqT+uuncPd6FeD+bxlWulQaQw ldeSC3EM0f/rRnjohMlv801AA9HdxostZLd6QcHaPIlLHaoGDoTaAD21GyscLSyPdchG 8Spa+vt3gZ9w5tt6xjgWmfaBAcQWIcIoFEfc8HkH7xgrGuzLiba/rcDKZ6mkKy/YuWLV ieMww2m7u4CRNUnqEWbsr1Hx+GdC9l3Pdydcyw9KF8dwV/2TdFd62ihVjlfuw1Eo66BS ULfISeqvESC4k9VZPHFDfIRmced8U0tifLm643QgFwJ/mOBK6jEPaYhIFIRQkuSnaI1o YAjg== 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=9NmovgL8zT/wAPzaf2sHLWIR+Y2+Ctdt8y24rrxfP20=; b=k7TZxucKqYwOoDQ7FbCumP8NqyMsLk6n4CjqOYe/ST1T3za0rQq7BXKCVVmTtkhD3u WNOgaQn7tIWIWLkfAcUNOsNoq0czfbWpAOa6Lbh41jXdoFMMiAht7ksyPrysiY8+P/EO t0I8+icbRS/r6NAkx53zwX2jEzAIcDUK9dug5b7PU9ocXaOE18OBIM0peoznERlXaEdQ CSNQ/uXvvq5jPM634kqh8yc3bHm9RloEFl7CKBBLWO6AOaZ7LFFwf7odxBNaiqx8OCjq cchAAgNGOaWaYcN3f8y2mzQyyeeIIZk4cG31qMeOeQUs3FaRB+IhF/znYTsTM07uFzVw DVPg== X-Gm-Message-State: AHPjjUgtyyRVTj/Gpfvel3pXmK067LWSV+Wfj0e3kBeYN0C/BPX4iap0 0KSxqJ1Q3F1BG771pL4= X-Google-Smtp-Source: ADKCNb5wgVWFJsQQLSohgu0b9+4Rtd/FMkL84OrY+2ozR2o6g+fpLZlmafpJjTXlQ+TaEE1N4aqmoA== X-Received: by 10.223.148.6 with SMTP id 6mr9181485wrq.15.1505155694423; Mon, 11 Sep 2017 11:48:14 -0700 (PDT) Original-Received: from whitebox (212-29-218-62.barak.net.il. [212.29.218.62]) by smtp.googlemail.com with ESMTPSA id u186sm3710479wmd.19.2017.09.11.11.48.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Sep 2017 11:48:13 -0700 (PDT) In-Reply-To: <1505123630318.10795@bt.com> (richard wiseman's message of "Mon, 11 Sep 2017 09:53:50 +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:136802 Archived-At: writes: > I've added the code to an unzipped version of smie.el and to > sh-script.el and byte-compiled both. Actually, sh-script.el isn't strictly needed because it's just a documentation patch. > Emacs loads without errors now, > but to be honest, I'm unsure how to check that it now loads > smie-config properly! I load a script file and check the value of > smie-config and it says it's set for the current session only but its > value is nil. Do you have something like this in your .emacs? (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(sh-basic-offset 2) '(smie-config (quote ((sh-mode (-2 :before "then" 0)))))) If not, note that `smie-config-save' doesn't save the rules in a persistent way, you have to save the `smie-config' variable via the customize interface for that (this is another thing that should probably be clarified in the docstring). > From: Wiseman,R,Richard,TUK2 R > Sent: 11 September 2017 08:44 > To: npostavs@users.sourceforge.net; 24848@debbugs.gnu.org > =, 24848@debbugs.gnu.org > Subject: Re: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? > > You're quite right: my smie library is gzipped. I had no idea that might be the case! > > I tried your suggestion of putting the code into my .emacs file but it didn't seem to like that... > > > Warning (initialization): An error occurred while loading `/home/richard/.emacs': > > Symbol's value as variable is void: smie-config--modefuns Oh right, I forgot about all the dependencies. Well, I guess patching directly like you've tried above is the most straightforward way.