bugEmacs so-long.el - Bugs: bug #56761, end-of-buffer makes emacs hang...

 
 

bug #56761: end-of-buffer makes emacs hang (or at least extremely slow)

Submitter:  None
Submitted:  Thu 15 Aug 2019 08:50:40 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 30 Aug 2019 01:53:29 PM UTC, comment #3: 

comment #2:

> Note also that your example filename "longlines.long" would not, by default, trigger any major mode that is targeted by `so-long-target-modes'.


Oh, forgot to say do "M-x so-long" before M->. It still hangs :)
I guess longlines was over the file size limit, try https://filepush.co/LTgk/longlines.zip

Anonymous
Sat 17 Aug 2019 01:45:05 AM UTC, comment #2: 

Note also that your example filename "longlines.long" would not, by default, trigger any major mode that is targeted by `so-long-target-modes'.

No file was attached to this issue, so I can't check to see whether there's anything in your file besides the filename to cause the use of a targeted mode; but it's possible that you didn't actually have `so-long' active in your test?

That may or may not be a significant factor here -- it is definitely still the case that Emacs performance suffers when displaying the end of an extremely long long (or any portion of the line that is an extremely large number of characters from the beginning.  However if so-long wasn't actually active, the performance problems might well be exacerbated.

Phil Sainty <psainty>
Group administrator
Thu 15 Aug 2019 11:43:47 AM UTC, comment #1: 

Yes, navigating to the end of a very long line puts us into the realm of more fundamental redisplay issues (which so-long.el can't do anything about), so I haven't considered such things to be in-scope for the library.

This isn't really about `end-of-buffer', though.  `end-of-buffer' may or may not be an issue for any given file -- if calling it does not leave the end of the long line visible, there won't be a problem.

Equally `move-end-of-line' may or may not be a problem, depending on whether point is currently on a long line.

Generally speaking, the issue could be triggered by almost any command which moves point.

We could have a stricter option which completely inhibited moving point.  That's pretty aggressive, but it would fit the current model of applying all performance-oriented changes to the buffer at the same time.

Otherwise we're perhaps talking about recognising dynamically whether or not any arbitrary command will actually leave you in a bad place, and only then taking action.

Offhand that sounds pretty complex and potentially problematic compared to what so-long currently does (which does not involve any such dynamic behaviours), so my initial reaction is that I'm not particularly keen on starting down that track.

Phil Sainty <psainty>
Group administrator
Thu 15 Aug 2019 08:50:40 AM UTC, original submission:  

I'm not sure if this is something that can be done in a third-party package, but if you save and unzip the attached file and do

$ emacs -Q -l so-long.el -f global-so-long-mode longlines.long

(and say yes to open it)

in emacs 26.2, and hit M-> (M-x end-of-buffer), emacs hangs (or it might end up at the end eventually, it's still working on it as I type).

Maybe the best so-long.el can do is issue a warning for such extremely slow functions? Or perhaps it would need its own keymap, so we avoid hanging emacs due to one mistype.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psainty (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code