Org-mode mailing list
 help / color / mirror / Atom feed
* Bug: org-agenda-later scrolls buffer unnecessarily [9.4 (9.4-7-g3eccc5-elpaplus @ /home/gustavo/.emacs.d/elpa/org-plus-contrib-20200921/)]
@ 2020-09-21 21:53 Gustavo Barros
  2021-05-03 20:31 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Gustavo Barros @ 2020-09-21 21:53 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi All,

since some time I've been facing a small annoyance in the agenda, as 
when I move point in my weekly agenda to a day which is not the first 
one display and then hit "f" (`org-agenda-later') the agenda buffer is 
scrolled up, hiding the top of the buffer, even though there is no lack 
of space in the frame to fit the whole window.

This is not something that started after the most recent release, I had 
been observing this previously.  But I thought I might have missed some 
fix, and waited to see if the issue was still up after the release came. 
And it is.  I'd say since a couple of weeks, but it is easy to be 
tricked by memory in these cases, and it might be more.

I did some bisecting to be able to come up with a proper ECM, and it 
turned out to boil down to the interaction between my 
`scroll-conservatively' setting, and a combination in 
`org-agenda-custom-commands' of two agendas with different time spans 
(one weekly, the other daily).

An ECM to reproduce the issue is:

- Start 'emacs -Q'

- Do an initial setup:
  #+begin_src emacs-lisp
  (add-to-list 'load-path "~/.emacs.d/elpa/org-plus-contrib-20200921")
  ;; Latest Org weekly build (Org 9.4)

  (setq scroll-conservatively 10000)

  ;; Not essential to reproduce, but included just to emphasize there is 
  no lack
  ;; of space to trigger the scrolling.
  (setq org-agenda-window-setup 'only-window)

  (setq org-agenda-custom-commands
        '(("w" "Agenda"
           ((agenda ""
                    ((org-agenda-overriding-header "Agenda (Week)")))
            (agenda ""
                    ((org-agenda-overriding-header "Habits (Day)")
                     (org-agenda-span 'day)))))))

Now, open this agenda with "M-x org-agenda RET w", move point to a day 
further down the first agenda block (e.g. today is Monday, go to 
Saturday).  Call `org-agenda-later' ("f") and observe the buffer was 
scrolled up so that the day of the week you were before is now made the 
first line of the buffer, and the previous ones are hidden.

As these kinds of scrolling settings interactions might be somewhat 
tricky to reproduce, I attach a couple of screenshots of the resulting 
situation before and after calling `org-agenda-later' as described in 
the ECM.

Best regards,

Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 
3.24.20, cairo version 1.16.0)
 of 2020-08-11
Package: Org mode version 9.4 (9.4-7-g3eccc5-elpaplus @ 

current state:
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-link-shell-confirm-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
		   [add-hook change-major-mode-hook org-show-all append 
		 #[0 "\300\301\302\303\304$\207"
		   [add-hook change-major-mode-hook 
		    append local]
		 org-babel-result-hide-spec org-babel-hide-all-hashes
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 
 "\n\n(fn ENTRY)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
 org-agenda-loop-over-headlines-in-active-region nil
 org-src-lang-modes '(("arduino" . arduino) ("redis" . redis) ("php" 
 . php)
		      ("C" . c) ("C++" . c++) ("asymptote" . asy)
		      ("bash" . sh) ("beamer" . latex) ("calc" 
		      . fundamental)
		      ("cpp" . c++) ("ditaa" . artist) ("dot" 
		      . fundamental)
		      ("elisp" . emacs-lisp) ("ocaml" . tuareg)
		      ("screen" . shell-script) ("shell" . sh)
		      ("sqlite" . sql))
 org-occur-hook '(org-first-headline-recenter)
 org-agenda-window-setup 'only-window
 org-cycle-hook '(org-cycle-hide-archived-subtrees 
 org-speed-command-hook '(org-speed-command-activate
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("attachment" :follow org-attach-follow :complete
		       ("id" :follow org-id-open)
		       ("eww" :follow org-eww-open :store 
		       ("rmail" :follow org-rmail-open :store
		       ("mhe" :follow org-mhe-open :store 
		       ("irc" :follow org-irc-visit :store 
			:export org-irc-export)
		       ("info" :follow org-info-open :export 
			:store org-info-store-link)
		       ("gnus" :follow org-gnus-open :store
		       ("docview" :follow org-docview-open :export
			org-docview-export :store 
		       ("bibtex" :follow org-bibtex-open :store
		       ("bbdb" :follow org-bbdb-open :export 
			:complete org-bbdb-complete-link :store
		       ("w3m" :store org-w3m-store-link) ("file+sys")
		       ("file+emacs") ("shell" :follow 
		       ("news" :follow
			#[514 "\301\300\302Q\"\207"
			  ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"]
		       ("mailto" :follow
			#[514 "\301\300\302Q\"\207"
			  ["mailto" browse-url ":"] 6 "\n\n(fn URL 
		       ("https" :follow
			#[514 "\301\300\302Q\"\207"
			  ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"]
		       ("http" :follow
			#[514 "\301\300\302Q\"\207"
			  ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"]
		       ("ftp" :follow
			#[514 "\301\300\302Q\"\207" ["ftp" browse-url 
			  6 "\n\n(fn URL ARG)"]
		       ("help" :follow org-link--open-help)
		       ("file" :complete org-link-complete-file)
		       ("elisp" :follow org-link--open-elisp)
		       ("doi" :follow org-link--open-doi))
 org-link-elisp-confirm-function 'yes-or-no-p
 org-agenda-custom-commands '(("w" "Agenda"
			       ((agenda ""
				   "Agenda (Week)")
				(agenda ""
				 ((org-agenda-overriding-header "Habits 
				  (org-agenda-span 'day))

[-- Attachment #2: before.png --]
[-- Type: image/png, Size: 43444 bytes --]

[-- Attachment #3: after.png --]
[-- Type: image/png, Size: 32654 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-05-03 23:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 21:53 Bug: org-agenda-later scrolls buffer unnecessarily [9.4 (9.4-7-g3eccc5-elpaplus @ /home/gustavo/.emacs.d/elpa/org-plus-contrib-20200921/)] Gustavo Barros
2021-05-03 20:31 ` Bastien
2021-05-03 21:47   ` Gustavo Barros
2021-05-03 22:26     ` Bastien
2021-05-03 22:47       ` Gustavo Barros

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ \
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:

AGPL code for this site: git clone