From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#44611: Prefix arg for xref-goto-xref Date: Wed, 17 Mar 2021 23:48:34 +0200 Message-ID: <6afd125d-4ada-cb68-dc5a-25e0e689dd21@yandex.ru> References: <87k0up68e4.fsf@mail.linkov.net> <1d9bf365-224f-bb41-d79c-e22d110b41e3@yandex.ru> <83eejgpbs8.fsf@gnu.org> <9fa9d286-4497-baa9-15cd-1ef31651781f@yandex.ru> <83a6u4p8nz.fsf@gnu.org> <3c740ee3-cc1c-e2e3-d540-7be0b37d91ef@yandex.ru> <83pn2znloa.fsf@gnu.org> <87pn2zlzy3.fsf@mail.linkov.net> <83k0t7ndbs.fsf@gnu.org> <87wnx6z1gs.fsf@mail.linkov.net> <83a6u2nm8o.fsf@gnu.org> <87eejbbfm9.fsf@mail.linkov.net> <87sg7ponct.fsf@mail.linkov.net> <6511aade-1b6d-7a82-6848-3ccba43a794c@yandex.ru> <87bldkc028.fsf@mail.linkov.net> <871rdzam7q.fsf@mail.linkov.net> <87sg4vgef6.fsf@mail.linkov.net> <88e10bd7-87cf-dd3a-c08d-cd9a8544c2b3@yandex.ru> <87y2elg1qx.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14994"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cc: joaotavora@gmail.com, 44611@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 17 22:49:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1lMe2R-0003n5-Ot for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Mar 2021 22:49:11 +0100 Original-Received: from localhost ([::1]:56238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMe2Q-0001a7-QZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Mar 2021 17:49:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMe2I-0001Ze-N0 for bug-gnu-emacs@gnu.org; Wed, 17 Mar 2021 17:49:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32811) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMe2I-0003ld-Dc for bug-gnu-emacs@gnu.org; Wed, 17 Mar 2021 17:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lMe2I-0007FR-Ce for bug-gnu-emacs@gnu.org; Wed, 17 Mar 2021 17:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Mar 2021 21:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44611 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 44611-submit@debbugs.gnu.org id=B44611.161601772727840 (code B ref 44611); Wed, 17 Mar 2021 21:49:02 +0000 Original-Received: (at 44611) by debbugs.gnu.org; 17 Mar 2021 21:48:47 +0000 Original-Received: from localhost ([127.0.0.1]:44357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMe22-0007Ey-Sb for submit@debbugs.gnu.org; Wed, 17 Mar 2021 17:48:47 -0400 Original-Received: from mail-ed1-f43.google.com ([209.85.208.43]:40637) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMe1z-0007Em-Qd for 44611@debbugs.gnu.org; Wed, 17 Mar 2021 17:48:45 -0400 Original-Received: by mail-ed1-f43.google.com with SMTP id b16so4126953eds.7 for <44611@debbugs.gnu.org>; Wed, 17 Mar 2021 14:48:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=f86kYO879zAhwKHfpYstu0nY5OVK8xYHGkPedXbQ23k=; b=VHkpuN7rjC6t0g36pEA/RIw7MFUOWKA6OqbSZAYAxv7Kcbtj3lZifJe1bj6T3YRrP0 toNqzFb/iM9J6nJD8VvQjtP9PsFYIxMG7ZkJGST7kjreTGh60V/imxckxS8bYw2PrpiC mrsywDW18t5uNlnFIb5nL/+4jupXOfaG4LjU+eB2/GsKD3yHGXTWJZEH++YG9UESLUKn OxwiO6DKoq+HNcbAly8SBjtIVoJ6pfwRMSuJ7c2rH9l6OaXm80fqksn3rmHbh/YOVABh 8euU25NeG+ivGTNngV6ZvxhsGhylgp/1TzEQiNQRcxMr7/SfDShKQc5tVue+wNyTjbry A3Zg== 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:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=f86kYO879zAhwKHfpYstu0nY5OVK8xYHGkPedXbQ23k=; b=qRoDJ8BR0uBU5u9FU33aWY5eAkaDL1ocCe7x4fGnQT5Jw0nPLBLYzGydXrDjeXJo42 2T3/FzFXu+EKtefo4TlOWzkTEoQotUL4hzCOPO8sBMDyNiJhgF7WwkNq3u0EtRxRfTsQ Pt36RC/dYywMmifusd1Wn885QgGJCty9KS3EwVT7IWQtWf305rZ7ejmo4hCwgx/FCKoM OlOtC+++Cn7qwbk9brhGPka6aGPmDgEdl3KUn8CpeE6727Qrkyk+682gwEQ5ZzjIC14h WzNf3oHPlqMc58OQycyAN6xTCDRJk2kX4ifK2nUhg+Obg/FngmPCUYCPULjdPCMGDc14 DnDw== X-Gm-Message-State: AOAM531xPsfWrUggV9Tt1hNsJ58NCjKXdTznmKk4eINncyrrH61i7y5e HuN1gIgpOsjqDFIHGvVGB64RJ3QuO+c= X-Google-Smtp-Source: ABdhPJx1gSSPIXXo3q9hUVaAzzEPhsWrrBW/3mENus1lXtGbzKYgfYrXlE814ZQ8YbseqKSVtdP4EA== X-Received: by 2002:a50:cdd1:: with SMTP id h17mr44589665edj.178.1616017717979; Wed, 17 Mar 2021 14:48:37 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id k9sm16106edn.68.2021.03.17.14.48.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Mar 2021 14:48:36 -0700 (PDT) In-Reply-To: <87y2elg1qx.fsf@mail.linkov.net> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:202539 Archived-At: On 17.03.2021 19:23, Juri Linkov wrote: >>> (defun next-error-quit-window () >>> (when (and (eq current-prefix-arg 0) >>> (not (eq next-error-last-buffer (current-buffer)))) >>> (let ((window (get-buffer-window next-error-last-buffer))) >>> (when (window-live-p window) >>> (with-selected-window window >>> (quit-restore-window window)))))) >>> (add-hook 'next-error-hook 'next-error-quit-window) >> >> Since next-error-hook is a defcustom, perhaps we can/should include this >> function as one of the advertised values in :type? >> >> Even if we keep the list nil by default. > > I completely forgot that we have 'next-error-found-function', > so implemented it with 'next-error-hook'. I don't remember > why we have both. next-error-found-function was added recently, and I guess it's handy to have FROM-BUFFER and TO-BUFFER available. I can't find any specific previous uses for it, though. > Anyway, here is a patch with corrections from Martin: LGTM.