unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27692: 25.2; Indentation issue with strings in scheme mode
@ 2017-07-14 13:58 Arun Isaac
  2017-07-14 19:01 ` Alex
  0 siblings, 1 reply; 5+ messages in thread
From: Arun Isaac @ 2017-07-14 13:58 UTC (permalink / raw)
  To: 27692


I have the following text in an otherwise empty scheme mode buffer.

===file-begins-here===
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
(eiusmod tempor) incididunt ut labore et dolore (magna aliqua. Ut enim
ad)"
===file-ends-here===

I apply indent-region on the three lines, and they become:

===file-begins-here===
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
(eiusmod tempor) incididunt ut labore et dolore (magna aliqua. Ut enim
						       ad)"
===file-ends-here===

The parentheses in the string are wrongly indented as S-expressions.

However, if I have the following text in an otherwise empty scheme mode
buffer, indentation works correctly.

===file-begins-here===
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
incididunt ut labore et dolore (magna aliqua. Ut enim
ad)"
===file-ends-here===

Note that the only difference between the two text samples is the parentheses
around "eiusmod tempor". Also note that the buffer text is intended to be a
scheme string. So, the double quotes are part of the buffer text.

In GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.15)
 of 2017-06-23





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#27692: 25.2; Indentation issue with strings in scheme mode
  2017-07-14 13:58 bug#27692: 25.2; Indentation issue with strings in scheme mode Arun Isaac
@ 2017-07-14 19:01 ` Alex
  2017-07-17 12:17   ` Arun Isaac
  0 siblings, 1 reply; 5+ messages in thread
From: Alex @ 2017-07-14 19:01 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 27692

Arun Isaac <arunisaac@systemreboot.net> writes:

> I have the following text in an otherwise empty scheme mode buffer.
>
> ===file-begins-here===
> "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
> (eiusmod tempor) incididunt ut labore et dolore (magna aliqua. Ut enim
> ad)"
> ===file-ends-here===
>
> I apply indent-region on the three lines, and they become:
>
> ===file-begins-here===
> "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
> (eiusmod tempor) incididunt ut labore et dolore (magna aliqua. Ut enim
> 						       ad)"
> ===file-ends-here===
>
> The parentheses in the string are wrongly indented as S-expressions.
>
> However, if I have the following text in an otherwise empty scheme mode
> buffer, indentation works correctly.
>
> ===file-begins-here===
> "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
> incididunt ut labore et dolore (magna aliqua. Ut enim
> ad)"
> ===file-ends-here===
>
> Note that the only difference between the two text samples is the parentheses
> around "eiusmod tempor". Also note that the buffer text is intended to be a
> scheme string. So, the double quotes are part of the buffer text.
>
> In GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.15)
>  of 2017-06-23

I can also reproduce this with Emacs 25.2 in emacs-lisp-mode and
lisp-mode.

However, I can't reproduce this on an up-to-date master branch. Can you
confirm if it works correctly for you on the master branch?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#27692: 25.2; Indentation issue with strings in scheme mode
  2017-07-14 19:01 ` Alex
@ 2017-07-17 12:17   ` Arun Isaac
  2017-07-17 13:22     ` Noam Postavsky
  0 siblings, 1 reply; 5+ messages in thread
From: Arun Isaac @ 2017-07-17 12:17 UTC (permalink / raw)
  To: Alex; +Cc: 27692-done


> I can also reproduce this with Emacs 25.2 in emacs-lisp-mode and
> lisp-mode.
>
> However, I can't reproduce this on an up-to-date master branch. Can you
> confirm if it works correctly for you on the master branch?

Yes, indeed. It is working correctly on the master branch. Thanks! I am
closing this bug report.

Sorry for the somewhat late reply. I had to clone the emacs git repo,
and build it from source -- a process I have not done before.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#27692: 25.2; Indentation issue with strings in scheme mode
  2017-07-17 12:17   ` Arun Isaac
@ 2017-07-17 13:22     ` Noam Postavsky
  2017-07-18 16:51       ` Arun Isaac
  0 siblings, 1 reply; 5+ messages in thread
From: Noam Postavsky @ 2017-07-17 13:22 UTC (permalink / raw)
  To: 27692, arunisaac; +Cc: Alex

On Mon, Jul 17, 2017 at 8:17 AM, Arun Isaac <arunisaac@systemreboot.net> wrote:
>
> Yes, indeed. It is working correctly on the master branch. Thanks! I am
> closing this bug report.

By the way, the standard workaround for earlier Emacs versions is to
escape open parens in the first column, i.e.,

"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
\(eiusmod tempor) incididunt ut labore et dolore (magna aliqua. Ut enim
ad)"

Alternatively, you can try setting
open-paren-in-column-0-is-defun-start to nil, although it might cause
slower fontifying/indenting/movement in some cases.

> Sorry for the somewhat late reply. I had to clone the emacs git repo,
> and build it from source -- a process I have not done before.

3 days doesn't seem late to me, lot of bugs wait much longer (some for years!)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#27692: 25.2; Indentation issue with strings in scheme mode
  2017-07-17 13:22     ` Noam Postavsky
@ 2017-07-18 16:51       ` Arun Isaac
  0 siblings, 0 replies; 5+ messages in thread
From: Arun Isaac @ 2017-07-18 16:51 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Alex, 27692


> By the way, the standard workaround for earlier Emacs versions is to
> escape open parens in the first column, i.e.,
>
> "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
> \(eiusmod tempor) incididunt ut labore et dolore (magna aliqua. Ut enim
> ad)"
>
> Alternatively, you can try setting
> open-paren-in-column-0-is-defun-start to nil, although it might cause
> slower fontifying/indenting/movement in some cases.

I found this bug while working on the Guix project. And, the Guix
project has been working around this problem for a while.

See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27491

Finally, I reported the bug here to get a proper solution because people
at Guix felt "Emacs could do better here — especially since this is a
lisp mode!"

>> Sorry for the somewhat late reply. I had to clone the emacs git repo,
>> and build it from source -- a process I have not done before.
>
> 3 days doesn't seem late to me, lot of bugs wait much longer (some for years!)

:-)





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-18 16:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-14 13:58 bug#27692: 25.2; Indentation issue with strings in scheme mode Arun Isaac
2017-07-14 19:01 ` Alex
2017-07-17 12:17   ` Arun Isaac
2017-07-17 13:22     ` Noam Postavsky
2017-07-18 16:51       ` Arun Isaac

Code repositories for project(s) associated with this public inbox

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

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