From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#43300: [PATCH] Make M-x show new commands for obsolete aliases Date: Wed, 18 Nov 2020 05:49:48 -0800 Message-ID: References: <87ft576o5h.fsf@linkov.net> <87zh3ezvg8.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7787"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43300@debbugs.gnu.org To: "Basil L. Contovounesios" , Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 18 14:50:14 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 1kfNqc-0001c9-Fy for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Nov 2020 14:50:10 +0100 Original-Received: from localhost ([::1]:55756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfNqb-0007cj-IO for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Nov 2020 08:50:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfNqU-0007ca-Rc for bug-gnu-emacs@gnu.org; Wed, 18 Nov 2020 08:50:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51258) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kfNqU-0005PC-Ia for bug-gnu-emacs@gnu.org; Wed, 18 Nov 2020 08:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kfNqU-0002H7-H5 for bug-gnu-emacs@gnu.org; Wed, 18 Nov 2020 08:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Nov 2020 13:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43300 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 43300-submit@debbugs.gnu.org id=B43300.16057073988730 (code B ref 43300); Wed, 18 Nov 2020 13:50:02 +0000 Original-Received: (at 43300) by debbugs.gnu.org; 18 Nov 2020 13:49:58 +0000 Original-Received: from localhost ([127.0.0.1]:34571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfNqQ-0002Gk-AL for submit@debbugs.gnu.org; Wed, 18 Nov 2020 08:49:58 -0500 Original-Received: from mail-ej1-f53.google.com ([209.85.218.53]:38949) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfNqN-0002GX-Ix for 43300@debbugs.gnu.org; Wed, 18 Nov 2020 08:49:56 -0500 Original-Received: by mail-ej1-f53.google.com with SMTP id s25so2840939ejy.6 for <43300@debbugs.gnu.org>; Wed, 18 Nov 2020 05:49:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=iS+OHN1O7UOjKDk+IBJrMp8hkN3bzNYE/Q8rxUXItXQ=; b=sqwhXKB9r+qW1zc25LAYjkQE91uu9P0/aF1NeIa3pbLyQEKbEHv179lqkE5P7oMFW8 s0SO3TswUJZraYeTck05aKyIMNemwfyoyK+hBkNgP9TwMhXXUiNlNcEVs6M7bd+n4I3s GQhLSLoCZbpz6ANRI8vozdRYu6DiHJjwDnDNWBTJI1qjBWL3bNbjSfVBKtcckDQC6q++ k0Z359LvnaIYaWIvHunwFxKgY3Vci0ThbToJNm/UPF/65rnMF0LsrW2r1BFScToNhHcX TSQ2jX5DsCq8to2XBwCyDNLEkkvqwd202n95kxe+G3xA7mO8VkVYXoYQ7Q5YYvL3ctPY lOjg== X-Gm-Message-State: AOAM533kpOT5CVbTVuX0w8Tp2tCGTlmcNnHjbsb7247UK1C9RUjJOPTI tnTQiVZ+sNMMvSO7NBa6JJtAJr48+PNFKHoYP7A= X-Google-Smtp-Source: ABdhPJxJB1a+rnMoy5XE7EOm887cGbAHxJD98dhtsgWpNASwMTcW5WWGPoApKHdo1gJy02gOvgoPs9QyerjB+zGo+G4= X-Received: by 2002:a17:906:a00c:: with SMTP id p12mr25113913ejy.249.1605707389675; Wed, 18 Nov 2020 05:49:49 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 18 Nov 2020 05:49:48 -0800 In-Reply-To: <87zh3ezvg8.fsf@tcd.ie> 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:193613 Archived-At: "Basil L. Contovounesios" writes: > Juri Linkov writes: > >>> Please find attached two patches that tweaks how M-x >>> (execute-extended-command) works: >>> >>> 1. Show obsolete commands, and give their new name as an annotation. >> >> I noticed that some commands have " (nil)" appended as annotations >> in M-x completions, e.g. 'M-x browse- TAB'. Looks like " (nil)" >> is returned in read-extended-command--annotation: >> >> (obsolete >> (format " (%s)" (car obsolete))) Thanks for reporting this. > Is the following sufficient? The old behavior was to never show obsolete commands in completion. You could therefore only run one if you remembered and manually typed in the old name. If you made a command obsolete, it would therefore just appear to disappear from one release to the next. The new behavior was intended to be less abrupt for cases where the old command is anyways just an alias for a new command. In this way, we can more gently nudge users to use the new command instead. I therefore think we should revert back to the old behavior for commands that are obsolete without an alternative, that is we should not add such commands to the list of completion candidates.