How about modifying the last line of your custom diary sexp so that it becomes an and
statement that checks to ensure that the DATE is not a member
of your excluded dates?:
(and [YOUR-SEXP-RESULT-THAT-IS-NON-NIL]
(not (member DATE '((2 28 2017)
(5 1 2017)
(5 31 2017)))))
Granted, of course, you will need to modify the diary sexp every time you decide to add a custom date to be excluded. You can assign the list of excluded dates to a variable that is accessible to the sexp, if that makes things easier to add additional dates as needed ...
Here is a link to an example of a custom diary sexp that looks for the last day of every month:
https://emacs.stackexchange.com/a/31708/2287
The last line in that linked example is (= day last-day-of-month)
, which would be replaced with the snippet above -- the incoming argument of date
to the custom sexp named diary-last-day-of-month
is written in lowercase; i.e.,
(and (= day last-day-of-month)
(not (member date '((2 28 2017)
(5 1 2017)
(5 31 2017)))))