Giter Site home page Giter Site logo

Do we support narrowing? about pg HOT 2 OPEN

proofgeneral avatar proofgeneral commented on May 27, 2024
Do we support narrowing?

from pg.

Comments (2)

hendriktews avatar hendriktews commented on May 27, 2024

Hi,

my elisp manual says:

-- Function: point-min
This function returns the minimum accessible value of point in the
current buffer. This is normally 1, but if narrowing is in
effect, it is the position of the start of the region that you
narrowed to. (*Note Narrowing::.)

-- Function: point-max
This function returns the maximum accessible value of point in the
current buffer. This is `(1+ (buffer-size))', unless narrowing is
in effect, in which case it is the position of the end of the
region that you narrowed to. (*Note Narrowing::.)

Hendrik

from pg.

cpitclaudel avatar cpitclaudel commented on May 27, 2024

Hi Hendrik,

Thanks, looks like we have the same Elisp manual :) But I'm not sure what you meant by quoting it...
Maybe I didn't make the problem clear; sorry about this. The issue is precisely the quote that you posted: PG seems to use (point-min) in many places where it should be using 1; unfortunately, (point-min) is not always 1.

Here's a screenshot that shows what happens when you step through code in a narrowed buffer:

screenshot from 2016-01-22 09 10 53

It's easy to reproduce this: paste the following in a Coq buffer:

Lemma A: True.
Proof.
  idtac.
  idtac.
  idtac.
  idtac.
  idtac.
  idtac.
  idtac.
  idtac.

Then select a bunch of these idtacs, run narrow-to-region, run proof-goto-point, and finally undo the narrowing with widen.

Did I miss something?

from pg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.