unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ivan Andrus <darthandrus@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 9324@debbugs.gnu.org, antoine.levitt@gmail.com
Subject: bug#9324: 24.0.50; Movement past end of screen causes weird jump
Date: Thu, 25 Aug 2011 22:11:37 +0200	[thread overview]
Message-ID: <59F6F8C9-0263-47D2-A6CF-0C52A89AD927@gmail.com> (raw)
In-Reply-To: <83vcts48z5.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2874 bytes --]

I tried to build it with GTK, but it segfaulted, so I can't tell if it works there or not.  I was _____ able to reproduce it with the athena toolkit.

On Aug 20, 2011, at 1:29 PM, Eli Zaretskii wrote:
>> From: Ivan Andrus <darthandrus@gmail.com>
>> Date: Sat, 20 Aug 2011 09:33:31 +0200
>> Cc: antoine.levitt@gmail.com,
>> 9324@debbugs.gnu.org
>> 
>>>> emacs -Q -l ~/.emacs.d/elpa/highlight-parentheses-1.0.1/highlight-parentheses.el -l ~/.emacs.d/local/hl-sexp.el ~/vcs/emacs/bug-example-3.el
>>> 
>>> Sorry to disappoint you, but I cannot reproduce this even with this
>>> precise recipe.  I downloaded the latest hl-sexp.el and
>>> highlight-parentheses.el, and used them exactly as shown, albeit the
>>> leading directories were different, and I still cannot see the
>>> problem.  Emacs behaves as expected.
>> 
>> Aaargh!  After running the progn, do you see all of line starting with 208, or just the continuation of it.
> 
> Neither.  The top line in the window is this:
> 
>  (custom-set-faces '(mode-line ((t (:box (:line-width 1))))))
> 
> If you see something else, your frame must be much larger than mine.

Indeed and that is very important to reproducing this bug.  What is your frame size?  Actually when building with athena I couldn't get the frame big enough, so I changed the test case a little.  At the end of the day what seems important is that the first line showing be a continuation line.  Then executing the (forward-sexp) gives the buggy behavior.

> What is the value of `lpoint' after line 14682?  

NB: the line numbers have changed slightly, but these represent values after the appropriate SET_TEXT_POS etc.

(gdb) p lpoint
$1 = {
  charpos = 2461, 
  bytepos = 2461
}

> What is the value of
> `opoint' after line 14764?  

(gdb) p opoint
$2 = {
  charpos = 2461, 
  bytepos = 2461
}

> And what is the value of `startp' at line
> 14886?

(gdb) p startp
$3 = {
  charpos = 90, 
  bytepos = 90
}

This was using revision 105563, configured with
CFLAGS='-ggdb -g3' ./configure --with-x-toolkit=athena     --with-gif=no
and using a slightly different file than before (which I have attached) and debugging with

run -Q -l ~/.emacs.d/elpa/highlight-parentheses-1.0.1/highlight-parentheses.el -l ~/.emacs.d/local/hl-sexp.el ~/vcs/emacs/bug-example-3.el

Then breaking on redisplay_window and evaluating the progn block (I had to scroll to avoid a beginning of buffer error that I thought unwind-protect would take care of but didn't) and then the forward-sexp block.
I didn't even need to evaluate the mode-line change this time, probably due to the way that I ensure the first line is a continuation line.

Anyway, I hope that makes sense and helps.  If you need any other debugging output I would be happy, either in the NextStep version or the athena version (or both).

-Ivan

[-- Attachment #2: bug-example-3.el --]
[-- Type: application/octet-stream, Size: 2461 bytes --]

208. look at docs for `mouse-autoselect-window' to see if there is a better value that I should be using
209. Look at occur (C-h f occur RET) to see how to make a nice menu buffer, thing-amagig
210. make isearch ignore diactritics by default (until one is used or something)
211. use `declare-function' to silence warnings in init.el
212. Change all key bindings to C-c C-f for compiling/linting/syntax checking, C-c C-d for debugging, and C-c C-v for viewing/running
213. Make `to-do' update an org file which contains all the todos
214. Make a `find-nearby' to find 2 things within several lines
215. Make `zap-up-to-char-but-not-including' a la `zap-to-char' (maybe on S-M-z ?)
216. Use `align-regexp' with args to create `align-words' and `align-strings'

-------------------------------------------------------
(custom-set-faces '(mode-line ((t (:box (:line-width 1))))))
(progn (set-frame-parameter (selected-frame) 'height 47)
       (set-frame-parameter (selected-frame) 'width (/ 178 2))
       (delete-other-windows)
       ;; (split-window-side-by-side)
       (goto-line 22) (unwind-protect (scroll-down)) 
(scroll-up 1)       ;(recenter -22)
       (move-end-of-line 1)
       (emacs-lisp-mode) (highlight-parentheses-mode 1) (hl-sexp-mode 1) 
       )
(forward-sexp)



(defadvice server-goto-line-column (after server-visit-region.tex
                                         (line-col)
                                         activate)
 "When visiting a file from an external source, make sure that we
are not narrowed, since the external source almost certainly
uses absolute file line numbers."
 (when (string-match "_region_.tex\\'" (buffer-file-name))
   (save-excursion ;; in case we don't find the other file we at least want the right line...
     (if (re-search-backward
          "\message{ !name(\\([^)]+\\))\\(?: !offset(\\([-0-9]+\\))\\)?\\s *}" nil nil)
         (let ((file-name (match-string 1))
               (offset (match-string 2))
               (line (car (ad-get-arg 0)))
               (col (cdr (ad-get-arg 0))))
           (if offset (setq line (+ line (string-to-number offset))))
           (find-file file-name nil)
           ;; Ironic, but I think cleaner then reimplementing...
           (server-goto-line-column (cons line col))
           (message "Moved from _region_.tex to line %s of %s." line file-name))

       ;; else
       (message "This is _region_.tex, but I couldn't find the original file!")))))

  parent reply	other threads:[~2011-08-25 20:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-18 20:48 bug#9324: 24.0.50; Movement past end of screen causes weird jump Ivan Andrus
2011-08-18 21:11 ` Antoine Levitt
2011-08-19  8:25   ` Eli Zaretskii
2011-08-19  9:54     ` Ivan Andrus
2011-08-19 10:02     ` Ivan Andrus
2011-08-19 10:41       ` Eli Zaretskii
2011-08-19 16:19         ` Ivan Andrus
2011-08-19 16:51           ` Antoine Levitt
2011-08-19 17:15           ` Eli Zaretskii
2011-08-19 18:38             ` Ivan Andrus
2011-08-19 19:06               ` Eli Zaretskii
2011-08-20  7:33                 ` Ivan Andrus
2011-08-20 11:29                   ` Eli Zaretskii
     [not found]                     ` <0760243C-31D8-492E-99BE-86D87D7601F6@gmail.com>
2011-08-20 14:37                       ` Eli Zaretskii
2011-08-25 20:11                     ` Ivan Andrus [this message]
2011-08-25 20:59                       ` Antoine Levitt
2011-08-26 10:32                         ` Eli Zaretskii
2011-08-26 10:20                       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59F6F8C9-0263-47D2-A6CF-0C52A89AD927@gmail.com \
    --to=darthandrus@gmail.com \
    --cc=9324@debbugs.gnu.org \
    --cc=antoine.levitt@gmail.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).