X-Loop: help-debbugs@HIDDEN Subject: bug#36358: Indentation of not matched braces in latex-mode Resent-From: Sebastian Urban <mrsebastianurban@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 24 Jun 2019 16:09:02 +0000 Resent-Message-ID: <handler.36358.B.156139253515331 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 36358 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 36358 <at> debbugs.gnu.org X-Debbugs-Original-To: Bug GNU Emacs <bug-gnu-emacs@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.156139253515331 (code B ref -1); Mon, 24 Jun 2019 16:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Jun 2019 16:08:55 +0000 Received: from localhost ([127.0.0.1]:57719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hfRWY-0003zD-NP for submit <at> debbugs.gnu.org; Mon, 24 Jun 2019 12:08:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:42576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mrsebastianurban@HIDDEN>) id 1hfRWX-0003z5-42 for submit <at> debbugs.gnu.org; Mon, 24 Jun 2019 12:08:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55013) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from <mrsebastianurban@HIDDEN>) id 1hfRWV-0001wz-Il for bug-gnu-emacs@HIDDEN; Mon, 24 Jun 2019 12:08:52 -0400 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,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <mrsebastianurban@HIDDEN>) id 1hfRWS-0003vp-6K for bug-gnu-emacs@HIDDEN; Mon, 24 Jun 2019 12:08:49 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:40222) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <mrsebastianurban@HIDDEN>) id 1hfRWR-0003ui-QS for bug-gnu-emacs@HIDDEN; Mon, 24 Jun 2019 12:08:48 -0400 Received: by mail-wr1-x42b.google.com with SMTP id p11so14520312wre.7 for <bug-gnu-emacs@HIDDEN>; Mon, 24 Jun 2019 09:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=E3zdBMBPXnCW+ksEPnKnEcKSzilGor/CH7jZq+8CkwI=; b=kYrbhu6KtFUuvQ2OhzwUjX114Loirq9LrjepW4MfLm+VJrHEnGAjpDlnyive0TCSR4 rz7J3NlbLIDgo80RVMXHAsraXCBjEbTbG5EUTMS6A7K7PmUcGJ+f+9RoxGBtFinI18Ot k/9o++ctw/VfaWo68pSyqoHL2pW0SelZ5DQmvX9baqwZiz1+ZSeXIKKsb/BXzsgm0HPD hNpPRdADESKm7NuIG/kYtpdbvQfJuQCsnZ545OEW65kR/U/qgHwGjcqE+AaNS8q3ajcl JIQxIUWBtNNcBlBva9s1WNXLI0uUvGZW0An+SODu8CiyT6s3jiO+yzZmvFJdkGiVDOQT xoPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=E3zdBMBPXnCW+ksEPnKnEcKSzilGor/CH7jZq+8CkwI=; b=XQMy1r39KM5EnxiCdhkoXi1sIMNAXCLY1OfpvEwe9mFnQscZK/x/G9NeIRyP118mff ziHgEZRXjNF5TRDg595sjXROyY2QZSJZnYDIT5WTMN5tGhMSdXVNCF3zBaidmJjeaQBt 8u1hKciTIN4dL4tiKjGpKscaOfI/fT6U0ZJI5gGubxcacJwOk6QJW8atIJeKYComp2n/ GxqsBKcibZ2dO59HZy4w8lTE4EA9phOE/aF6zR11myzgTc6nDbmLLMCCVkTzWwXUjPit sl+O8QFSDxfGKS3UkIRvs+bGJZ98DiJcSCQKA6cHlACCbZHQtW2LJJp+T87k3XbXx+a6 5MAg== X-Gm-Message-State: APjAAAWv6fPqa12HsUrVOeQJJDVylZPeFUnwAEZawpLwvjGa6P4k/jjo asaCknhd8p6H2wnx/wsgZsm3h07x X-Google-Smtp-Source: APXvYqwEhLA2MC1dxlWaEMpxoUUMdQQHIDexZ5C99dP2Ixx3ryWlXcZmQWiW3j/u1PoCMlvU2kw/6A== X-Received: by 2002:adf:b64b:: with SMTP id i11mr24063577wre.205.1561392525969; Mon, 24 Jun 2019 09:08:45 -0700 (PDT) Received: from ?IPv6:2a00:f41:1870:f1b8:ed6d:9890:85f5:2b6d? ([2a00:f41:1870:f1b8:ed6d:9890:85f5:2b6d]) by smtp.gmail.com with ESMTPSA id v15sm9771972wrt.25.2019.06.24.09.08.45 for <bug-gnu-emacs@HIDDEN> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jun 2019 09:08:45 -0700 (PDT) From: Sebastian Urban <mrsebastianurban@HIDDEN> Message-ID: <f987c496-c9f0-9645-1018-7a1f88431892@HIDDEN> Date: Mon, 24 Jun 2019 18:08:45 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42b X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) If I use 'fill-paragraph' (M-q) on paragraph, inside things like \footnote{} or \emph{}, if they're long, text is indented with 2 spaces - look below. I was able to overcome this by setting 'tex-indent-basic' from 2 to 0, but I think it will affect other indentations I may want. Perhaps adding another variable to control this kind of indentation would be good idea? AUCTEX has: User Option: TeX-brace-indent-level - Number of spaces to add to the indentation for each '{' not matched by a '}'. So maybe we could "borrow" it from them? Lacus tincidunt ultrices. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.\footnote{Quisque ullamcorper placerat ipsum. Cras nibh. Morbi vel justo vitae lacus tincidunt ultrices. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.} In hac habitasse platea dictumst. Integer tempus convallis augue. Etiam facilisis. Nunc elementum fermentum wisi. Integer tempus convallis augue. S. U. In GNU Emacs 26.2 (build 1, i686-w64-mingw32) of 2019-04-13 built on CIRROCUMULUS Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749 Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Sebastian Urban <mrsebastianurban@HIDDEN> Subject: bug#36358: Acknowledgement (Indentation of not matched braces in latex-mode) Message-ID: <handler.36358.B.156139253515331.ack <at> debbugs.gnu.org> References: <f987c496-c9f0-9645-1018-7a1f88431892@HIDDEN> X-Gnu-PR-Message: ack 36358 X-Gnu-PR-Package: emacs Reply-To: 36358 <at> debbugs.gnu.org Date: Mon, 24 Jun 2019 16:09:05 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 36358 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 36358: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D36358 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#36358: Indentation of not matched braces in latex-mode Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 24 Jun 2019 23:24:02 +0000 Resent-Message-ID: <handler.36358.B36358.156141858924283 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 36358 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sebastian Urban <mrsebastianurban@HIDDEN> Cc: 36358 <at> debbugs.gnu.org Received: via spool by 36358-submit <at> debbugs.gnu.org id=B36358.156141858924283 (code B ref 36358); Mon, 24 Jun 2019 23:24:02 +0000 Received: (at 36358) by debbugs.gnu.org; 24 Jun 2019 23:23:09 +0000 Received: from localhost ([127.0.0.1]:58351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hfYIn-0006Ja-CE for submit <at> debbugs.gnu.org; Mon, 24 Jun 2019 19:23:09 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:14084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1hfYIj-0006Ic-Ic for 36358 <at> debbugs.gnu.org; Mon, 24 Jun 2019 19:23:06 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D70F9100B4D; Mon, 24 Jun 2019 19:22:59 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3E83B100964; Mon, 24 Jun 2019 19:22:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1561418574; bh=oIaoVkw3QEPz87ki5nX94plV7tE461oA4HIwIvcSIsY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=LQSH10btKMX+x9sVCgT68jLJCYoqac+v6cISVFLRI2wDHCRd4S59m0BrIn0gkpc3G nrklcmiqjd50eVTCtoUEpVLVPWgJwJyxCla+DCs5wqkGFulvRlYXm7fn9ats9TVaul CsCAZnUi8CI14hPt7hDwR5FyBlQpG2gfwEMOQAZVWpplOWqSkDBl23AwO8Fj+sSVnA +DkLb6VbIzHlJ+OuzNBRJz+WMRUSjmJOfQaHN0bcS2qteVEXkJUzBKJnyHCIjlSdsL ud+nDsALLIpLvl6V9macG+wNX/9vKM6SgT8Ub4KAe1dDE5ytwbKmeRjXO7cfbQTWRc 4A93NUoxOpJsA== Received: from alfajor (69-196-134-84.dsl.teksavvy.com [69.196.134.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8DAC0120920; Mon, 24 Jun 2019 19:22:53 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwvpnn2sh7a.fsf-monnier+emacs@HIDDEN> References: <f987c496-c9f0-9645-1018-7a1f88431892@HIDDEN> Date: Mon, 24 Jun 2019 19:22:52 -0400 In-Reply-To: <f987c496-c9f0-9645-1018-7a1f88431892@HIDDEN> (Sebastian Urban's message of "Mon, 24 Jun 2019 18:08:45 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.018 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > If I use 'fill-paragraph' (M-q) on paragraph, inside things like > \footnote{} or \emph{}, if they're long, text is indented with 2 > spaces - look below. I just pushed the patch below which lets you specify commands whose args shouldn't be indented this way. Note that the patch is for Emacs's bundled tex-mode, whereas you seem to be using AUCTeX, which uses its own indentation code. Stefan diff --git a/etc/NEWS b/etc/NEWS index 74a8bbe8fa..0f764cd998 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -475,6 +475,9 @@ current and the previous or the next line, as before. * Changes in Specialized Modes and Packages in Emacs 27.1 +** tex-mode +*** 'latex-noindent-commands' stops indenting arguments of \emph and friends + ** byte compiler *** byte-compile-dynamic is now obsolete This is because on the one hand it suffers from various misbehaviors in corner diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 9c91d27b94..4511354a3d 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -2803,9 +2803,19 @@ tex-indent-arg (defvar tex-indent-basic 2) (defvar tex-indent-item tex-indent-basic) (defvar tex-indent-item-re "\\\\\\(bib\\)?item\\>") -(defvar latex-noindent-environments '("document")) -(put 'latex-noindent-environments 'safe-local-variable - (lambda (x) (null (delq t (mapcar #'stringp x))))) +(defcustom latex-noindent-environments '("document") + "Environments whose content is not indented by `tex-indent-basic'." + :type '(repeat string) + :safe (lambda (x) (lambda (x) (memq nil (mapcar #'stringp x)))) + :group 'tex-file + :version "27.1") + +(defcustom latex-noindent-commands '("emph" "footnote") + "Commands for which `tex-indent-basic' should not be used." + :type '(repeat string) + :safe (lambda (x) (memq nil (mapcar #'stringp x))) + :group 'tex-file + :version "27.1") (defvar tex-latex-indent-syntax-table (let ((st (make-syntax-table tex-mode-syntax-table))) @@ -2912,9 +2922,17 @@ latex-find-indent (current-column) ;; We're the first element after a hanging brace. (goto-char up-list-pos) - (+ (if (and (looking-at "\\\\begin *{\\([^\n}]+\\)") + (+ (if (if (eq (char-after) ?\{) + (save-excursion + (skip-chars-backward " \t") + (let ((end (point))) + (skip-chars-backward "a-zA-Z") + (and (eq (char-before) ?\\) + (member (buffer-substring (point) end) + latex-noindent-commands)))) + (and (looking-at "\\\\begin *{\\([^\n}]+\\)") (member (match-string 1) - latex-noindent-environments)) + latex-noindent-environments))) 0 tex-indent-basic) indent (latex-find-indent 'virtual)))) ;; We're now at the "beginning" of a line. diff --git a/test/manual/indent/latex-mode.tex b/test/manual/indent/latex-mode.tex index 55c8e7033b..d314b98b48 100644 --- a/test/manual/indent/latex-mode.tex +++ b/test/manual/indent/latex-mode.tex @@ -8,4 +8,8 @@ \url{/lib/modules/$(uname -r)}, %bug#11953. and install the appropriate \url{gspca-modules} package. +Footnotes and emphasis shouldn't be indented \footnote{as can be seen here, +for example}, \emph{or there +as well}. + \end{document}
X-Loop: help-debbugs@HIDDEN Subject: bug#36358: Indentation of not matched braces in latex-mode Resent-From: Sebastian Urban <mrsebastianurban@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 25 Jun 2019 07:31:02 +0000 Resent-Message-ID: <handler.36358.B36358.156144784323229 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 36358 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 36358 <at> debbugs.gnu.org Received: via spool by 36358-submit <at> debbugs.gnu.org id=B36358.156144784323229 (code B ref 36358); Tue, 25 Jun 2019 07:31:02 +0000 Received: (at 36358) by debbugs.gnu.org; 25 Jun 2019 07:30:43 +0000 Received: from localhost ([127.0.0.1]:58561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hffud-00062a-Cp for submit <at> debbugs.gnu.org; Tue, 25 Jun 2019 03:30:43 -0400 Received: from mail-lj1-f178.google.com ([209.85.208.178]:32829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mrsebastianurban@HIDDEN>) id 1hffub-00062O-KZ for 36358 <at> debbugs.gnu.org; Tue, 25 Jun 2019 03:30:42 -0400 Received: by mail-lj1-f178.google.com with SMTP id h10so15200752ljg.0 for <36358 <at> debbugs.gnu.org>; Tue, 25 Jun 2019 00:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=zvvSxCGBlCg5+tD8VzIv8EelEI7Uvb7Y29vz8zSkIbE=; b=C7KNffyC/Uqcs5FnqbbbgkmvFW3hlQlOlvrnPiEnWscz5L2QVu+DwcIsMow0WlOwOp PkZnwu4RQF/ncuhwMNOxI0iIq0UAAyW2z29yHE6fFGVKm5Afw3SRbBm5DHjemsmVY9dX 6LiKrLSoLeiuQpziLuQAYuckpv6v6pXQ5M6C+g7mF6e4Qyaa81TE14bxcNUJ7p4Up9YF IDTJv3R+cU+wRvk+QoownLGOyK9lxgJlwrr/wj5T8N1NPH14QKakKyle7HQeejM+aDnv 9J9KDXjdpK9gvakaNRNFEDvQRZNTfmsJLRAskxzyGEhaNb6kU5RZsmPyClSUlP8DHbLD jFGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zvvSxCGBlCg5+tD8VzIv8EelEI7Uvb7Y29vz8zSkIbE=; b=e3bpMaq5tWP0IpsAURYyTQudOmC5Ga4hFhlv4Oz+ShY1hUS7j7LHAuEJlRjOhVaz/t Ko10zS+RwZPTD6iNBExBynktKxuq+LqugfdCUwpvh6vmPvYNbbmEcJhRkb2Q3JwJZKlt DmKt1m4/eyP5r0NtrUHlvpdcL8DEfFo4K8UCVNihwgdqaA/9x+NZYmnne36Bsv3TvsWY SgxorbqvfOE2j9ZSeBDztc6aiXNEO+F7E6Q+nJ7neGWMyrETSUReRT8piEvKU/YY/9w4 FBeehiUZoOFlLfWPRy+5UiLWvdbyvvy/SWTnSKdhiLoUgiVBfao2lF2u2EWfVj58Dsr9 kkkg== X-Gm-Message-State: APjAAAULk3jcChu/C3F2jSZUDHwJsJxRhus9WrsJNwvaMdwapP30VDRi iwz6DQjDejiwHoUEajB3Sxn2X54iDAs= X-Google-Smtp-Source: APXvYqzeqqcp7s/7zivfwr/ZVMBfeIOlVWSu/qpQOLPJlPBhJOFbIwspU6GWWQm6ccXiTQvofZ5gMA== X-Received: by 2002:a2e:9b4a:: with SMTP id o10mr485737ljj.137.1561447835088; Tue, 25 Jun 2019 00:30:35 -0700 (PDT) Received: from [89.161.9.216] (ip-89-161-9-216.tel.tkb.net.pl. [89.161.9.216]) by smtp.gmail.com with ESMTPSA id g5sm2118857ljj.69.2019.06.25.00.30.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jun 2019 00:30:34 -0700 (PDT) From: Sebastian Urban <mrsebastianurban@HIDDEN> References: <f987c496-c9f0-9645-1018-7a1f88431892@HIDDEN> <jwvpnn2sh7a.fsf-monnier+emacs@HIDDEN> Message-ID: <dcdde73c-fe9e-735c-5045-7c5b3bea2ec5@HIDDEN> Date: Tue, 25 Jun 2019 09:30:35 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <jwvpnn2sh7a.fsf-monnier+emacs@HIDDEN> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > I just pushed the patch below which lets you specify commands whose > args shouldn't be indented this way. Hmmm... or I don't understand how "specify commands whose args shouldn't be indented" will work in practice, or this may be wrong path. It's not about \emph{} or \footnote{}, it's about every command which use '{}' (braces), so in latex... most of them(?). Therefore if you let people add them to the list it'll grow really big - just look at font styles: \textrm{}, \textit{}, \textmd{}, \textbf{}, \textup{}, \textsl{}, \textsf{}, \textsc{}, \texttt{}, \textnormal{} - we could probably use "\text*", but there are other commands, for example the ones we define as new in preamble. Unless this patch is temporary lifebuoy for those who don't want to set 'tex-indent-basic' to 0, then well... carry on. :) > Note that the patch is for Emacs's bundled tex-mode, whereas you > seem to be using AUCTeX, which uses its own indentation code. No, I'm _not_ using AUCTeX, I'm using latex-mode. I only pointed to AUCTeX, because when I was looking for answer to this problem, I found solution (helpful internet) in AUCTeX - 'TeX-brace-indent-level' variable - and wanted something similar in latex-mode. Also I found code in theirs (AUCTeX) TEX.EL, which may help a bit. It may, but since I basically know no Elisp, I may be wrong. (defcustom TeX-brace-indent-level 2 "*The level of indentation produced by an open brace." :group 'TeX-indentation :type 'integer) (defun TeX-brace-count-line () "Count number of open/closed braces." (save-excursion (let ((count 0) (limit (line-end-position)) char) (while (progn (skip-chars-forward "^{}\\\\" limit) (when (and (< (point) limit) (not (TeX-in-comment))) (setq char (char-after)) (forward-char) (cond ((eq char ?\{) (setq count (+ count TeX-brace-indent-level))) ((eq char ?\}) (setq count (- count TeX-brace-indent-level))) ((eq char ?\\) (when (< (point) limit) (forward-char) t)))))) count))) This variable is also used in theirs LATEX.EL - L3366, L3503. Both functions too big to paste, I think.
X-Loop: help-debbugs@HIDDEN Subject: bug#36358: Indentation of not matched braces in latex-mode Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 25 Jun 2019 14:55:01 +0000 Resent-Message-ID: <handler.36358.B36358.156147444221243 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 36358 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sebastian Urban <mrsebastianurban@HIDDEN> Cc: 36358 <at> debbugs.gnu.org Received: via spool by 36358-submit <at> debbugs.gnu.org id=B36358.156147444221243 (code B ref 36358); Tue, 25 Jun 2019 14:55:01 +0000 Received: (at 36358) by debbugs.gnu.org; 25 Jun 2019 14:54:02 +0000 Received: from localhost ([127.0.0.1]:33187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hfmpd-0005WP-IV for submit <at> debbugs.gnu.org; Tue, 25 Jun 2019 10:54:01 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54119) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1hfmpa-0005W1-DU for 36358 <at> debbugs.gnu.org; Tue, 25 Jun 2019 10:54:00 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AD465100A79; Tue, 25 Jun 2019 10:53:52 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 60517100A37; Tue, 25 Jun 2019 10:53:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1561474431; bh=srRiFQJEoz3IVywuj2h+MrFeisF+lHNVDLs1wFxf9B0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=TGrmbIJLSv2KOxX3ommBobjw8ADDYa9U0Ts84HCddsHP0V/Ker7VdhH5mzYPMd3/G AsCePYT9W3E+B5btU5jTkViiVtvLVWhexLzQ0AI6vwKmWa1A2dqTGJmytb8awQzL+j 7HJvQ+gP8su4p4716kM+rzhihcadCQkd6SAmNiMNPl2LrMZVhjfVZ4CgNBWdeVzAgJ 2wwg17Uj14FOxZCQ/4Hw4mD2aBef/hlQbHZHGEcDBj/SpNSaSRkaNiBH1dDtkn//Ne C49ltkoUM2tdOUTObfWGPzuL9K8vRavfdzb4MR15ZLiia4D9STFlLO0zMyD+GeUOQW WekaXV4Q3LSCA== Received: from pastel (69-196-134-84.dsl.teksavvy.com [69.196.134.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2F32F120CCA; Tue, 25 Jun 2019 10:53:51 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwv1rzhwwqq.fsf-monnier+emacs@HIDDEN> References: <f987c496-c9f0-9645-1018-7a1f88431892@HIDDEN> <jwvpnn2sh7a.fsf-monnier+emacs@HIDDEN> <dcdde73c-fe9e-735c-5045-7c5b3bea2ec5@HIDDEN> Date: Tue, 25 Jun 2019 10:53:50 -0400 In-Reply-To: <dcdde73c-fe9e-735c-5045-7c5b3bea2ec5@HIDDEN> (Sebastian Urban's message of "Tue, 25 Jun 2019 09:30:35 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.014 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > Hmmm... or I don't understand how "specify commands whose args > shouldn't be indented" will work in practice, or this may be wrong > path. It's not about \emph{} or \footnote{}, it's about every command > which use '{}' (braces), so in latex... most of them(?). Therefore if > you let people add them to the list it'll grow really big - just look > at font styles: \textrm{}, \textit{}, \textmd{}, \textbf{}, \textup{}, > \textsl{}, \textsf{}, \textsc{}, \texttt{}, \textnormal{} - we could > probably use "\text*", but there are other commands, for example the > ones we define as new in preamble. Most of the ones I define are commands for which I do want the args to be indented. I typically use them like this: prefix: \TAlign{ foo \\ bar } where \TAlign expands to a kind of `tabular` environment. Similarly, I want \section{foo bar baz toto titi tata} rather than \section{foo bar baz toto titi tata} > Unless this patch is temporary lifebuoy for those who don't want to > set 'tex-indent-basic' to 0, then well... carry on. :) It's not meant as a temporary solution. More a tentative solution. Thinking more about it, the main distinction is whether the command is used "within a paragraph" or not. But I don't really know how to precisely characterize this notion of "within a paragraph". >> Note that the patch is for Emacs's bundled tex-mode, whereas you >> seem to be using AUCTeX, which uses its own indentation code. > No, I'm _not_ using AUCTeX, I'm using latex-mode. I only pointed to > AUCTeX, because when I was looking for answer to this problem, I found > solution (helpful internet) in AUCTeX - 'TeX-brace-indent-level' > variable - and wanted something similar in latex-mode. Good. > Also I found code in theirs (AUCTeX) TEX.EL, which may help a bit. > It may, but since I basically know no Elisp, I may be wrong. > (defcustom TeX-brace-indent-level 2 [...] > (defun TeX-brace-count-line () It seems to indent by 2 regardless of the command, just like what you don't want. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#36358: Indentation of not matched braces in latex-mode Resent-From: Sebastian Urban <mrsebastianurban@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 26 Jun 2019 07:47:02 +0000 Resent-Message-ID: <handler.36358.B36358.156153518922332 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 36358 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 36358 <at> debbugs.gnu.org Received: via spool by 36358-submit <at> debbugs.gnu.org id=B36358.156153518922332 (code B ref 36358); Wed, 26 Jun 2019 07:47:02 +0000 Received: (at 36358) by debbugs.gnu.org; 26 Jun 2019 07:46:29 +0000 Received: from localhost ([127.0.0.1]:34167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hg2dQ-0005np-Fk for submit <at> debbugs.gnu.org; Wed, 26 Jun 2019 03:46:28 -0400 Received: from mail-lj1-f178.google.com ([209.85.208.178]:42967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mrsebastianurban@HIDDEN>) id 1hg2dO-0005iH-6K for 36358 <at> debbugs.gnu.org; Wed, 26 Jun 2019 03:46:27 -0400 Received: by mail-lj1-f178.google.com with SMTP id t28so1130636lje.9 for <36358 <at> debbugs.gnu.org>; Wed, 26 Jun 2019 00:46:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=P4x1XV4OGcyfFuasOR9Jn9PqFdyYeEwL7q9qde8AlRI=; b=L1P9BEVnUpXNo/OAUwHvBZwatsY+u1ngy1vo1VWCzOOVrK3o5ZBkbetCuVNFxe73nJ oHYdVm6D2R+F1k1mkvNVofAImFaHBrAyRd8M5pY5fiZyLZFKIoLlOL+UncFG7UGvo76B d/D/HPEBMiV5RccSYV4R2L3toXZA4yvH/MMqctgCsiqKI8wsc0ri0n+gKIeXLXD4cgqX A/k/6A6soPkcuwpV7nE6PBSNoBff9GkG1O6eo1iW06S/YR6HMT3sC/2PVM2Rm82iiqsj DfcsC7OTId/3SWCniqPXzHKc04knNXSsrN65i4ed3ti7pGua0BkbkyXUxdQL+tzs4Gtz +WUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=P4x1XV4OGcyfFuasOR9Jn9PqFdyYeEwL7q9qde8AlRI=; b=guoTE0sRq61/evnkimSO5dOnqtawcSDvh9f6iYjNVM6yy61q1RA2k68k1hPdhikZQ3 8XO/qjXj6i4t2MDXgAuVMGnCSFTcknXzNCY9EumqIGQjiVIYg6XNvBA0Vtm5jXdrcFJP ozT2k8Nn259XI60BnhehjKiI9sZP82XQ7gBmQbZP/8Wb+eXyZbpsn4ULPYfPmbo6NZ9H 3/IWtR5azR+YJsq7xcP3lKdC7uZ4hPFnrI5n1gM22kPq6QYpGSpjDzRCMObAhfuJALq5 TXyr6tRt/0z/Npo+9VqgOhu1nqNBqvqpuLFVNWc7CgZLIYkXXheNvmLaGlRJ8fxDdEqE vHSw== X-Gm-Message-State: APjAAAVXMSo9/p71QvQiRbAEMirNNtWyZ4beSJ6Px2zH9JphqIs3D1HB 0XU8XmH5awGxE299esOiq0ukz3K5 X-Google-Smtp-Source: APXvYqxkzARFtEGEIrMM900GiZbjkOyl97h2oS/oGJETuWb5/Dgr9ZKqw2tDEyl0cy4uOJz8tsp1Fg== X-Received: by 2002:a2e:85d7:: with SMTP id h23mr1954781ljj.53.1561535179721; Wed, 26 Jun 2019 00:46:19 -0700 (PDT) Received: from [89.161.9.216] (ip-89-161-9-216.tel.tkb.net.pl. [89.161.9.216]) by smtp.gmail.com with ESMTPSA id u13sm2287992lfi.4.2019.06.26.00.46.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jun 2019 00:46:19 -0700 (PDT) From: Sebastian Urban <mrsebastianurban@HIDDEN> References: <f987c496-c9f0-9645-1018-7a1f88431892@HIDDEN> <jwvpnn2sh7a.fsf-monnier+emacs@HIDDEN> <dcdde73c-fe9e-735c-5045-7c5b3bea2ec5@HIDDEN> <jwv1rzhwwqq.fsf-monnier+emacs@HIDDEN> Message-ID: <e784f6a3-f79b-01eb-2939-95c4d66ab692@HIDDEN> Date: Wed, 26 Jun 2019 09:46:19 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <jwv1rzhwwqq.fsf-monnier+emacs@HIDDEN> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) I really don't like the solution, because it'll force people to add environments/commands they don't want to be indented and it may be long list. I may be wrong but do we need to include environments? Shouldn't they be indented by default? I guess it depends on preferences and because it costs nothing why not have it as well... but then again as you wrote (see quote below) "(...) the main distinction is whether the command is used "within a paragraph" or not (...)", so we don't really need environments. > Thinking more about it, the main distinction is whether the command > is used "within a paragraph" or not. But I don't really know how to > precisely characterize this notion of "within a paragraph". This is the main problem of this bug, i.e. how to make text "flow" better in paragraph (environments can be indented). For now we can populate variable '*-commands' with commands commonly used inside paragraph, like the one I wrote in previous message. Idea: Maybe if its at the beginning of the line and there is no text after '}' - indent? And if it has text after OR before OR is surrounded by it - noindet. This would fit for things like 'section', 'emph' would be indented as well but it would not be inside paragraph but as a separate being, so it can be indented. I didn't check other commands/env so there could be exceptions... > It seems to indent by 2 regardless of the command, just like what > you don't want. Because this is the default value, and with setq we can change it to 0. Also when I byte compiled tex-mode.el with your changes, there was a warning about unused 'x' or something like that - could it be one of 'lambda (x)' in 'defcustom latex-noindent-environments'? Also I think declarations doesn't work(1) or are mixed(2): {\small Quisque ullamcorper placerat ipsum. Cras nibh. Morbi vel justo vitae lacus tincidunt ultrices. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.} {\small\emph{Quisque ullamcorper placerat ipsum. Cras nibh. Morbi vel justo vitae lacus tincidunt ultrices.} Lorem ipsum dolor sit amet, consectetuer adipiscing elit.}
X-Loop: help-debbugs@HIDDEN Subject: bug#36358: Indentation of not matched braces in latex-mode Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 26 Jun 2019 13:51:01 +0000 Resent-Message-ID: <handler.36358.B36358.156155700628294 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 36358 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sebastian Urban <mrsebastianurban@HIDDEN> Cc: 36358 <at> debbugs.gnu.org Received: via spool by 36358-submit <at> debbugs.gnu.org id=B36358.156155700628294 (code B ref 36358); Wed, 26 Jun 2019 13:51:01 +0000 Received: (at 36358) by debbugs.gnu.org; 26 Jun 2019 13:50:06 +0000 Received: from localhost ([127.0.0.1]:34537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hg8JK-0007MH-0t for submit <at> debbugs.gnu.org; Wed, 26 Jun 2019 09:50:06 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1hg8JH-0007LY-C3 for 36358 <at> debbugs.gnu.org; Wed, 26 Jun 2019 09:50:04 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C1250100A32; Wed, 26 Jun 2019 09:49:56 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 10F90100944; Wed, 26 Jun 2019 09:49:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1561556995; bh=x7pkLWeXstdBcT/nHGXTHpyHiDYWgJ/wN2m1wD0fQsY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=E5wU2k/muqzvbZoOvAW/dJ/rHU3rLtAsiALwaAlat7MfavbWN1DlP0rhYRUPFDs5Q QaWz02wTg/oQaYUQxksPFJTrwjcnQ1gZAHlD1Q55u0CqJ5O2P8UKGYs3WzDT//g/a8 ed4DjTokDY95n54out3rnZqyJly10ybIEvk5OAOkA6txiM9UknVFMUJGX5MEHaqRfE M8poxHBRGOvvN8ElmLYTyQ+MeGLgJKbxKNFJMbJSxLNFtbFURv3FeNUagenLOZE2qD uS37dNRmxTvFnFNN6JSE7n5Jj8shjrxm1b6h0k5zc5mkE3lDJnEafSydbZ6cezc0EA ZIy8/gdiRnBZw== Received: from pastel (76-10-151-214.dsl.teksavvy.com [76.10.151.214]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D93A012020E; Wed, 26 Jun 2019 09:49:54 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwvpnn0sbw1.fsf-monnier+emacs@HIDDEN> References: <f987c496-c9f0-9645-1018-7a1f88431892@HIDDEN> <jwvpnn2sh7a.fsf-monnier+emacs@HIDDEN> <dcdde73c-fe9e-735c-5045-7c5b3bea2ec5@HIDDEN> <jwv1rzhwwqq.fsf-monnier+emacs@HIDDEN> <e784f6a3-f79b-01eb-2939-95c4d66ab692@HIDDEN> Date: Wed, 26 Jun 2019 09:49:53 -0400 In-Reply-To: <e784f6a3-f79b-01eb-2939-95c4d66ab692@HIDDEN> (Sebastian Urban's message of "Wed, 26 Jun 2019 09:46:19 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > I may be wrong but do we need to include environments? I don't understand the question. AFAIK this discussion and the patch I installed is independent from what happens to environments. > Idea: Maybe if its at the beginning of the line and there is no text > after '}' - indent? And if it has text after OR before OR is > surrounded by it - noindet. This would fit for things like 'section', > 'emph' would be indented as well but it would not be inside paragraph > but as a separate being, so it can be indented. I didn't check other > commands/env so there could be exceptions... Hmm... I can try something like that. Making indentation depend on text after the } is a bit unorthodox (we generally refrain from making indentation depend on text that comes later), but it might be worthwhile here. >> It seems to indent by 2 regardless of the command, just like what >> you don't want. > Because this is the default value, and with setq we can change it to 0. Yes, of course, but I meant that it also does it for all commands. > Also when I byte compiled tex-mode.el with your changes, there was a > warning about unused 'x' or something like that - could it be one of > 'lambda (x)' in 'defcustom latex-noindent-environments'? I believe this was fixed a few hours later by Basil. Do you still see it with the current code? > Also I think declarations doesn't work(1) or are mixed(2): > {\small Quisque ullamcorper placerat ipsum. Cras nibh. Morbi > vel justo vitae lacus tincidunt ultrices. Lorem ipsum dolor sit > amet, consectetuer adipiscing elit.} > > {\small\emph{Quisque ullamcorper placerat ipsum. Cras nibh. Morbi > vel justo vitae lacus tincidunt ultrices.} Lorem ipsum dolor sit > amet, consectetuer adipiscing elit.} Hmm... that looks wrong indeed: will have to investigate, thanks. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#36358: Indentation of not matched braces in latex-mode Resent-From: Sebastian Urban <mrsebastianurban@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 27 Jun 2019 08:54:02 +0000 Resent-Message-ID: <handler.36358.B36358.156162560215201 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 36358 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 36358 <at> debbugs.gnu.org Received: via spool by 36358-submit <at> debbugs.gnu.org id=B36358.156162560215201 (code B ref 36358); Thu, 27 Jun 2019 08:54:02 +0000 Received: (at 36358) by debbugs.gnu.org; 27 Jun 2019 08:53:22 +0000 Received: from localhost ([127.0.0.1]:37403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hgQ9h-0003x7-Vm for submit <at> debbugs.gnu.org; Thu, 27 Jun 2019 04:53:22 -0400 Received: from mail-wm1-f48.google.com ([209.85.128.48]:52323) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mrsebastianurban@HIDDEN>) id 1hgQ9g-0003wu-8Y for 36358 <at> debbugs.gnu.org; Thu, 27 Jun 2019 04:53:20 -0400 Received: by mail-wm1-f48.google.com with SMTP id s3so4884988wms.2 for <36358 <at> debbugs.gnu.org>; Thu, 27 Jun 2019 01:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=GSQVA+pQVtXuNT3nmwVbOsWAHtPAWyYVCJxt3QDPx2g=; b=M51WzyNygTxl3hpfCORwUkdlffZXnvcBTO9QjyeffpCzrqfebVR5Vziw7gXnqqXen4 XwQ76b6fxGsrQjQNhSEeoQ06yq40Ok8CpvUZQkOroPUv869AjoEHQ5JghWiES1148LsT 6t7uA03eIlwgZ7cOzWWqFcvZ89bveU6R6S2SDwT8z6a9X5puOU4CY8aQjOthiMEV7r7a FObPjL3JuQ5Otd3g+563Sa0UHXAWRP48xe/GVWWBKArY3K+xIQyFkgiIdpy7ts0LMePU 05edWEWPIyf+eMDPJa0kWo1IdOI7ox2bfbavr3E4k8+8U5bu9EAhSc6COSFXs/XSpIUo EYhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GSQVA+pQVtXuNT3nmwVbOsWAHtPAWyYVCJxt3QDPx2g=; b=b6D6srzIsbZ0TjDTFu3fp1odiGl/lGPsHTSUrulzklgjP++ZL1ojgrE8hRv+ajpueG HbjKbNlWpilsbp1wyEHvh9Fm9fg66TGk91WA7nJL/WRSovKD7rmgQGNmq2+7ynYSJmW1 WCmeXPpQQTrB39abysbyfK5Q+ekkp26f7eqvInQA/popIVhlhUVa4X7LycFT0wzS5dSS QsqJFXdFFexVl2BvUCFHmgmlZb3BSiaso+W4V2ExnI+CQGNdi5L3tUMZ//9hGUxGW+2k jH5/NTXTcfssPKp0jXjFyOe9+QfHSK/pPkJ4sNvobZeI/zA5fZ3Ca+j47oJx66Vd7AUA 73vQ== X-Gm-Message-State: APjAAAU1v2+vt6nbddTKSAMUJTHIb8zViF6ZFuTFvY8ZAfmmRGi7H7W+ rWNAfAgQaKfWw9knxbChY8wfDKBU X-Google-Smtp-Source: APXvYqxs3mpB64aml3jb0wFh1SQOa9mRPNxvYKe7F0YqjzrKfcaMOldYtGW9uTXhWbB5dVg+cL+41g== X-Received: by 2002:a1c:3c84:: with SMTP id j126mr2347917wma.102.1561625593299; Thu, 27 Jun 2019 01:53:13 -0700 (PDT) Received: from ?IPv6:2a00:f41:1815:a20a:91ed:e26b:a7bd:a138? ([2a00:f41:1815:a20a:91ed:e26b:a7bd:a138]) by smtp.gmail.com with ESMTPSA id o2sm1892315wrq.56.2019.06.27.01.53.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 01:53:12 -0700 (PDT) From: Sebastian Urban <mrsebastianurban@HIDDEN> References: <f987c496-c9f0-9645-1018-7a1f88431892@HIDDEN> <jwvpnn2sh7a.fsf-monnier+emacs@HIDDEN> <dcdde73c-fe9e-735c-5045-7c5b3bea2ec5@HIDDEN> <jwv1rzhwwqq.fsf-monnier+emacs@HIDDEN> <e784f6a3-f79b-01eb-2939-95c4d66ab692@HIDDEN> <jwvpnn0sbw1.fsf-monnier+emacs@HIDDEN> Message-ID: <cd781089-08e2-3d1c-5dac-bd6890ea2d92@HIDDEN> Date: Thu, 27 Jun 2019 10:53:12 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <jwvpnn0sbw1.fsf-monnier+emacs@HIDDEN> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > I don't understand the question. AFAIK this discussion and the > patch I installed is independent from what happens to environments. Sorry, for some reason I thought that `latex-noindent-environments' was also added in this patch. >> Idea: Maybe if its at the beginning of the line and there is no text >> after `}' - indent? > > Hmm... I can try something like that. Perhaps to solve the problem, you only need to write code for `indent' condition and put something like - otherwise => noindent. In this case there would be no need to define `noindent' as text before/after or surrounded by text - one of this would indicate that brackets are inside paragraph. This way we would made two cases: if separated => indent, if inside paragraph => noindent. Or do the opposite define `noindent' and otherwise - indent. If this would work, we wouldn't need `latex-noindent-commands'. But there are probably quite a few ``styles'' of how people write latex, so tests will be needed. > Yes, of course, but I meant that it also does it for all commands. So... this sounds like `tex-indent-basic'... maybe they limit the range somehow later in the code. > I believe this was fixed a few hours later by Basil. > Do you still see it with the current code? It's OK after the update. >> ... about declarations... > > Hmm... that looks wrong indeed: will have to investigate, thanks. The problem is that we have two constructs `\something{...}' and `{\something...}' and if I understand correctly your patch after reaching `{' moves back and compare word between `\' and `{' with the list of `latex-noindent-commands' - if match then don't indent. In case of declaration, command is after `{' not before. So, perhaps, how far it goes backward can be (already is?) limited to SPC (& perhaps beginning of the line)? Then if it won't find backward, it should look forward again to SPC (& perhaps to EOL) and compare word between `\' and SPC. Another problem may arise from nested declarations. As for them, maybe add _second_ `\' as limit? But the rest of declarations will be ignored - or simply mention this nuisance in doc string. Maybe look for second `\' compare word, then to the next one `\' and compare, until it'll find SPC instead of `\'. Currently they indent by the value of `tex-indent-basic' no mater how many of them is there. Funny thing - currently (e26.2), each nested command adds value of `tex-indent-basic' to the end value of indent, for example (setq t-i-b 2): \textbf{\textit{\textsc{hypertext links, including those to hypertext links, including those to external documents and URLs external}}} documents and URLs. However, your patch works and adding any of them to commands list will decrease indent by 2 (in this example), i.e. patch works for nested commands.
X-Loop: help-debbugs@HIDDEN Subject: bug#36358: Indentation of not matched braces in latex-mode Resent-From: Sebastian Urban <mrsebastianurban@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 29 Jun 2019 20:09:02 +0000 Resent-Message-ID: <handler.36358.B36358.156183889111968 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 36358 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 36358 <at> debbugs.gnu.org Received: via spool by 36358-submit <at> debbugs.gnu.org id=B36358.156183889111968 (code B ref 36358); Sat, 29 Jun 2019 20:09:02 +0000 Received: (at 36358) by debbugs.gnu.org; 29 Jun 2019 20:08:11 +0000 Received: from localhost ([127.0.0.1]:44940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hhJdr-00036y-Ec for submit <at> debbugs.gnu.org; Sat, 29 Jun 2019 16:08:11 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:41201) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mrsebastianurban@HIDDEN>) id 1hhJdp-00036l-TS for 36358 <at> debbugs.gnu.org; Sat, 29 Jun 2019 16:08:10 -0400 Received: by mail-wr1-f50.google.com with SMTP id c2so9637638wrm.8 for <36358 <at> debbugs.gnu.org>; Sat, 29 Jun 2019 13:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=UW2Ngp7zLfAMPzJXsWuXcRQD9hA6bRzphmnx0DKzTLg=; b=BV7cLdqmQQJ/WQKdnFfVofapJ/fcfDTPujsJ8j40p0TMQBr0T+uYjiiNOIvHkcoHTW uw39SqsVlnPi4LNrLRwvlJhA4UDFJ8xEpFIg7czb9ha1pgwVi3ctslHPfLOKMjO6aV/d 9IOJ1hmEXjFMvj+eEmyP4wAnX0T+6hPKtIpAtfw8YzVcJ4wXrUBzdXnZg0z9LEYSdXdJ OqtgMsAcB6fYBPuCFxgQ+rjHArr0Trhj70YcYGtcoeKTC36Y9TNrR4lptJEf+HNSazD0 O/lXF9+sW1eyreT+2g6gb+p1NICFWZHdcrr3MqPWSse33OyUgvIOEYy+HoJ55SIigmc2 oYkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UW2Ngp7zLfAMPzJXsWuXcRQD9hA6bRzphmnx0DKzTLg=; b=qkClP/tQWoxAnp4o7zAvmpkYNAFZifE+DGiLVWeIXKlzFnbjd7M3pDx0EhgzXcqvNL 4SmD0cPBzcSFCI0u98T1x14aA9RoahcL0ebul7Rlb6xNISqjVvrsKY5CbbRH3tJOIN/f gdiyVUvrEsbBusXB3lVhjaKp0MYvoy3vU7ScGpRL01o65VkTYb2hyRkXALEX/j9e/u5q j4rHTsR2A3N7barmPS+fabbZ7sfCjtJmJVNbxRue9EJp2FfhpYPO+7IlUQ6Q2mqap5rA GyEuxiRKFkY7nO3Rag1QnoHtcRl7RhQQ/uw6FzDPvKMh/KsXR2BxhfLgwx+LnaeJxACS FEow== X-Gm-Message-State: APjAAAWVVDujgWqmu8ycndEiaz/zTCgf9NRvmXqVdIUOV3M6Ic1bOL/e xTCptwUoWWGiAsHRvLuF9pnyCWV2 X-Google-Smtp-Source: APXvYqzvpYg33ygriqPsEkXxZS72driufH/oEGIn/tWbFEte2jONubexPHNrtow7TfrCWnERP9zthg== X-Received: by 2002:a5d:6190:: with SMTP id j16mr13124147wru.49.1561838882893; Sat, 29 Jun 2019 13:08:02 -0700 (PDT) Received: from ?IPv6:2a00:f41:1cc0:3c7f:a0b4:ad3:c35a:2d07? ([2a00:f41:1cc0:3c7f:a0b4:ad3:c35a:2d07]) by smtp.gmail.com with ESMTPSA id u25sm5938952wmc.3.2019.06.29.13.08.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Jun 2019 13:08:02 -0700 (PDT) References: <f987c496-c9f0-9645-1018-7a1f88431892@HIDDEN> <jwvpnn2sh7a.fsf-monnier+emacs@HIDDEN> <dcdde73c-fe9e-735c-5045-7c5b3bea2ec5@HIDDEN> <jwv1rzhwwqq.fsf-monnier+emacs@HIDDEN> <e784f6a3-f79b-01eb-2939-95c4d66ab692@HIDDEN> <jwvpnn0sbw1.fsf-monnier+emacs@HIDDEN> <cd781089-08e2-3d1c-5dac-bd6890ea2d92@HIDDEN> From: Sebastian Urban <mrsebastianurban@HIDDEN> Message-ID: <0ea05ff0-7260-49e1-bf10-25a94b960c28@HIDDEN> Date: Sat, 29 Jun 2019 22:08:02 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <cd781089-08e2-3d1c-5dac-bd6890ea2d92@HIDDEN> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) In the meantime I think I found better solution to setting 'tex-indent-basic' to 0. While leaving it at default value '2', I put into my init.el this: (add-hook 'tex-mode-hook (lambda () (setq fill-indent-according-to-mode nil))) aaand... everything works like I wanted. So maybe this is solution to this bug?
X-Loop: help-debbugs@HIDDEN Subject: bug#36358: Indentation of not matched braces in latex-mode Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 29 Jun 2019 21:03:02 +0000 Resent-Message-ID: <handler.36358.B36358.156184216816708 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 36358 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sebastian Urban <mrsebastianurban@HIDDEN> Cc: 36358 <at> debbugs.gnu.org Received: via spool by 36358-submit <at> debbugs.gnu.org id=B36358.156184216816708 (code B ref 36358); Sat, 29 Jun 2019 21:03:02 +0000 Received: (at 36358) by debbugs.gnu.org; 29 Jun 2019 21:02:48 +0000 Received: from localhost ([127.0.0.1]:44961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hhKUh-0004LQ-HK for submit <at> debbugs.gnu.org; Sat, 29 Jun 2019 17:02:47 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:63212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1hhKUf-0004LC-Kb for 36358 <at> debbugs.gnu.org; Sat, 29 Jun 2019 17:02:46 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 44E4E81162; Sat, 29 Jun 2019 17:02:38 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 36B7D80B53; Sat, 29 Jun 2019 17:02:37 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1561842157; bh=5lma1HtYYupCkxKjBV4A5vMJvdDZRFyfiGwZyfqzcHs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=YWJqDFKH/bgjb/sCo8BlL70/NceNLj2zgBg/POkbL0vEvqY+WC6rFpAWsIIHoMqJN InHDFbsWK347VRh42HTZ7rXnjQpB1a4i76VefBR41vg5+2DdN0Bh1oDAsP07jM6TxW u2+yxexHlMHrxLUaaeFZ91Vk1J1sXoF/jzEke8tBpAcBdiZPhorydHHTpb/9ReZJmw kRtC0Le+DBpTvyyQWE4udHNJgfWd1EzKNOEYXnQ+EX4YE2Pwy8uuuJNQa6LsnZWNvR u6hZJsMvIlq1GI1xVztbCUIi9s3sgmSwaga6CZHTr4PAgi5aQN30bpkhCCWlRZHYm9 4SglAkhlcGVJg== Received: from alfajor (76-10-151-214.dsl.teksavvy.com [76.10.151.214]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 00A551206EB; Sat, 29 Jun 2019 17:02:36 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwvmui0m7h5.fsf-monnier+emacs@HIDDEN> References: <f987c496-c9f0-9645-1018-7a1f88431892@HIDDEN> <jwvpnn2sh7a.fsf-monnier+emacs@HIDDEN> <dcdde73c-fe9e-735c-5045-7c5b3bea2ec5@HIDDEN> <jwv1rzhwwqq.fsf-monnier+emacs@HIDDEN> <e784f6a3-f79b-01eb-2939-95c4d66ab692@HIDDEN> <jwvpnn0sbw1.fsf-monnier+emacs@HIDDEN> <cd781089-08e2-3d1c-5dac-bd6890ea2d92@HIDDEN> <0ea05ff0-7260-49e1-bf10-25a94b960c28@HIDDEN> Date: Sat, 29 Jun 2019 17:02:35 -0400 In-Reply-To: <0ea05ff0-7260-49e1-bf10-25a94b960c28@HIDDEN> (Sebastian Urban's message of "Sat, 29 Jun 2019 22:08:02 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.169 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > In the meantime I think I found better solution to setting > 'tex-indent-basic' to 0. While leaving it at default value '2', I put > into my init.el this: > > (add-hook 'tex-mode-hook > (lambda () > (setq fill-indent-according-to-mode nil))) > > aaand... everything works like I wanted. So maybe this is solution > to this bug? I think it's a workaround more than a solution. If you ever hit TAB within a paragraph, you'll see the undesired indentation again. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#36358: Indentation of not matched braces in latex-mode Resent-From: "Basil L. Contovounesios" <contovob@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 05 Jul 2019 15:21:02 +0000 Resent-Message-ID: <handler.36358.B36358.156234005824842 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 36358 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sebastian Urban <mrsebastianurban@HIDDEN> Cc: 36358 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN> Received: via spool by 36358-submit <at> debbugs.gnu.org id=B36358.156234005824842 (code B ref 36358); Fri, 05 Jul 2019 15:21:02 +0000 Received: (at 36358) by debbugs.gnu.org; 5 Jul 2019 15:20:58 +0000 Received: from localhost ([127.0.0.1]:53630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hjQ1C-0006Sa-4B for submit <at> debbugs.gnu.org; Fri, 05 Jul 2019 11:20:58 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:52582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <contovob@HIDDEN>) id 1hjQ18-0006SO-QS for 36358 <at> debbugs.gnu.org; Fri, 05 Jul 2019 11:20:55 -0400 Received: by mail-wm1-f42.google.com with SMTP id s3so9422475wms.2 for <36358 <at> debbugs.gnu.org>; Fri, 05 Jul 2019 08:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=oLPnooAtVu7etS10lESMEPEHCfvd21G7L5TloapljfA=; b=R+qJSMTuTZLVzzwROH33zS2rhHspI0P6tWXCl+WaPSx5KIA6FPDmPWAkBZueDCMODK //Mom3gbzyY+xkjZv7R6wmmQZUAFBR7tIyTAoCy1SrDuRbhOg4eDHXGMTw4q0QlT9OgS x4DMI6MRv0wJbXru7EB/2m7JcSfjKPGbg2SbLd471d13rnieg8Rn750TBHpV4bHpb9XG I2WWz2J9QtYu/16GKOh2JOsXnBbFFdBSjNqWs6zGIV/UKb7870tyfq0nNb/vzZ8IEunG 12ECD4xa7bjh258pBhnV6XU9EmodsGW/+SVAdEUob4ys3pS6CORedZ88F4T4O4Z7ljK/ Qejw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=oLPnooAtVu7etS10lESMEPEHCfvd21G7L5TloapljfA=; b=EZumwyKv3dwARrifgoJkPJbG4giRH8EU4b+e/bCvzZz9Q1vXkgCJGF3Ntzr+tmHcjQ PPZHNnoA/PwLN0AAVg9OCPE079ER23CPLCx481mwP45LiQqgbhyk6D0UGK7Hu9VsG0tq 7jh1UW0kBeYuDvGIhljMivw+lQVkJy6dmM4xW/E9HDSJX2kwRr2gQEvix3vXWi0ZqleK P5OFx7hRrcPJYraDM9Z5dYB4/G5tcUErZfQCp+/5VpagUpJIjodIFBbE2VsaASJ/bIQq Lb5r3vCssx2t6MzPsCsUBbZ670t6zfKHYQhcfkERWBro5fhsejpQUu0GNG8iWtAc7Ih+ regw== X-Gm-Message-State: APjAAAVY8Ukoj/Mbc/DPBT+XueUjs8nps8bawijTla6GIfdREDlJ2ctS S9i07gfOfiP0t9fEqJVTMV4hag== X-Google-Smtp-Source: APXvYqwF0AJCYnWvHodWMClmilwrqylOdryB0XUthYHwWJz2s+sCMz86LYKGY2Up2QAjwD52KIYS4Q== X-Received: by 2002:a05:6402:1801:: with SMTP id g1mr5105686edy.262.1562340048939; Fri, 05 Jul 2019 08:20:48 -0700 (PDT) Received: from localhost (86-41-18-212-dynamic.agg3.crz.crz-crz.eircom.net. [86.41.18.212]) by smtp.gmail.com with ESMTPSA id f25sm624801edm.83.2019.07.05.08.20.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 05 Jul 2019 08:20:47 -0700 (PDT) From: "Basil L. Contovounesios" <contovob@HIDDEN> References: <f987c496-c9f0-9645-1018-7a1f88431892@HIDDEN> <jwvpnn2sh7a.fsf-monnier+emacs@HIDDEN> <dcdde73c-fe9e-735c-5045-7c5b3bea2ec5@HIDDEN> <jwv1rzhwwqq.fsf-monnier+emacs@HIDDEN> <e784f6a3-f79b-01eb-2939-95c4d66ab692@HIDDEN> <jwvpnn0sbw1.fsf-monnier+emacs@HIDDEN> <cd781089-08e2-3d1c-5dac-bd6890ea2d92@HIDDEN> <0ea05ff0-7260-49e1-bf10-25a94b960c28@HIDDEN> Date: Fri, 05 Jul 2019 16:20:41 +0100 In-Reply-To: <0ea05ff0-7260-49e1-bf10-25a94b960c28@HIDDEN> (Sebastian Urban's message of "Sat, 29 Jun 2019 22:08:02 +0200") Message-ID: <87h880mrsm.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Sebastian Urban <mrsebastianurban@HIDDEN> writes: > In the meantime I think I found better solution to setting > 'tex-indent-basic' to 0. While leaving it at default value '2', I put > into my init.el this: > > (add-hook 'tex-mode-hook > (lambda () > (setq fill-indent-according-to-mode nil))) > > aaand... everything works like I wanted. So maybe this is solution > to this bug? Note that fill-indent-according-to-mode is not automatically buffer-local, so using setq instead of setq-local changes its value globally. -- Basil
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.