bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22332: 25.0.50; woman moves point in a wrong buffer


From: martin rudalics
Subject: bug#22332: 25.0.50; woman moves point in a wrong buffer
Date: Sat, 09 Jan 2016 18:42:45 +0100

> I first tried doing that. But that still did not solve this bug (#22332).
>
> Not selecting the WoMan buffer explicitly creates this problem starting
> from these lines in the woman-find-file function:
>
>    (Man-build-section-alist) ; starting from here
>    (Man-build-references-alist)
>    (goto-char (point-min)))
>
> That's because Man-build-section-alist does (goto-char (point-min)) in
> which ever the selected buffer is.
> display-buffer does not select the buffer.. so that explicit
> switch-to-buffer call had to be put there.

Then we probably have to explicitly select the window as in

        (if buffer
            (let ((window (display-buffer buffer)))
              (when (window-live-p window)
                (select-window window)
                buffer))

> In my opinion, if we do not want to do switch-to-buffer calls in
> WoMan-find-buffer, a more elegant way would be to wrap the below lines in
> woman-find-file
>
>    (Man-build-section-alist) ; starting from here
>    (Man-build-references-alist)
>    (goto-char (point-min)))
>
> with a (with-current-buffer WOMAN-BUFFER ..) form.

We have to fix ‘WoMan-find-buffer’ because it's used elsewhere too.

martin






reply via email to

[Prev in Thread] Current Thread [Next in Thread]