From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: Proposed changes to gnus-notifications.el Date: Sun, 21 Jul 2019 10:40:03 +0100 Message-ID: <87wogbraj0.fsf@tcd.ie> References: <87y30s5hv4.fsf@tcd.ie> <87blxnke8f.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="70551"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Julien Danjou , Lars Ingebrigtsen , emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 21 11:40:24 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hp8KN-000IDr-EZ for ged-emacs-devel@m.gmane.org; Sun, 21 Jul 2019 11:40:23 +0200 Original-Received: from localhost ([::1]:55198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hp8KL-0005cH-GQ for ged-emacs-devel@m.gmane.org; Sun, 21 Jul 2019 05:40:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46068) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hp8K8-0005UH-Hv for emacs-devel@gnu.org; Sun, 21 Jul 2019 05:40:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hp8K7-0001jA-Je for emacs-devel@gnu.org; Sun, 21 Jul 2019 05:40:08 -0400 Original-Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:33763) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hp8K7-0001iw-5y for emacs-devel@gnu.org; Sun, 21 Jul 2019 05:40:07 -0400 Original-Received: by mail-wr1-x42e.google.com with SMTP id n9so36382236wru.0 for ; Sun, 21 Jul 2019 02:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=h2WCdLW4gOkVyHf9uBPHkqnWBlTxW5bGCvO01TpI8w8=; b=AT0esotBcVDJ7AvFt9dm3SRplE6m7HzWgIFCXWr0QdweGo3CqNU1Le3JV96lcsZOyH rzX4X8I0tz7T22wgwYrRYuO9XOLYCN9vgx1in9t31AZX/L6Y+pPrHdMRjUHeHaKB34yc T7cHborFhC/jLFwX6AC8GqjrmENqdORVhbHiYe83jJEjLdqtI8C6WvUf/3YfjgUbNfSj e5cyeKQ7bq6a9Iz4XAkDM9FBOPPIK3WFmNTPhXQ64nE/9HeBpVGdCWOW9UCUeLVu5HNE /pbjlsOSZjJafEjBiNh3D1Yhh8QxACjypVb/0SHg8Fdr3Smc4yM4OegFyRyzSBjRDz0a dzYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=h2WCdLW4gOkVyHf9uBPHkqnWBlTxW5bGCvO01TpI8w8=; b=J4w2+/9CPnsOnaxikFEeY1J8mLk2a0mLOl1aDC2pzpCQpuQFjkWtxOxvwGIlwmKov9 NPD1nMVCqwxY30uW+rvv68++6KL4yxre2+Zh4txwKQwdJYkOU82jKGwLXa/7WKXHWkPf tgXFkiyFvhoQvsVslBYeDVQbZMHYRZrU0M5tg0agJfB73G94MdY3xZTTqDi4HOyzUWnp qg0IlsDvbNpHV5yse1EtNs/GBCYIXqivV8YkhG/ULg49ahaSChbyaVmsaUEivGTPLRh0 dOw9wDL71cs0OAvDYgvram4sxNWuh3CG44sEqNlXUqQI8ZvreEoo+f3rL11SmHdSbfH7 7aaw== X-Gm-Message-State: APjAAAXKjjU7OmohT+afLGGuRS5bL0H7kFYnVp6Cc4mlG7yPf5l4DaZ7 9bStlyBbtxnkdjf1CnPyYiyfrg== X-Google-Smtp-Source: APXvYqxqLMvNxnOfzAgfl8cWZcC1uI/FPHrBXqZUIRQMRxj8whb1SI8B+pqW75+DfL2giMQmiPZWDg== X-Received: by 2002:adf:db8e:: with SMTP id u14mr42513118wri.314.1563702005514; Sun, 21 Jul 2019 02:40:05 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id g10sm26208750wrw.60.2019.07.21.02.40.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 21 Jul 2019 02:40:04 -0700 (PDT) In-Reply-To: <87blxnke8f.fsf@gmx.de> (Michael Albinus's message of "Sun, 21 Jul 2019 10:01:52 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238759 Archived-At: Michael Albinus writes: > The patch seems to assume that notifications-notify works > everywhere. That's not the case, since it depends on D-Bus it runs only > for GNU/Linux systems. Thank you for pointing this out. I had wondered about it while preparing the patch but could not find a description of what happens when notifications are not supported, other than the usual "notifications-notify returns an integer ID". Does notifications-notify return nil in this case? If so, I would like to document this. If not, wouldn't this make sense? What is the best way to determine whether notifications are supported by the current Emacs instance? I skimmed through (info "(dbus) Top") and (info "(elisp) Desktop Notifications"), as well as through the syms of dbusbind.c, dbus.el, and notifications.el, but did not find any clear answers. Currently, gnus-notifications.el checks a) directly whether notifications-notify is fboundp, and b) indirectly whether notifications-notify returns nil. Even without notification support, (a) should always be true after loading the library, right? So the question is whether (b) is a sufficient condition. PS Should gnus-notifications.el be extended to support w32-notification-notify? PPS Would it be possible/welcome to provide a common interface for both notifications-notify and w32-notification-notify? At the moment it sounds like programmers need to choose between the two depending on system-type. Thanks, -- Basil