Re: size of the slider bar
On 25 Dec 2005, at 20:06, Richard M. Stallman wrote: The length of the slider bar, the blue bar that slides inside the scroll bar track (I'm not sure about the terminology) changes randomly as you scroll up and down the text. I'm sure you know that the ratio of the length of this bar to the total length of the scroll bar must represent the ratio between the number of lines in the window to the number of lines in the file. That would take too long, for large files; he would not like this either, but he has not realized this would be the price of what he wants. I'm aware of that and I told him so. The current situation isn't as bad as it was (Carbon port), so I don't think it's a pressing problem right now (but in the long run). For Emacs 23, you may want to consider one of the following solutions: 1) Keep an index with line numbers for every 5000th character in a buffer and use the index to get a good approximate translation from char-position to line number (or char-position to pixel height count, i.e. lines x char-height) by using the index and counting the remaining few lines. The index could be updated through one mean or the other, but it's enough to keep it approximately right. This solution is likely to make sense if the slider size isn't the only thing it's good for. 2) Do not change the slider size WHILE it is being dragged, because that is confusing from an UI point of view. I think it would be less confusing to adapt it AFTER dragging. I'm sorry I can't implement either of them lacking knowledge about Emacs internals and time. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: size of the slider bar
1) Keep an index with line numbers for every 5000th character in a buffer and use the index to get a good approximate translation from char-position to line number (or char-position to pixel height count, i.e. lines x char-height) by using the index and counting the remaining few lines. The index could be updated through one mean or the other, but it's enough to keep it approximately right. [ As mentioned, counting lines is not enough, we need to count pixels. ] Note that the lines we need to count are not just separated by \n (i.e. internal lines as counted by `count-lines') but are screen lines, which depend on text-properties, on the frame's default font, on the window's width, ... so counting the total number of lines is very costly since it requires rendering the whole buffer. 2) Do not change the slider size WHILE it is being dragged, because that is confusing from an UI point of view. I think it would be less confusing to adapt it AFTER dragging. This is indeed the way to go. But note that adapting the size of the thumb after it's dragged will also adapt its position (the extreme case: your slider originally takes 10% of the whole height and you scroll to the bottom of the buffer and the last char is a large image: right before releasing the drag, the thumb will be at position 90% and size 10%, and after releasing the drag it'll be at position 99% and size 1%). Stefan ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: size of the slider bar
1) Keep an index with line numbers for every 5000th character in a buffer and use the index to get a good approximate translation from char-position to line number (or char-position to pixel height count, This might work fast enough to be usable--I guess we could try it if someone writes it. It might be painfully slow when you visit a file. 2) Do not change the slider size WHILE it is being dragged, because that is confusing from an UI point of view. I think it would be less confusing to adapt it AFTER dragging. This might cause other visible inconsistencies. For instance, the position of the top of the slider would not correspond correctly to the fraction of the buffer above the top of the window. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: Fwd: size of the slider bar
The length of the slider bar, the blue bar that slides inside the scroll bar track (I'm not sure about the terminology) changes randomly as you scroll up and down the text. I'm sure you know that the ratio of the length of this bar to the total length of the scroll bar must represent the ratio between the number of lines in the window to the number of lines in the file. That would take too long, for large files; he would not like this either, but he has not realized this would be the price of what he wants. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Fwd: size of the slider bar
We've discussed this before and I've replied to the report below already. Yet I would like to forward it to this list so people know that users are complaining about this. Begin forwarded message: From: Bardia Sadri [EMAIL PROTECTED] Date: 24 December 2005 22:53:42 GMT+01:00 To: [EMAIL PROTECTED] Subject: [Aquamacs-bugs] size of the slider bar Symptoms: This is a bug every single version of emacs on Mac OS X suffers from. The length of the slider bar, the blue bar that slides inside the scroll bar track (I'm not sure about the terminology) changes randomly as you scroll up and down the text. I'm sure you know that the ratio of the length of this bar to the total length of the scroll bar must represent the ratio between the number of lines in the window to the number of lines in the file. So, the ratio, and therefore the length of this bar, must remain the same so long as neither the number of lines in the file nor the height of the window are changed. If emacs crashed, and you have the emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /Applications/Aquamacs Emacs.app/Contents/Resources/etc/DEBUG for instructions. In GNU Emacs 22.0.50.1 (powerpc-apple-darwin7.9.0) of 2005-12-21 on rodrigues.inf.ed.ac.uk - Aquamacs Distribution 0.9.8 X server distributor `Apple Computers', version 10.4.3 configured using `configure '--without-x' '--prefix=/usr/local'' ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug