help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toggle appointment notification


From: pietru
Subject: Re: Toggle appointment notification
Date: Tue, 1 Dec 2020 19:35:43 +0100

There is one thing that is bugging me while testing my approach.  If I get
the state of a function, how can I then print the state in the messages
buffer?

(get 'appt-ntf-cycle 'state)




> Sent: Tuesday, December 01, 2020 at 6:03 AM
> From: "Emanuel Berg via Users list for the GNU Emacs text editor" 
> <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Toggle appointment notification
>
> >> (defun diary-appt-ntf (n)
> >>    "Switches diary appointment notification."
> >>
> >>    (appt-activate n)  ; Activates diary appointment notification
> >>
> >>    (if (< n 1)
> >>      (appt-check 1)    ; Checks appointments and updates reminders.
> >>      (appt-check nil)) ; Disables appt-check
> >> )
> >
> > Looks good [...]
>
> I mean _the Elisp_ looks good. I don't use appt so I don't know
> if what happens with `appt-check' is perhaps implied when you
> activate/inactivate appt with `appt-activate'. Read the
> docstrings and browse the code to find out, perhaps!
>
> Still, if what you do makes sense, it is nothing to worry about,
> really. Doing the right thing twice isn't a problem :)
>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]