From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daimrod Subject: bug#17746: bug#17746: 24.4.50; "byte-code: `recenter'ing a window that does not display current-buffer." when composing a message Date: Sat, 14 Jun 2014 12:28:10 +0900 Message-ID: <87oaxw9nlh.fsf@tanger.home> References: <837g4o1x3r.fsf@gnu.org> <87r42vlavi.fsf@geodiff-mac3.ulb.ac.be> <87ha3rxx79.fsf@bzg.ath.cx> <87ppifudvd.fsf@tanger.home> <878up24k6j.fsf@yahoo.fr> <878up2ec7z.fsf@tanger.home> <874mzqeaug.fsf__22767.2755755068$1402565401$gmane$org@tanger.home> <87lht2l9vo.fsf__32258.4286136136$1402567739$gmane$org@bzg.ath.cx> <87ioo56k5h.fsf@geodiff-mac3.ulb.ac.be> <8761k46d56.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WveeS-0007R8-1s for emacs-orgmode@gnu.org; Fri, 13 Jun 2014 23:29:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WveeM-0008MP-SL for emacs-orgmode@gnu.org; Fri, 13 Jun 2014 23:29:08 -0400 In-Reply-To: Sender: "Debbugs-submit" Resent-Message-ID: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Nicolas Richard , 17746@debbugs.gnu.org, David Griffiths Bastien writes: > Nicolas Richard writes: > >> Perhaps this isn't the right place to ask, but I wonder how >> (save-excursion (set-window-start (selected-window) (window-start))) >> isn't a noop. > > Perhaps it is a noop -- The purpose of `org-fix-ellipsis-at-bol' > is to remove the ellipsis overlay that outline-mode may leave > when navigating through folded regions. At least this was the > purpose of the original version, and using recenter did the > job. I'll try to reproduce the original bug, see if the new > version of `org-fix-ellipsis-at-bol' does the job and if not, > why. In `org-fix-ellipsis-at-bol', the change wasn't : (save-excursion (set-window-start (selected-window) (window-start))) but : (save-excursion (set-window-start (selected-window) (point-min))) which is not a noop. But it does the wrong thing with isearch. When isearch is done, that is, when it has found a match and we leave isearch with RET for example. Then it calls `isearch-done' which runs `org-fix-ellipsis-at-bol' because it is in `isearch-mode-end-hook' (I didn't look to find why). Because of this, if the pattern found isn't at the top of the buffer, then the point won't be at the pattern, but at the top of the buffer. Best, -- Daimrod/Greg