This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun pdl-agenda () | |
"Switch to my agenda, regenerating it in the process." | |
(interactive) | |
(save-selected-window | |
(pop-to-buffer | |
(prog1 org-agenda-buffer-name | |
(if (get-buffer org-agenda-buffer-name) | |
(org-agenda-redo) | |
(org-agenda nil "a") | |
(org-agenda-day-view)))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def maybe_raise(an_exception): | |
if some_condition: | |
raise an_exception | |
try: | |
raise Exception("test 123") | |
except Exception, ex: | |
maybe_raise(ex) |