- edited description
Random blank buffer (2)
This issue, described by another user, was marked as resolved but I also have this problem:
Blank buffers randomly appears instead of questions, with the vertical scrollbar locked at the bottom of the page... Resizing the emacs window makes the buffer go back to normal and shows the question.
(After resizing, emacs tells me: Buffer spanish.org has shrunk a lot; auto save disabled in that buffer until next real save...)
Then if I press a key, I'm asked to rate my answer but the solution doesn't show up.
GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0) + org-8.3.1 + lastest org-drill Clean .emacs file (no other packages)
Comments (28)
-
Jon B reporter
-
Jon B reporter
- edited description
-
Jon B reporter
- edited description
-
Jon B reporter
- edited description
-
Jon B reporter
- edited description
-
Jon B reporter
- edited description
-
Jon B reporter
Switched to org-8.2.1 everythings looks fine... Seem to be org-mode related problem...
-
Jon B reporter
- changed status to open
-
Paul Sexton repo owner
I tried once again to reproduce this, using:
- GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)
- Org mode 8.3 beta (2015-7-25)
- Latest org-drill
- Otherwise clean .emacs
And I simply cannot. spanish.org works fine for me on multiple runs. Resizing the frame during drill sessions behaves normally.
Sorry, but I think you must have found a bug with either org mode or Emacs. I don't have any other explanation.
-
Jon B reporter
I will send a bug report to Org-mode devellopers, in the hope it could help...
Org-mode 8.2.1 +Latest org-drill is working fine for me.
Now, time to experiment with org-drill!
Many thanks for your work and your feedback.
-
Andre Peric Tavares
I get the same problem using Spacemacs (Org 8.3.2, latest org-drill) and on a fresh Emacs installation on Lubuntu (after adding org-plus-contrib).
Hopefully org-mode devs will have a look into that.
-
Андрей Гулин
I have the same problem.
- archlinux
- emacs 25.0.50.1 (from git)
- org-mode 8.3.2 (2015-10-05)
- org-drill from org-plus-contrib (2015-10-05)
-
Naibaf_Regeir
This workaround described at https://www.mail-archive.com/emacs-orgmode%40gnu.org/msg95823.html solved the problem for me (Debian Jessie; Emacs 25.0.50 (from londo.ganneff.de); org-drill from org-plus-contrib (2015-11-16)):
- in org.el, comment out the line "(set-window-start nil window-start)"
- byte-compile org.el
-
Андрей Гулин
Thank you so much. It works
-
Keith Amidon
I added an update to issue
#28before realizing this follow-up was still open and finding the advice here. The workaround appears to work for me and without ill effects on org files with latex fragments, even org-drill ones. -
Joe Schafer
I made a function to automatically patch org.el based on @Naibaf_Regeir's fix. I made it because when I update org-mode, the fix is overwritten.
(defun my:work-around-org-window-drill-bug () "Comment out a troublesome line in `org-toggle-latex-fragment'. See https://bitbucket.org/eeeickythump/org-drill/issues/30 for details." (save-excursion (let ((org-library-location (concat (locate-library "org" 'nosuffix) ".el"))) (with-current-buffer (find-file-noselect org-library-location) (goto-char (point-min)) (search-forward "(set-window-start nil window-start)") (back-to-indentation) (if (looking-at ";; ") (message "Already modified `org-toggle-latex-fragment' for `org-drill'") (insert ";; ") (save-buffer) (byte-compile-file org-library-location) (elisp--eval-defun) (message "Modified `org-toggle-latex-fragment' for `org-drill'"))))))
-
coyotespike
Joe and Naibaf, thanks for that function. For some reason my Emacs displayed an error for
elisp--eval-defun. I raneval-bufferin a scratch buffer on(message (concat (locate-library "org" 'nosuffix) ".el")))to find the right directory, theneval-bufferon org.el. Then it worked. -
Joe Schafer
What emacs version are you running?
elisp--eval-defunwas added in this commit Emacs 36cfa908 in September 2014. I'm running Emacs nightly, but based on the date it should be in Emacs 24.5 -
coyotespike
Ah, that makes sense - I'm running Emacs 24.3.1. Maybe I'll update. :-)
-
Paul Sexton repo owner
The following replaces an internal org-drill function. It attempts to undo the effects of the offending line in org.el by saving and then restoring the window-start position. You will need to ensure it is evaluated after org-drill is loaded, e.g. by putting it in your .emacs file. Try it and see if it solves the problem. Be warned, at least for me
window-startis a slow function, taking several seconds to return, so this may slow down your drill sessions.(defun org-drill--show-latex-fragments () (org-remove-latex-fragment-image-overlays) (cond ((fboundp 'org-toggle-latex-fragment) (let ((wstart (window-start nil))) (org-toggle-latex-fragment '(4)) ;; Workaround for a display bug in org-toggle-latex-fragment (set-window-start nil wstart))) (t (org-preview-latex-fragment '(4)))))
-
Joe Schafer
Paul, that code works for two cards and displays a blank buffer. Even with using the fix of commenting out
(set-window-startin org-toggle-latex-fragments that code doesn't work for me. I had to re-eval the original 'org-drill--show-latex-fragments` to get it working again.An alternate approach could be to advise org-toggle-latex-fragment so set-window-start is a noop.
Also, anyone talked to the org-mode devs about this issue? Would they be willing to fix it upstream.
-
Philipp Middendorf
This is sort of an unusual fix for this, but couldn't we add a user-customizable variable telling org-drill not to call toggle-latex-fragment (and toggle inline images) when the drill starts? You could toggle those manually (or you do that automatically, anyway) before starting the drill.
-
allan bailey
I tried the above code fix on fedora23, x86_64, emacs 24.5.1, org-mode 8.3.3. The below 3 card t.org file I tested with seems to consistently always blank on the 1st card.
* my notes ** 1st subheading *** something :drill: this is some text about something. **** Answer this is the answer to 'something' ** 2nd subheading *** something2 :drill: this is some text about something2. **** Answer this is the answer to 'something2' ** 3rd subheading *** something3 :drill: this is some text about something3. **** Answer this is the answer to 'something3' -
Paul Sexton repo owner
Issue
#42was marked as a duplicate of this issue. -
Evgeny
If I understand correct I need add this code:
(defun org-drill--show-latex-fragments () (org-remove-latex-fragment-image-overlays) (cond ((fboundp 'org-toggle-latex-fragment) (let ((wstart (window-start nil))) (org-toggle-latex-fragment '(4)) ;; Workaround for a display bug in org-toggle-latex-fragment (set-window-start nil wstart))) (t (org-preview-latex-fragment '(4)))))
after this code in my .emacs file:
'(progn (add-to-list 'load-path "~/Dropbox/Orgzly/org-drill/") (require 'org-drill)))
For me this not help. Or I misunderstood what you need to do?
-
caadar
I tried to fix the bug as mentioned above on 24.5.1 without success.
Emacs 25.1.50 is free of this bug, but much less stable though.
-
Paul Sexton repo owner
If more recent versions of Emacs do not exhibit this bug, then it seems like this must be a display bug in Emacs. Anyone suffering from it should try using a later version of Emacs.
-
Paul Sexton repo owner
- changed status to closed
- edited description
- Log in to comment