Subject: bug#1092: closed (Re: bug#1092: compilation-goto-error goes to wrong location when buffer has hidden regions)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 03 Jan 2016 15:27:02 +0000

Your bug report

#1092: compilation-goto-error goes to wrong location when buffer has hidden regions

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
1092: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1092
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#1092: compilation-goto-error goes to wrong location when buffer has hidden regions
From: Eli Zaretskii <[email-masked]>
To: Glenn Morris <[email-masked]>
Cc: [email-masked], [email-masked], [email-masked]
Date: Sun, 03 Jan 2016 17:25:53 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Glenn Morris <[email-masked]>
> Cc: Andrew Hyatt <[email-masked]>,  [email-masked],  [email-masked]
> Date: Sat, 02 Jan 2016 23:06:15 -0500
> 
> I'm not going to give a recipe for a bug that I marked wontfix 7 years
> ago, and which has recently been closed. If no-one cares enough to
> follow the original example, no one is going to fix it.

(There was no example in the original report, not AFAICT.)

I think Andrew just wanted to DTRT with this bug, which is
commendable, IMO.

I came up with a simple example, see below.

> Selective display is 7 years more obsolete than it was then. Let's
> move on.

I see no reason not to fix this simple bug, so I just did it.

Here's a reproducible recipe, for the record:

 . Visit the attached file
 . Replace every C-j in the commentary block with a C-m
 . M-: (setq selective-display t) RET
 . Save the buffer (note that the file on disk has its newlines
   restored by write-region -- I wonder how many people knew we had
   this feature in write-region)
 . M-x compile RET gcc -Wall -o hello hello.c RET
 . Type "C-x `" and observe the incorrect behavior: point in the
   hello.c buffer goes to the end of the buffer, and the error
   locus is not highlighted

With the current emacs-25 branch, this example works correctly.

I'm marking this bug as done (after reopening it).

>From [email-masked] Sun Oct  5 11:38:19 2008
Date: Sun, 05 Oct 2008 11:38:08 -0700
From: Peter Sanford <[email-masked]>
To: [email-masked]
Subject: compilation-goto-error goes to wrong location when buffer has hidden
 regions

I have the copyright region at the head of my files hidden using 
selective-display and ^M. When this region is hidden functions like 
compilation-goto-error jump to the wrong location: n lines below the 
correct location where n is the number of hidden lines. If I use 
goto-line and the line number reported in the compilation buffer, emacs 
takes me to the correct line.

When the region is visible everything works as expected.

found on:
GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.14.1) of 2008-09-05 
on vernadsky, modified by Ubuntu