* Bug: Activating org-mode in any buffer recenters (unrelated) selected window. [8.2.6 (release_8.2.6-6-gfc37d1 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]
@ 2014-05-14 9:59 Nicolas Richard
2014-05-15 9:12 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Richard @ 2014-05-14 9:59 UTC (permalink / raw)
To: emacs-orgmode
The function `org-overview' calls `recenter' without checking if the
current buffer is actually in the currently selected window. Moreover,
turning on org-mode calls `org-overview' (I guess depending on the
configuration). IOW, turning on org-mode programmatically (e.g. via
find-file-noselect) will recenter whatever window is currently selected.
That's unexpected.
I noticed that because I recently tried org-notify, which uses
find-file-noselect, and the behaviour was very distracting to me. (Side
question : do people live with that or is it just me seeing the weird
behaviour ?)
Anyway, I would suggest to simply remove the call to recenter because I
don't understand why it's there. OTOH if it's there for a reason, then I
suggest something along the line of:
(when (eq
(current-buffer)
(window-buffer
(selected-window)))
(recenter '(4)))
(but then, why the interactive-looking argument ?)
While I am at it, I don't quite understand why (goto-char) is used
*after* recenter (also, why not just save-excursion ?)
Since there are many things I obviously don't understand, I'm not
posting an actual patch but I can do that if someone wants it.
--
Nico.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug: Activating org-mode in any buffer recenters (unrelated) selected window. [8.2.6 (release_8.2.6-6-gfc37d1 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]
2014-05-14 9:59 Bug: Activating org-mode in any buffer recenters (unrelated) selected window. [8.2.6 (release_8.2.6-6-gfc37d1 @ /home/youngfrog/sourcetrees/org-mode/lisp/)] Nicolas Richard
@ 2014-05-15 9:12 ` Bastien
0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2014-05-15 9:12 UTC (permalink / raw)
To: Nicolas Richard; +Cc: emacs-orgmode
Hi Nicolas,
I removed the call to `recenter' and to `goto-char'.
Thanks for reporting this,
--
Bastien
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-15 9:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-14 9:59 Bug: Activating org-mode in any buffer recenters (unrelated) selected window. [8.2.6 (release_8.2.6-6-gfc37d1 @ /home/youngfrog/sourcetrees/org-mode/lisp/)] Nicolas Richard
2014-05-15 9:12 ` Bastien
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.