From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with the line number from the minibuffer Date: Sat, 19 Sep 2020 14:10:55 -0700 (PDT) Message-ID: <03fd834c-9305-4cc8-b0d3-a52992babae6@default> References: <<>> <<<877dspmzo3.fsf@gnus.org>>> <<>> <<<28534d1c-6652-4cfe-acb4-f0a30624f878@default>>> <<<83tuvt1qwq.fsf@gnu.org>>> <<1cfba469-3adf-4287-a1fa-647e4e5e83e2@default>> <<83pn6h1pie.fsf@gnu.org>> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38672"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, dmoncayo@gmail.com, 9917@debbugs.gnu.org, monnier@iro.umontreal.ca, 5042@debbugs.gnu.org To: Eli Zaretskii , Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 19 23:12:27 2020 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 1kJk9j-0009wr-Ex for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Sep 2020 23:12:27 +0200 Original-Received: from localhost ([::1]:39078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJk9i-00034T-Hp for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Sep 2020 17:12:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJk9M-00032B-Ou for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 17:12:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36706) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kJk9K-0000vM-HU for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 17:12:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kJk9K-00037b-Cg for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 17:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Sep 2020 21:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5042 X-GNU-PR-Package: emacs Original-Received: via spool by 5042-submit@debbugs.gnu.org id=B5042.160054987111928 (code B ref 5042); Sat, 19 Sep 2020 21:12:02 +0000 Original-Received: (at 5042) by debbugs.gnu.org; 19 Sep 2020 21:11:11 +0000 Original-Received: from localhost ([127.0.0.1]:48250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJk8V-00036J-4B for submit@debbugs.gnu.org; Sat, 19 Sep 2020 17:11:11 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:47976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJk8Q-00035i-Ry; Sat, 19 Sep 2020 17:11:09 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08JLARaJ057533; Sat, 19 Sep 2020 21:11:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=P2VyYjUKs3jYtOx0YTGKxBHXGBNVP1jAhJvhZoAXtmc=; b=C6nM3ZUvCXjoR4CiWTR6NXRzr8EK8ZveIMw1HfDlMPk47NH4Sb5G+XJQKNM/Q8FPSexq RQk8NsMgKMAaFkjZuvUURc5w/6+7m73e32xecX5iFpRf3pN1yvngOlqtEO8EPcZMXbyd BUWzWqruk2jcx60AFoUv6LipUV95E48IYJxPx4c9JOP2pAZs7fB53QdpuW7Tko94qVXV gWodDNpObGWa1T7xyjorBiRbqI04pAkjJ2mcx7FhYGthM+pysZPUxPQAw5p8ECEfv2IH bNZzZk5MmlJI407LF4jJU4j4+gJ7/TwJjY79fnWqL336yYvTIMpdTrg7cjx41Qi7V84v Vw== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 33n9dqscyn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 19 Sep 2020 21:11:01 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08JLADFv126000; Sat, 19 Sep 2020 21:11:00 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 33n9ah15g1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 19 Sep 2020 21:11:00 +0000 Original-Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08JLAuIL006532; Sat, 19 Sep 2020 21:10:56 GMT In-Reply-To: <<83pn6h1pie.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5056.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9749 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 suspectscore=0 adultscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009190189 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9749 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 phishscore=0 priorityscore=1501 malwarescore=0 mlxscore=0 impostorscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009190189 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:188438 Archived-At: > > My point is that a user can want _either_ behavior, > > and there's no way to know which behavior is wanted > > at any given moment, in any given buffer, whether > > narrowed or not. > > > > IMO, we need either two different commands (& keys) > > or a command with different prefix-arg behaviors. >=20 > I suggested the former up-thread (and thought that your response meant > you are unhappy about that for some reason). Different prefix-arg > behaviors would be tricky in this case, I think, because goto-line > accepts a numeric argument already. >From the outset (and typically), I've been for users being able to specify the behavior they want, either on the fly or (if it makes sense) by option. In the bug #9917 thread I suggested this (in 2011): > > when someone says "see the line 42 in window.c" > > then `goto-line' should visit by the absolute line number, > > ignoring any narrowing in effect. But when someone says > > "see the line 42 in the Info node" then it should be relative > > to the node's beginning. >=20 > For `goto-line': >=20 > Let a negative prefix arg use line numbering wrt the > restriction (region), and let a positive prefix arg > use line numbering wrt the buffer (widened). >=20 > Likewise for a number read at the prompt: negative for > restriction numbering, positive for full-buffer numbering. But, as I said recently here, two separate commands (and keys) is OK too. What I think would be inferior would be _only_ a dwimmy behavior that doesn't give users a way to control what happens when it doesn't correspond to some simple conditional that the dwim relies on.