unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: npostavs@users.sourceforge.net
To: <richard.wiseman@bt.com>
Cc: 24848@debbugs.gnu.org
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	[thread overview]
Message-ID: <87o9r59lyp.fsf_-_@users.sourceforge.net> (raw)
In-Reply-To: <1503574770199.95054@bt.com> (richard wiseman's message of "Thu,  24 Aug 2017 11:39:30 +0000")

retitle 24848 [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent?
quit

<richard.wiseman@bt.com> 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.






  reply	other threads:[~2017-08-24 12:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-01 15:07 bug#24848: 24.5; "Local rules set" richard.wiseman
2017-08-24 11:39 ` bug#24848: Any progress? richard.wiseman
2017-08-24 12:41   ` npostavs [this message]
2017-08-24 13:44     ` bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? richard.wiseman
2017-08-25  1:12       ` npostavs
2017-08-25  8:11         ` richard.wiseman
2017-08-25  8:37           ` richard.wiseman
2017-08-25 12:07           ` npostavs
2017-08-25 13:44             ` richard.wiseman
2017-08-25 14:31               ` richard.wiseman
2017-08-26 20:08                 ` Noam Postavsky
2017-08-29  7:43                   ` richard.wiseman
2017-08-30 23:49               ` npostavs
2017-09-04  8:30                 ` richard.wiseman
2017-09-08 23:15                   ` npostavs
2017-09-11  7:44                     ` richard.wiseman
2017-09-11  9:53                       ` richard.wiseman
2017-09-11 18:48                         ` npostavs
2017-09-12  7:09                           ` richard.wiseman
2017-09-22 22:46                         ` Noam Postavsky
2017-09-25 11:10                           ` richard.wiseman
2017-09-25 12:19                             ` Noam Postavsky
2017-09-25 13:06                               ` richard.wiseman
2017-09-25 23:41                                 ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9r59lyp.fsf_-_@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=24848@debbugs.gnu.org \
    --cc=richard.wiseman@bt.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).