From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: RFC: Automatic setup for bug-reference-mode Date: Sun, 14 Jun 2020 23:51:21 +0300 Message-ID: <401bed41-3eb1-3049-2037-a9f2b8ac385c@yandex.ru> References: <87r1uihtsu.fsf@gnu.org> <87h7vd3cbs.fsf@gnu.org> <87tuzdsj8d.fsf@gnu.org> <87tuzd755z.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="124732"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 14 22:52:01 2020 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 1jkZbl-000WKG-TS for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Jun 2020 22:52:01 +0200 Original-Received: from localhost ([::1]:60294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jkZbk-0005mx-UA for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Jun 2020 16:52:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkZbD-0005MQ-Hl for emacs-devel@gnu.org; Sun, 14 Jun 2020 16:51:27 -0400 Original-Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:39268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jkZbB-0002FC-P6 for emacs-devel@gnu.org; Sun, 14 Jun 2020 16:51:27 -0400 Original-Received: by mail-wm1-x333.google.com with SMTP id o8so3223702wmh.4 for ; Sun, 14 Jun 2020 13:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=9RzbZ3T+GONfTLPyCbqckIyD+nDB8fWDXOU3HV2YGuE=; b=uo2fQSGiFrolal+vgah2MkK0pl5KkSEicMLp5apY2hoZ+iW9R49HGIkKVNuiAf21c0 JFyiTlhtuT4eSF1JjWmisUwN1UKu/gCJAbAlcmF7jbv+2nsiOImmsD1rN8QblUBMhd1L 5DI/ATULdc5AHxI8qQ+/JYiPWnFwlmN70FtJ++PaLGEBAfEpKMcqhR5AD0EnHV+zygYo B3KakDWjSX4ApUO8Q4v/e05p7BpC1HqGPaOIywrVMTPN61wIpadWPcDDS87jeYEZUUIe WJOIoIPmXfO1pd5D1ar79nrd6oFyaGiZUe3hMgYPvlIe0Go7LP2qScrJBf2k0l4Ej+ak 0Ewg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9RzbZ3T+GONfTLPyCbqckIyD+nDB8fWDXOU3HV2YGuE=; b=ICek7EcpvTHmd+jaAXPWtYZHhVoV2iW58i0yBSJrFbi4G1RbavUo7GXG870eYZHpPI B0BoGM2q1cZHMON/wudBkZqfKvhrSAekXri+9eOWBW7LEvoIgckZGJ88wZcFUvyTjaEq SCvFxSIu3Iwzhfq/BgtjjuZ3y5b+zN2dwM95EUpDty8ErwCvCTQzVrEIV/0OD3ucY6jk UQc45Da/Ia9z0DMfiKrI3ujtDPq2fIL+XgYXrQ/Vi/sBbeVpuJulOrKdwUEoRGkWzPwQ KEOM+RS2vYweEni2KUqHI+r4r2UnitRRDQauwC1axA1E/34e2bkphFFE1EXoUElmyoV1 zMVQ== X-Gm-Message-State: AOAM5339JbG+CK4h0/AnSy7sGU2lhWddV0mDhRFwXxi3bgx2Xtg9k9FU DNtj+A7vJAS0jImDr1TgDcyh4wn4 X-Google-Smtp-Source: ABdhPJy7Q/wgjGiRajJnrdswqHL47CmxCCNe6zXVpIzlaUXDM6QPOLtoqQ+o91F46WWwa9MEyR+4Zg== X-Received: by 2002:a7b:cb91:: with SMTP id m17mr10108867wmi.126.1592167883476; Sun, 14 Jun 2020 13:51:23 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id y5sm22141071wrs.63.2020.06.14.13.51.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Jun 2020 13:51:22 -0700 (PDT) In-Reply-To: <87tuzd755z.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=raaahh@gmail.com; helo=mail-wm1-x333.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:252250 Archived-At: On 14.06.2020 23:39, Tassilo Horn wrote: > Actually, "git ls-remote --get-url" doesn't work satisfactory which I > noticed after committing above change on a new local branch. In that > case, it returned "." so I've changed to this version > > (defun vc-git-repository-url (file-or-dir) > (let ((default-directory (vc-git-root file-or-dir))) > (with-temp-buffer > (vc-git-command (current-buffer) 0 nil "remote" "get-url" "origin") > (buffer-substring-no-properties (point-min) (1- (point-max)))))) > > where I explicitly name the remote "origin" (which, I know, doesn't need > to exist but still works in 99% of all cases). Sounds good! If the new version can be used in vc-git-dir-extra-headers, could you please make it so? That aside, I was going to ask whether the new backend method should take a "remote-name" argument, but I don't know how many backends support different remotes. Or what other actual code is going to use this method anyway.