Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let-bind more mode-related hooks to nil #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions elfeed-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ Return t if it does or nil if it does not."
(with-temp-buffer
(insert-file-contents org-file)
(let ((org-inhibit-startup t)
(org-mode-hook nil))
(org-mode-hook nil)
(after-change-major-mode-hook nil)
(change-major-mode-after-body-hook nil))
(org-mode))
(goto-char (point-min))
(while (and
Expand Down Expand Up @@ -191,7 +193,9 @@ all. Which in my opinion makes the process more traceable."
(with-temp-buffer
(insert-file-contents (expand-file-name file org-directory))
(let ((org-inhibit-startup t)
(org-mode-hook nil))
(org-mode-hook nil)
(after-change-major-mode-hook nil)
(change-major-mode-after-body-hook nil))
(org-mode))
(rmh-elfeed-org-cleanup-headlines
(rmh-elfeed-org-filter-relevant
Expand Down Expand Up @@ -326,7 +330,10 @@ Argument OPML-FILE filename of the OPML file."
(erase-buffer)
(insert (format "* Imported Feeds :%s:\n" rmh-elfeed-org-tree-id))
(insert content)
(let ((org-inhibit-startup t))
(let ((org-inhibit-startup t)
(org-mode-hook nil)
(after-change-major-mode-hook nil)
(change-major-mode-after-body-hook nil))
(org-mode))
(pop-to-buffer (current-buffer)))))

Expand All @@ -338,7 +345,9 @@ Argument ORG-BUFFER the buffer to write the OPML content to."
opml-body)
(with-current-buffer org-buffer
(let ((org-inhibit-startup t)
(org-mode-hook nil))
(org-mode-hook nil)
(after-change-major-mode-hook nil)
(change-major-mode-after-body-hook nil))
(org-mode))
(org-element-map (rmh-elfeed-org-import-trees
rmh-elfeed-org-tree-id) 'headline
Expand Down
Loading