From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#46119: 28.0.50; this-error-recenter Date: Mon, 1 Feb 2021 19:45:45 +0100 (CET) Message-ID: <8242543f-d690-859a-3156-a024c8a1ae51@gmail.com> References: <8735yn1jjn.fsf@gmail.com> <87czxqbwp4.fsf@mail.linkov.net> <87im7eqxij.fsf@gmail.com> <87mtwqqose.fsf@mail.linkov.net> <87y2g9bgjc.fsf@mail.linkov.net> <87o8h5f6b9.fsf@gmail.com> <87sg6gbx4z.fsf@mail.linkov.net> <87k0rr97jj.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38883"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46119@debbugs.gnu.org, uyennhi.qm@gmail.com, Tino Calancha To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 01 19:48: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 1l6eF8-0009yS-Ay for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Feb 2021 19:48:10 +0100 Original-Received: from localhost ([::1]:35098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6eF7-0004oI-DT for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Feb 2021 13:48:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6eD6-0003Zz-Ce for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2021 13:46:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49885) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6eD3-0007F7-Qe for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2021 13:46:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l6eD3-000831-Mf for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2021 13:46:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Feb 2021 18:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46119 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 46119-submit@debbugs.gnu.org id=B46119.161220515730925 (code B ref 46119); Mon, 01 Feb 2021 18:46:01 +0000 Original-Received: (at 46119) by debbugs.gnu.org; 1 Feb 2021 18:45:57 +0000 Original-Received: from localhost ([127.0.0.1]:33198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6eCz-00082j-FX for submit@debbugs.gnu.org; Mon, 01 Feb 2021 13:45:57 -0500 Original-Received: from mail-wm1-f54.google.com ([209.85.128.54]:34178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6eCy-00082U-3c for 46119@debbugs.gnu.org; Mon, 01 Feb 2021 13:45:56 -0500 Original-Received: by mail-wm1-f54.google.com with SMTP id o10so470677wmc.1 for <46119@debbugs.gnu.org>; Mon, 01 Feb 2021 10:45:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=ETvS9gDgufAePK2M3zdt5nqMuUziFZVhID74uuwaeFE=; b=Y/DUknuYtEifW6HGdXkn13q5QJ8XnOYDCd2aUuaYr5F7J19O/US4q60ciVuUQP2cmI bThKdMZ/xz5ql7f0ejh6e2J7P94Asofq0Wwv1ojK0/dnREhmCDGdYrYuEQsflNDoHEFt c0trjah6Hvk+eX8e51HN+VjsadTpKpnDRueJqMiUW6KXq6Mxk6gKLCNLV04G+4493Djc tJu1E1VSuv32Q4rhKkbyjg1Xt7zcDn85q4caDQI9Q9l/xa6fdgo48tkFMRf4wKZjsAGM oNpFgHfUW9eU4vrjdftuDSD49MYYa+QBSF/7kmAWWgUsmf5KQ/aEx/QI1w03C6xb6Wwu DBCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=ETvS9gDgufAePK2M3zdt5nqMuUziFZVhID74uuwaeFE=; b=YghgoJcktgStWgY27Y0BbBB6nfY9MLrVfG8Iv19UOBIVsoK4ICZUcCd0pkELrqLXiH 2ZNKBobUCSrwTEb2QBQcAu6HBX69QS3bTJcF8IsTBpbtkhxanTniCNcwnISDt0+cQze+ hGaAWVaOuXA2RqKX7J5FSvrEb61vJSZf5mcWT7o4dWvl6jrAUWsVZB56UhVKRNw4KEKr BqZKv51fQE4yz+VvH4H72QEQ1rAMA0O8cT9caH/1eqQ31CIYWe0bD+bo0+2dAmNuZM9H y4XDD9Y5n5bHADcYcfS7aejOW0+n7qbjLQR5PxOfup+ENKqvwTCA9mLCM/XnftC2n6sC /n8Q== X-Gm-Message-State: AOAM533/byumGT6UAUFbX8KIOxz4XQlQBCWHAPeGAqR5OLU4LevEpKVA H4yyH25X630Ca+dD29wDMr0= X-Google-Smtp-Source: ABdhPJygJ9HM8k0iP6ZM3GslZ1ftZ5euQMNADjt+anlSVR5umU6aPvNXPvgBgLRsKClWgm2xpIBRjQ== X-Received: by 2002:a05:600c:230e:: with SMTP id 14mr199504wmo.161.1612205150227; Mon, 01 Feb 2021 10:45:50 -0800 (PST) Original-Received: from [10.200.4.109] ([31.7.242.222]) by smtp.gmail.com with ESMTPSA id f7sm7299646wre.78.2021.02.01.10.45.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Feb 2021 10:45:49 -0800 (PST) X-Google-Original-From: Tino Calancha In-Reply-To: <87k0rr97jj.fsf@mail.linkov.net> 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:199101 Archived-At: On Mon, 1 Feb 2021, Juri Linkov wrote: > Actually everything is much simpler. The hint is in the default value > of 'xref-after-jump-hook' that contains 'recenter' by default. > So when you customize 'xref-after-jump-hook' to the value: > > (recenter-top-bottom xref-pulse-momentarily) > > you can use 'C-o' to recenter another window from xref buffer, > exactly like 'C-l' does for the selected window. > > The same way you can add: > > (add-hook 'next-error-hook 'recenter-top-bottom) > > then use 'C-o' in any next-error capable buffer (compilation, occur, ...) > to recenter its corresponding window exactly like you want. Thank you, that's nice. I still see superior adding a new command for 2 resons. - I like to provide the binding by default to the users; same as we do with `n' or `p' to navigate the matches without selecting the buffer. It is quite convenient. - The hook above doesn't accept a prefix. With the original proposal I can do: 2 l ; scroll the current displayed match at the second line. This become handy when you want to inspect the context of the match.