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: Sat, 30 Jan 2021 21:41:30 +0100 (CET) Message-ID: References: <8735yn1jjn.fsf@gmail.com> <87czxqbwp4.fsf@mail.linkov.net> <87im7eqxij.fsf@gmail.com> <87mtwqqose.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="9662"; 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 Sat Jan 30 21:42:10 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 1l5x4M-0002QG-32 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Jan 2021 21:42:10 +0100 Original-Received: from localhost ([::1]:42674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5x4L-0007Pa-2c for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Jan 2021 15:42:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5x4E-0007PQ-M8 for bug-gnu-emacs@gnu.org; Sat, 30 Jan 2021 15:42:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44336) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5x4E-0008Pg-Dx for bug-gnu-emacs@gnu.org; Sat, 30 Jan 2021 15:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l5x4E-0006Jd-CN for bug-gnu-emacs@gnu.org; Sat, 30 Jan 2021 15:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Jan 2021 20:42:02 +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.161203930524254 (code B ref 46119); Sat, 30 Jan 2021 20:42:02 +0000 Original-Received: (at 46119) by debbugs.gnu.org; 30 Jan 2021 20:41:45 +0000 Original-Received: from localhost ([127.0.0.1]:55882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5x3x-0006J6-Dx for submit@debbugs.gnu.org; Sat, 30 Jan 2021 15:41:45 -0500 Original-Received: from mail-wr1-f48.google.com ([209.85.221.48]:34091) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5x3u-0006It-NU for 46119@debbugs.gnu.org; Sat, 30 Jan 2021 15:41:44 -0500 Original-Received: by mail-wr1-f48.google.com with SMTP id g10so12403960wrx.1 for <46119@debbugs.gnu.org>; Sat, 30 Jan 2021 12:41:42 -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=yzyIwisQEfgjFnoUfdkbvKxhjTIzXYxY7t4jbd/vcU8=; b=aARLcZCd/J/mjk5R8U3cKeOT5bDdWcAVv1CRvci/nVQhGQfF0gyXJdOi9KZA17xgNk i53Jv91PGYhuk0s9qvtXWuGZQ7c72/QxSCH5uDMokBJggYUilODk2NDrybXWy/VEcBlw dRrI7q14OaIx8MKQH/hflUn3ISue78lJbB+YzVxCyMMw3QuucSNFnutZGJ/S5EM89npR VBGVFMoQzPJIVz30ZGlQhBlBUABBxzPD4nknCMaCIT/mzdWY408nDuwsclPC+cwiuxLs HMydI5NRTaecsixvh+TkgTyILG40f8CjVQp7ZVPyrOX7XFCD91Wd2TKvL4OIw6ioog5S t8bQ== 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=yzyIwisQEfgjFnoUfdkbvKxhjTIzXYxY7t4jbd/vcU8=; b=cxb4tPEOWqX4FRg0Bi7bWfxEmozRcWAhmPzlmKGPBkGwDlxmh/LARSj1QrhB5kPTXP aa5THOrHSbT4Pw7y1oqdzo5+BGyu4exmT0eMrbLp5Ue9TsybbYDIGzyU5WBJ1JUsgd9a i1vIf4OnIjsi983Jw2BCWzXPoeFFNY57i+0MaO6DgFLBBc3wc+nxe45C0GHrEaumnbF8 owqyal8HydiZ/OarMljMViSUOOJGLXE/TI2anveIX/Ifw4LAmsWOITaXxbXm9fAaOYsM ISusxPU0pTniXKew8Y8nljfEV2gquCq9dftEl+kIIu7yuInls4yIRnm9i54xpQ3+RDU0 8/Ow== X-Gm-Message-State: AOAM531jmY5tIYScJjvguZAY2dskYr/XMLsUFGNdKyehsBqyMgHGSaIP Gt+8NvpChdrib1cfe+MgakQ= X-Google-Smtp-Source: ABdhPJxhzjSk8Ytr2T7TD4ai7ucrSKIaR2hq0bXvn3skcuSkySWEIzg+JjjaOSrL4QGeEkU4lCTLSw== X-Received: by 2002:adf:ffcd:: with SMTP id x13mr10993017wrs.149.1612039296861; Sat, 30 Jan 2021 12:41:36 -0800 (PST) Original-Received: from [10.200.4.109] ([31.7.242.222]) by smtp.gmail.com with ESMTPSA id y14sm19299682wro.58.2021.01.30.12.41.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 12:41:36 -0800 (PST) X-Google-Original-From: Tino Calancha In-Reply-To: <87mtwqqose.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:198967 Archived-At: On Sat, 30 Jan 2021, Juri Linkov wrote: > Like the existing command scroll-other-window-down bound to 'S-C-M-v', > a new command could be named recenter-other-window bound to 'S-C-l'. I like that. >> (defun this-error-recenter (&optional arg) >> "Recenter the current displayed error in the `next-error' buffer. >> If called not from a `next-error' buffer, then it just calls >> `recenter-top-bottom' in the other window." >> (interactive "P") >> (if (not (or (eq major-mode 'occur-mode) (derived-mode-p 'compilation-mode))) >> (with-selected-window (other-window-for-scrolling) (recenter-top-bottom arg)) >> (funcall next-error-function 0 nil) >> (recenter-top-bottom arg) >> (pop-to-buffer next-error-last-buffer))) > > But then no special case is needed for occur/compilation-mode. I expected someone will ask that; I should write my reason in the previous email: I like to see the pulse highlight, as with `next-error-no-select', that's why I call `next-error-function' here. [I customize `next-error-highlight' and `next-error-highlight-no-select' to 3 s]