From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 23 12:14:16 2017 Received: (at submit) by debbugs.gnu.org; 23 Nov 2017 17:14:16 +0000 Received: from localhost ([127.0.0.1]:54089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHv4p-0000AT-5B for submit@debbugs.gnu.org; Thu, 23 Nov 2017 12:14:16 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHuTm-0007kX-G6 for submit@debbugs.gnu.org; Thu, 23 Nov 2017 11:35:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHuTf-000360-Mc for submit@debbugs.gnu.org; Thu, 23 Nov 2017 11:35:53 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:34536) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHuTf-00035c-F6 for submit@debbugs.gnu.org; Thu, 23 Nov 2017 11:35:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHuTb-0007gi-C3 for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 11:35:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHuTX-0002wy-R9 for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 11:35:47 -0500 Received: from 105.ip-145-239-83.eu ([145.239.83.105]:58876 helo=matej-kosik.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHuTX-0002sd-EB for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 11:35:43 -0500 Received: from [192.168.1.10] (adsl-dyn76.78-99-102.t-com.sk [78.99.102.76]) by matej-kosik.net (Postfix) with ESMTPSA id 71A3F230FE; Thu, 23 Nov 2017 16:59:22 +0100 (CET) To: bug-gnu-emacs@gnu.org From: =?UTF-8?B?TWF0ZWogS2/FocOtaw==?= Subject: 24.5; failure to configure a particular Ocaml indentation parameter (via SMIE) Openpgp: id=1CD41D0A52319DC7ABC1B79F50AFFA128CE48649; url=http://matej-kosik.net/doc/kosik.asc Message-ID: Date: Thu, 23 Nov 2017 16:59:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MIh2jkvsXSwKNJBQ4jeTj8C6aUB1umLbp" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 23 Nov 2017 12:14:13 -0500 Cc: monnier@IRO.UMontreal.CA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MIh2jkvsXSwKNJBQ4jeTj8C6aUB1umLbp Content-Type: multipart/mixed; boundary="9TsccXGvGUrDFCmGOokQD27KCmsVGKAnH"; protected-headers="v1" From: =?UTF-8?B?TWF0ZWogS2/FocOtaw==?= To: bug-gnu-emacs@gnu.org Cc: monnier@IRO.UMontreal.CA Message-ID: Subject: 24.5; failure to configure a particular Ocaml indentation parameter (via SMIE) --9TsccXGvGUrDFCmGOokQD27KCmsVGKAnH Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi, I would like to configure Emacs, while editing Ocaml code, so that it indents the code consistently with the way how "Ocaml Batteries Included"= is indented. (or any kind of sane convention --- I don't care particularly which one as long as I can override the default behavior which I find distracting)= However, my attempts to do this failed. This is what I have tried to do: -------------------------------------------------------------------------= ----- - I have "tuareg 2.1.0" installed - My "~/.emacs" file contains only the following line: (load "/home/mkosik/.opam/4.06.0/share/emacs/site-lisp/tuareg-site-fi= le") It is the line that was printed as a suggestion at the end of the Tuare= g installation (via OPAM). - NOTE: The designated file /home/mkosik/.opam/4.06.0/share/emacs/site-lisp/tuareg-site-file does not exist. Is that to be expected? - I go to this line: https://github.com/ocaml-batteries-team/batteries-included/blob/e069e= 28678a0d15d338721e1ff5e480fe0ad26c5/src/batComplex.ml#L82-L83 - change the indentation to a non-default value (e.g. moving that line 4 = more spaces to the right) (NOTE: at this point, I have just randomly chosen any non-default value= ) - I run the following command: M-x smie-config-set-indent I see the following question Adjust rule (:before "|-or" -> nil) to (default 4) I press ENTER. Then I see a message: Added rule :before "|-or" -> 4 (via nil) - I run the following command: smie-config-save I see a message: Local rules saved in `smie-config` - 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. :-/ - I run the following command: M-x customize-save-customized I see a message: Wrote /home/mkosik/.emacs - Now my ~/.emacs file looks like this: (load "/home/mkosik/.opam/4.06.0/share/emacs/site-lisp/tuareg-site-fi= le") (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. '(inhibit-startup-screen t) '(smie-config (quote ((tuareg-mode (4 :before "|-or" nil)))))) (custom-set-faces ;; custom-set-faces 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. ) NOTE: I have no idea whether this is an expected value or not. I do not understand the meaning of "smie-config" variable. I am now going to test whether my setting had any effect, so: - I close my Emacs window. - I launch Emacs again with the same file and I place the cursor to the s= ame line as before: https://github.com/ocaml-batteries-team/batteries-included/blob/e069e= 28678a0d15d338721e1ff5e480fe0ad26c5/src/batComplex.ml#L82-L83 - I press TAB. What I see is that the whole line is shifted to the right by 2 columns.= I don't understand why by 2 columns to the right? Why wasn't the line indented by 4 columns to the right (this is what I defined above as desired indentation). Incidentally, whatever value I set as a desired indentation, after I restart Emacs and press TAB on a given line, the line always moves by 2 places to the right. Why? -------------------------------------------------------------------------= ----- In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-12 on hullmann, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.1190200= 0 System Description: Debian GNU/Linux 9.2 (stretch) Configured using: `configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/share/emacs/= 24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/sit= e-lisp:/usr/share/emacs/site-lisp --without-gnutls --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/share/emacs/= 24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/sit= e-lisp:/usr/share/emacs/site-lisp --without-gnutls --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars 'CFLAGS=3D-g -O2 -fdebug-prefix-map=3D/build/emacs24-24.5+1=3D. -fstack-protector-strong -Wformat -Werror=3Dformat-security -Wall -fno-PIE' 'CPPFLAGS=3D-Wdate-ti= me -D_FORTIFY_SOURCE=3D2' 'LDFLAGS=3D-Wl,-z,relro -no-pie'' Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: Tuareg Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)... Loading cjk-enc...done Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...done Loading /etc/emacs/site-start.d/50noweb.el (source)...done Loading /home/mkosik/.opam/4.06.0/share/emacs/site-lisp/tuareg-site-file.= =2E.done For information about GNU Emacs and the GNU system, type C-h C-a. Auto-saving...done Quit Saving file /home/mkosik/git/other/batteries-included/src/batComplex.ml..= =2E Wrote /home/mkosik/git/other/batteries-included/src/batComplex.ml Load-path shadows: /usr/share/emacs/24.5/site-lisp/debian-startup hides /usr/share/emacs/sit= e-lisp/debian-startup Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils vc-git tuareg speedbar sb-image ezimage dframe compile comint ansi-color ring smie easymenu package epg-config time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) --9TsccXGvGUrDFCmGOokQD27KCmsVGKAnH-- --MIh2jkvsXSwKNJBQ4jeTj8C6aUB1umLbp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEHNQdClIxncerwbefUK/6EozkhkkFAloW8FgACgkQUK/6Eozk hklhkRAAqJGlMzCNOnOOJTsLhEL1XuH+J+jBXq1981Yh8G7z/RKZRXyRvB5UF3xU T0NZs6YFZDNeJawaWY6xK5wvC6S0zhdxz8hv9qhYmPTz5oBV5D+qfzG6+VMlyv4R btit6wELfM+3gqW3J2cnCC6ze2bYxBAvKq0xG0NceoM53e3U9mbdBnw1cY6B5cxR qaxhYdzo7XM5W5oOS7TeFfrvRy0dhHqP/LaerpFQQs6IxtyrxN5kjxIcG3TeWGnI hrR6/1f3A7+ObXrBDhAuQPu57LBC2YzRcaliju4RcmlJvGKlisZVeZys6xLBfRMy T52w5UL7/u5alv0aUEldLWLZwVsc99TUsb+9ibtxV0Qm0pVaycMaNabB9MnVuQA9 boIqF8G14q+iqqNHyMEg9hIwFEacllvl4c7EkJyAwSKmTPHgVNKBhThQrAAwVPJ1 vDvl2abGNdS+A/tjkAGoZzyC3+95VBRbegnLzIEI2NjcAZeMvOaLQVkFyvv/NwfY Jf1huAQ84Mg3JCooWgr5eTiEOLgex8+yynR1z7EaoboMPkMKehQ+OBIfo/CPkLcF wJGjY9zuDZy5efegcaDGbiapuNX+UwSFoy/QjWgDqruBlq7F2/HsugBBkxuIDfwl oVSG2ySQKbndJok0aTmhzyJ5sk5wuYB7zuiTYyPAM11VAxyu95Q= =Pmok -----END PGP SIGNATURE----- --MIh2jkvsXSwKNJBQ4jeTj8C6aUB1umLbp-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 23 14:25:17 2017 Received: (at 29414) by debbugs.gnu.org; 23 Nov 2017 19:25:17 +0000 Received: from localhost ([127.0.0.1]:54146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHx7c-000538-Km for submit@debbugs.gnu.org; Thu, 23 Nov 2017 14:25:16 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:43303) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHx7Z-00052s-L6; Thu, 23 Nov 2017 14:25:14 -0500 Received: from lechazo.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id vANJPA3c005716; Thu, 23 Nov 2017 14:25:11 -0500 Received: by lechazo.home (Postfix, from userid 20848) id 10653602DF; Thu, 23 Nov 2017 14:26:58 -0500 (EST) From: Stefan Monnier To: Matej =?utf-8?B?S2/FocOtaw==?= Subject: Re: bug#29414: 24.5; failure to configure a particular Ocaml indentation parameter (via SMIE) Message-ID: References: Date: Thu, 23 Nov 2017 14:26:57 -0500 In-Reply-To: ("Matej =?utf-8?B?S2/FocOtayIncw==?= message of "Thu, 23 Nov 2017 16:59:20 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 3 Rules triggered NOFROM_SGMAIL=0.2, EDT_SA_DN_PASS=0, RV6165=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6165> : inlines <6185> : streams <1771128> : uri <2538927> X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 29414 Cc: 29414@debbugs.gnu.org, monnier@IRO.UMontreal.CA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) forcemerge 24848 29414 thanks > - 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. :-/ 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 > - Now my ~/.emacs file looks like this: [...] > '(smie-config (quote ((tuareg-mode (4 :before "|-or" nil)))))) Looks good. > - I press TAB. > What I see is that the whole line is shifted to the right by 2 columns. 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. I reproduced the corresponding patch below, Stefan commit a58d0c590a777be98e58cd8c92ee1381e07e9b2d Author: Noam Postavsky Date: Wed Aug 30 19:31:48 2017 -0400 Fix loading of smie-config rules (Bug#24848) * 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. 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) (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) (defun smie-config-local (rules) From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 23 14:59:49 2017 Received: (at control) by debbugs.gnu.org; 23 Nov 2017 19:59:49 +0000 Received: from localhost ([127.0.0.1]:54163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHxf3-0007ih-63 for submit@debbugs.gnu.org; Thu, 23 Nov 2017 14:59:49 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:55810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHxf1-0007iX-Es for control@debbugs.gnu.org; Thu, 23 Nov 2017 14:59:48 -0500 Received: from lechazo.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id vANJxkSB025516; Thu, 23 Nov 2017 14:59:46 -0500 Received: by lechazo.home (Postfix, from userid 20848) id BDD7A602DF; Thu, 23 Nov 2017 15:01:33 -0500 (EST) From: Stefan Monnier To: control@debbugs.gnu.org (GNU bug tracker automated control server) Subject: Re: Processed: Re: bug#29414: 24.5; failure to configure a particular Ocaml indentation parameter (via SMIE) Message-ID: References: Date: Thu, 23 Nov 2017 15:01:33 -0500 In-Reply-To: (GNU bug tracker automated control server's message of "Thu, 23 Nov 2017 14:26:03 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 3 Rules triggered GEN_SPAM_FEATRE=0.1, EDT_SA_DN_PASS=0, RV6165=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6165> : inlines <6185> : streams <1771130> : uri <2538939> X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) unarchive 24848 forcemerge 24848 29414 thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 23 18:09:43 2017 Received: (at 29414) by debbugs.gnu.org; 23 Nov 2017 23:09:43 +0000 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 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 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) Subject: Re: bug#29414: 24.5; failure to configure a particular Ocaml indentation parameter (via SMIE) To: Stefan Monnier References: From: =?UTF-8?B?TWF0ZWogS2/FocOtaw==?= Openpgp: id=1CD41D0A52319DC7ABC1B79F50AFFA128CE48649; url=http://matej-kosik.net/doc/kosik.asc Message-ID: Date: Thu, 23 Nov 2017 22:52:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uGI8LLBNRek1g0pMRB7H7xCBkKICvVTqe" X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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.) [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.9 SPF_HELO_SOFTFAIL SPF: HELO does not match SPF record (softfail) 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 S25R_4 T_S25R: Bottom of rDNS ends w/ num, next lvl has num-num X-Debbugs-Envelope-To: 29414 X-Mailman-Approved-At: Thu, 23 Nov 2017 18:09:41 -0500 Cc: 29414@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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.) [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.9 SPF_HELO_SOFTFAIL SPF: HELO does not match SPF record (softfail) 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 S25R_4 T_S25R: Bottom of rDNS ends w/ num, next lvl has num-num 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-- From unknown Tue Jun 17 01:49:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 22 Dec 2017 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator