From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matej =?UTF-8?Q?Ko=C5=A1=C3=ADk?= Newsgroups: gmane.emacs.bugs Subject: bug#29414: 24.5; failure to configure a particular Ocaml indentation parameter (via SMIE) Date: Thu, 23 Nov 2017 22:52:08 +0100 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uGI8LLBNRek1g0pMRB7H7xCBkKICvVTqe" X-Trace: blaine.gmane.org 1511478624 5531 195.159.176.226 (23 Nov 2017 23:10:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Nov 2017 23:10:24 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 Cc: 29414@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 24 00:10:15 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 1eI0dI-0000VL-DO for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Nov 2017 00:10:12 +0100 Original-Received: from localhost ([::1]:46344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eI0dO-0007d0-0D for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Nov 2017 18:10:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eI0dE-0007cf-E7 for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 18:10:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eI0d8-0004P6-J2 for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 18:10:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45625) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eI0d8-0004OU-Fw for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 18:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eI0d8-0007UD-6B for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 18:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Matej =?UTF-8?Q?Ko=C5=A1=C3=ADk?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Nov 2017 23:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29414 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch Original-Received: via spool by 29414-submit@debbugs.gnu.org id=B29414.151147858328749 (code B ref 29414); Thu, 23 Nov 2017 23:10:02 +0000 Original-Received: (at 29414) by debbugs.gnu.org; 23 Nov 2017 23:09:43 +0000 Original-Received: from localhost ([127.0.0.1]:54306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eI0co-0007Td-Nm for submit@debbugs.gnu.org; Thu, 23 Nov 2017 18:09:43 -0500 Original-Received: from 105.ip-145-239-83.eu ([145.239.83.105]:55314 helo=matej-kosik.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHzPq-0005ho-92 for 29414@debbugs.gnu.org; Thu, 23 Nov 2017 16:52:14 -0500 Original-Received: from [192.168.1.10] (adsl-dyn122.78-99-175.t-com.sk [78.99.175.122]) by matej-kosik.net (Postfix) with ESMTPSA id 4736F230FE; Thu, 23 Nov 2017 22:52:10 +0100 (CET) Openpgp: id=1CD41D0A52319DC7ABC1B79F50AFFA128CE48649; url=http://matej-kosik.net/doc/kosik.asc In-Reply-To: X-Mailman-Approved-At: Thu, 23 Nov 2017 18:09:41 -0500 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:140280 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --uGI8LLBNRek1g0pMRB7H7xCBkKICvVTqe Content-Type: multipart/mixed; boundary="mu5kgd2mh6sJVakWCWXrK9bcg9lVrCEKL"; protected-headers="v1" From: =?UTF-8?B?TWF0ZWogS2/FocOtaw==?= To: Stefan Monnier Cc: 29414@debbugs.gnu.org Message-ID: Subject: Re: bug#29414: 24.5; failure to configure a particular Ocaml indentation parameter (via SMIE) References: In-Reply-To: --mu5kgd2mh6sJVakWCWXrK9bcg9lVrCEKL Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable I've compiled Emacs 26.0.90 and made the same experiment. I can confirm that it is fixed. (I.e., the values I tried to either via "smie-config-set-indent" command = or by editing ~/.emacs file are no longer ignored.) Thank you very much. On 11/23/17 20:26, Stefan Monnier wrote: > forcemerge 24848 29414 > thanks >=20 >> - I run the following command: >> >> M-: (print smie-config) >> >> I see >> >> ((tuareg-mode (4 :before "|-or" nil))) >> ((tuareg-mode (4 :before "|-or" nil))) >> >> I have no idea whether this an expected or unexpected value. :-/ >=20 > Yes, it's expected because M-: already prints the result of the > evaluation, and `print` returns its argument. IOW better just use > M-: smie-config RET >=20 >> - Now my ~/.emacs file looks like this: > [...] >> '(smie-config (quote ((tuareg-mode (4 :before "|-or" nil)))))) >=20 > Looks good. >=20 >> - I press TAB. >> What I see is that the whole line is shifted to the right by 2 colum= ns. >=20 > Which is what happens by default, so it shows that the setting didn't > take effect. I tracked this down and this happens to be a known bug > which was recently fixed in smie.el. More specifically, it > should be fixed in the current Emacs-26 pretest. >=20 > I reproduced the corresponding patch below, >=20 >=20 > Stefan >=20 >=20 > commit a58d0c590a777be98e58cd8c92ee1381e07e9b2d > Author: Noam Postavsky > Date: Wed Aug 30 19:31:48 2017 -0400 >=20 > Fix loading of smie-config rules (Bug#24848) > =20 > * lisp/emacs-lisp/smie.el (smie-config--setter): Use `set-default' > instead of `setq-default'. > (smie-config): Use `custom-initialize-set' instead of > `custom-initialize-default' as the :initialize argument. > =20 > diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el > index 87c4782e21..da1e12b140 100644 > --- a/lisp/emacs-lisp/smie.el > +++ b/lisp/emacs-lisp/smie.el > @@ -1956,7 +1956,7 @@ smie-config--mode-hook > (defvar smie-config--modefuns nil) > =20 > (defun smie-config--setter (var value) > - (setq-default var value) > + (set-default var value) > (let ((old-modefuns smie-config--modefuns)) > (setq smie-config--modefuns nil) > (pcase-dolist (`(,mode . ,rules) value) > @@ -1982,7 +1982,7 @@ smie-config > ;; FIXME improve value-type. > :type '(choice (const nil) > (alist :key-type symbol)) > - :initialize 'custom-initialize-default > + :initialize 'custom-initialize-set > :set #'smie-config--setter) > =20 > (defun smie-config-local (rules) >=20 --mu5kgd2mh6sJVakWCWXrK9bcg9lVrCEKL-- --uGI8LLBNRek1g0pMRB7H7xCBkKICvVTqe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEHNQdClIxncerwbefUK/6EozkhkkFAloXQwgACgkQUK/6Eozk hknamg//bXPV/YWXe4VRkJd9aruC9+JBC9J/noFWwczetb3ZqwabCafZja4TCGLP mp+eJTAUIYqEc6CJ+mQCjO4ZuNS1LjHhqewE4NfWnSRQiZ1oXY7TgwbPzV/PpiRV ZsydekzO15gZsY6oFfcA1JQUrg2us88rJnY4k1RbhNSAW8eOpM+pA/4IVJJw0kLZ A8RrXXFNBWWUf9YUjKXoB2kn8wzj0M2kQCNA+OAmbYy7CEmRLS2kYyDolqHgwFPw O7FySAoopMDKie0gj9qILRq2DaEyOrMCKYdz4ZbT7fgufTlb1kz8vCt4q14UD3b6 Ky40wchr1G9bSzdqMvlF/hfsLECMjYd9DMaISUBZ4SJm1OUilo6f25htTJSDd0J3 K4DJRpx88GsAGKP7F7m0xz6D+WDDfYsQ39TknfBWen1Z/PYvnwqLEdW00xzwCB0k g4yu6LB7rqGhsTN1YsjBFwzgg61vuZsVaj+5wUFY6voaR5WP+QjQQPHnupmeUv42 iWSX5T6sS6D0PU7juUX67l2tfkLO9GtGmCpIHxBrJ2axkvXtid5e0SOfhoeKjDuI 51kcnFCbYa5fOoaURljZIu2WiPxLd4+U/PpWsJ48kVZ37tY+hFuiSPkSVEcSFXb0 kC1j9v9+W+jluxtF7F3evlPlLEeSJTmBGrMf1nomy3l2MMB2Q7w= =sZ/y -----END PGP SIGNATURE----- --uGI8LLBNRek1g0pMRB7H7xCBkKICvVTqe--