🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99522

bug in occur mode (fix incl.)

#99522
From: Jeff Norden
Date: Thu, 09 Aug 1990 01:44
31 lines
2107 bytes
The function occur-mode-goto-occurrence doesn't go the the correct place if
the point is not at the beginning of the line in the *Occur* buffer.  This
is especially annoying if you want to use a mouse to point at the line (ie
bind a mouse button so that it sets the point and then calls
occur-mode-goto-occurrence).  The following context diff fixes this:

*** replace.el-dist     Mon May  2 16:50:56 1988
--- replace.el  Tue Aug  7 00:30:37 1990
***************
*** 102,108 ****
        (setq occur-buffer nil
              occur-pos-list nil)
        (error "Buffer in which occurences were found is deleted.")))
!   (let* ((occur-number (/ (1- (count-lines (point-min) (point)))
                          (cond ((< occur-nlines 0)
                                 (- 2 occur-nlines))
                                ((> occur-nlines 0)
--- 102,109 ----
        (setq occur-buffer nil
              occur-pos-list nil)
        (error "Buffer in which occurences were found is deleted.")))
!   (let* ((occur-number (/ (- (count-lines (point-min) (point))
!                            (if (bolp) 1 2))
                          (cond ((< occur-nlines 0)
                                 (- 2 occur-nlines))
                                ((> occur-nlines 0)

This is for emacs 18.55.  If you want to install this fix, don't forget that
replace.el is pre-loaded in loaddup.el.
  -Jeff Norden, jsn3287@tntech.(argh!)bitnet
   Dept of Math, Tenn Tech Univ, Cookeville TN 38505
Technical Details
Message-ID: <9008090144.AA02581@life.ai.mit.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!MITVMA.MIT.EDU!JSN3287%TNTECH.BITNET

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,41fae8392cbe3980,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-08-09 18:08:46 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!MITVMA.MIT.EDU!JSN3287%TNTECH.BITNET
From: JSN3287%TNTECH.BITNET@MITVMA.MIT.EDU (Jeff Norden)
Newsgroups: gnu.emacs.bug
Subject: bug in occur mode (fix incl.)
Message-ID: <9008090144.AA02581@life.ai.mit.edu>
Date: 9 Aug 90 01:44:00 GMT
Sender: news@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 31
Posted: Thu Aug  9 02:44:00 1990