GNU bug report logs - #43634
27.1; Wrong indentation in sieve-mode

Previous Next

Package: emacs;

Reported by: Daniel Martín <mardani29 <at> yahoo.es>

Date: Sat, 26 Sep 2020 18:30:02 UTC

Severity: normal

Tags: fixed

Found in version 27.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43634 in the body.
You can then email your comments to 43634 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#43634; Package emacs. (Sat, 26 Sep 2020 18:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Martín <mardani29 <at> yahoo.es>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 26 Sep 2020 18:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Martín <mardani29 <at> yahoo.es>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; Wrong indentation in sieve-mode
Date: Sat, 26 Sep 2020 20:29:23 +0200
Copy the following Sieve script to "sample.sieve":

if size :over 100K {
  reject "I'm sorry, I do not accept mail over 100kb in size.";
}

M-x mark-whole-buffer and indent. The closing brace is reindented in a
strange way:

if size :over 100K {
  reject "I'm sorry, I do not accept mail over 100kb in size.";
         }

As sieve-mode inherits from c-mode, putting things in parens works, but
this is not valid according to the grammar (see
https://tools.ietf.org/html/rfc5228#section-3.1):

if (size :over 100K) {
  reject "I'm sorry, I do not accept mail over 100kb in size.";
}




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43634; Package emacs. (Wed, 30 Sep 2020 03:14:02 GMT) Full text and rfc822 format available.

Message #8 received at 43634 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Daniel Martín <mardani29 <at> yahoo.es>
Cc: 43634 <at> debbugs.gnu.org
Subject: Re: bug#43634: 27.1; Wrong indentation in sieve-mode
Date: Wed, 30 Sep 2020 05:13:27 +0200
Daniel Martín <mardani29 <at> yahoo.es> writes:

> M-x mark-whole-buffer and indent. The closing brace is reindented in a
> strange way:
>
> if size :over 100K {
>   reject "I'm sorry, I do not accept mail over 100kb in size.";
>          }
>
> As sieve-mode inherits from c-mode, putting things in parens works

I guess there isn't really much in Sieve that's that C-like.  I mean,
it's {} and strings, but ...  not the whole shebang.

Do we have a simpler mode somewhere that just understands {} and strings
that Sieve mode could inhering from instead?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43634; Package emacs. (Wed, 27 Jan 2021 06:06:01 GMT) Full text and rfc822 format available.

Message #11 received at 43634 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Daniel Martín <mardani29 <at> yahoo.es>
Cc: 43634 <at> debbugs.gnu.org
Subject: Re: bug#43634: 27.1; Wrong indentation in sieve-mode
Date: Wed, 27 Jan 2021 07:05:11 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Do we have a simpler mode somewhere that just understands {} and strings
> that Sieve mode could inhering from instead?

Apparently not (except just calling smie, which didn't quite do the
right thing), so I just took an indentation function and altered it
slightly.  Fix in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 27 Jan 2021 06:06:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 43634 <at> debbugs.gnu.org and Daniel Martín <mardani29 <at> yahoo.es> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 27 Jan 2021 06:06:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 24 Feb 2021 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 61 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.