config: replace obsolete defadvice with advice-add (Emacs 30.1)
This commit is contained in:
13
config.el
13
config.el
@@ -888,8 +888,10 @@ Skip for beamer exports — beamer uses adjustbox on plain tabular."
|
|||||||
(setq vc-ignore-dir-regexp
|
(setq vc-ignore-dir-regexp
|
||||||
(format "%s\\|%s" vc-ignore-dir-regexp tramp-file-name-regexp))
|
(format "%s\\|%s" vc-ignore-dir-regexp tramp-file-name-regexp))
|
||||||
|
|
||||||
(defadvice projectile-project-root (around ignore-remote first activate)
|
(advice-add 'projectile-project-root :around
|
||||||
(unless (file-remote-p default-directory) ad-do-it))
|
(lambda (orig-fn &rest args)
|
||||||
|
(unless (file-remote-p default-directory)
|
||||||
|
(apply orig-fn args))))
|
||||||
|
|
||||||
(setq remote-file-name-inhibit-cache nil
|
(setq remote-file-name-inhibit-cache nil
|
||||||
tramp-verbose 1)
|
tramp-verbose 1)
|
||||||
@@ -1584,13 +1586,14 @@ Skip for beamer exports — beamer uses adjustbox on plain tabular."
|
|||||||
|
|
||||||
;; Error handler: catch errors during cal->org event update
|
;; Error handler: catch errors during cal->org event update
|
||||||
;; so sync state is saved even if individual events fail
|
;; so sync state is saved even if individual events fail
|
||||||
(defadvice org-caldav-update-events-in-org (around skip-failed-events activate)
|
(advice-add 'org-caldav-update-events-in-org :around
|
||||||
|
(lambda (orig-fn &rest args)
|
||||||
"Catch errors during cal->org sync; log and return so sync state is saved."
|
"Catch errors during cal->org sync; log and return so sync state is saved."
|
||||||
(condition-case err
|
(condition-case err
|
||||||
ad-do-it
|
(apply orig-fn args)
|
||||||
(error
|
(error
|
||||||
(message "org-caldav: update-events-in-org error (sync continues): %S" err)
|
(message "org-caldav: update-events-in-org error (sync continues): %S" err)
|
||||||
(org-caldav-debug-print 1 (format "update-events-in-org error: %S" err)))))
|
(org-caldav-debug-print 1 (format "update-events-in-org error: %S" err))))))
|
||||||
|
|
||||||
(defun my/org-caldav-sync ()
|
(defun my/org-caldav-sync ()
|
||||||
"Sync 4 CalDAV calendars: Suky (twoway), Placeholders, Family, Klara (read-only)."
|
"Sync 4 CalDAV calendars: Suky (twoway), Placeholders, Family, Klara (read-only)."
|
||||||
|
|||||||
Reference in New Issue
Block a user