Skip to content

Make sure the function pointer of 'org-switch-to-buffer-other-window' is set.#21

Open
Alexander-Miller wants to merge 1 commit into
alphapapa:masterfrom
Alexander-Miller:load-org
Open

Make sure the function pointer of 'org-switch-to-buffer-other-window' is set.#21
Alexander-Miller wants to merge 1 commit into
alphapapa:masterfrom
Alexander-Miller:load-org

Conversation

@Alexander-Miller

Copy link
Copy Markdown

If org-mode has not yet been loaded when yequake-org-capture is run it will only
be required as part of org-capture's autoload. That means that the function
pointer of org-switch-to-buffer-other-window is nil by the time the switch
happens, thus nil is also the value that will be restored by cl-letf*.

By manually loading org we make sure that the function pointer is set correctly
before the switch happens. Doing so has no impact on performance since the
org-capture autoload would do it anyway.

… is set.

If org-mode has not yet been loaded when yequake-org-capture is run it will only
be required as part of org-capture's autoload. That means that the function
pointer of org-switch-to-buffer-other-window is nil by the time the switch
happens, thus nil is also the value that will be restored by cl-letf*.

By manually loading org we make sure that the function pointer is set correctly
before the switch happens. Doing so has no impact on performance since the
org-capture autoload would do it anyway.
@alphapapa

Copy link
Copy Markdown
Owner

Thanks. I'll apply this when I work on this package again.

@alphapapa alphapapa self-assigned this Oct 6, 2020
@alphapapa alphapapa added the bug Something isn't working label Oct 6, 2020
@alphapapa alphapapa modified the milestones: 0.2, 0.1.1 Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants