From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: srht Date: Thu, 19 May 2022 21:50:14 +0200 Message-ID: <87czg9waac.fsf@gnu.org> References: <87mtfdtk1y.fsf@posteo.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33540"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.21; emacs 29.0.50 Cc: Stefan Monnier , emacs-devel@gnu.org To: Aleksandr Vityazev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 19 22:14:36 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrmXa-0008X9-SF for ged-emacs-devel@m.gmane-mx.org; Thu, 19 May 2022 22:14:35 +0200 Original-Received: from localhost ([::1]:53942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrmXZ-0002Re-6P for ged-emacs-devel@m.gmane-mx.org; Thu, 19 May 2022 16:14:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrmWe-0001i9-6W for emacs-devel@gnu.org; Thu, 19 May 2022 16:13:36 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35660) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrmWd-00069q-Cj; Thu, 19 May 2022 16:13:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=nOi10x5+n2qeEBAqR6Id0msZzr5o+o9Vi4K1FrUsJt0=; b=o9Mb7hznFaszxz gBsphKRluEx9F7pUA9Dk3u1ge5WQdvG3ifpJuBF28VYvvVY0vPT2QP6vQSHSxxh3P/SLlss1KyDAn BktqMEvHgtQFyCMxlrqYXcmpznovMbpsM0+B+HdB+PjZi2BbV4tob0ZGIfYO/aMJ6XtzM+GwrYo2P x3LgaUxut4yKvK999VlnZEOf2hD4LXhFSk91/loiLE7ZrT/3mbMSYDpk9AjQQO5aV7dmAJiFyWmzH xqFQEr83pkPFQSrz/EMMbpokUYIkHOYlzHv9nyNfivr11idD1j1IGs6wFiync8brd/i+VZDPANZ60 IomCf8pZxCctvQWQ03+A==; Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:51577) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrmWd-0003et-5u; Thu, 19 May 2022 16:13:35 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 2719A27C0060; Thu, 19 May 2022 16:13:34 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 19 May 2022 16:13:34 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedriedugddugeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvvefuffgjkfggtgesthdtredttdertdenucfhrhhomhepvfgrshhs ihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpe dujedtheduvdelffejkeetgedvheelhedvueefhfeukeekkeehvdfggeegffevgfenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnod hmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedv leekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 May 2022 16:13:33 -0400 (EDT) In-reply-to: <87mtfdtk1y.fsf@posteo.org> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:289990 Archived-At: Aleksandr Vityazev writes: Hi Aleksandr, >> Out of curiosity, what are you planning to do? >> >> I didn't quite get Stefan's compaint to begin with. I would imagine >> one sets srht-domain on a per-project basis, i.e., in a >> .dir-locals.el file. Should the package cater for the possibility >> that a project's git is on instance 1 but the tracker on instance 2? >> Or should there just be a way to define all instances I want to >> interact with and then have an convenient switch-command? Or should >> the instance be a mandatory argument to all functions (which would >> also be ok if it's just a library providing access to the srht API) >> and packages using srht should handle the "which instance" aspect? > > Not to say that srht is a library that simply binds the Sourcehut REST > API. There are also several commands to interact with. As a solution, I > chose the latter by adding an extra mandatory argument for the > functions. The available commands use srht-domains (list of instance > domain names), where users can specify all the instances they want to > interact with. When the command is invoked, it offers instance selection > if srht-domains contains more than one. When used in conjunction with > .dir-locals.el there is little change. Sounds good. I've just wanted to give it a try. The docs of srht-username don't say wether it is with the ~ or without. I've generated a new OAuth 2.0 token and put a line in my ~/.authinfo.gpg as stated in the README, i.e.: machine sr.ht password However, when I try to use srht-paste-region I always get this error: --8<---------------cut here---------------start------------->8--- error in process sentinel: Unkown error with status 400: #s(plz-error nil #s(plz-response 2 400 ((server . "nginx") (date . "Thu, 19 May 2022 20:00:32 GMT") (content-type . "application/json") (content-length . "58") (content-security-policy . "default-src 'none'; style-src 'self' 'unsafe-inline'; img-src * data:; script-src 'self' 'unsafe-inline'")) "{\"errors\": [{\"reason\": \"Invalid or expired OAuth token\"}]}") nil) --8<---------------cut here---------------end--------------->8--- I've tried srht-username with and without tilde, I've tried using machine sr.ht login password but always got the above error... Oh, I finally made it! It seems you cannot use an OAuth 2.0 token but must use a legacy one. I'm not sure whose fault that is. I use a sr.ht OAuth 2.0 token in hut (the command line client for sr.ht) without issues. I think that uses the same REST/GraphQL APIs. Bye, Tassilo