From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#41250: 28.0.50; Dired displays unconditionally ls-switches on modeline Date: Fri, 15 May 2020 11:55:46 -0700 (PDT) Message-ID: <0957af50-7f85-455a-9d2c-e96451727872@default> References: <87v9ky9p6o.fsf@mail.linkov.net> <654acc31-015d-4552-bd9b-3b8c69661fcd@default> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="__158956894790960356abhmp0001.oracle.com" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="3356"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41250@debbugs.gnu.org, Juri Linkov To: Arthur Miller Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 15 20:59:21 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 1jZfYH-0000mf-8D for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 May 2020 20:59:21 +0200 Original-Received: from localhost ([::1]:59800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZfYG-0000v6-BB for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 May 2020 14:59:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZfXy-0000hY-Sj for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 14:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55426) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZfXy-0001AQ-Jw for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 14:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZfXy-0006OG-Je for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 14:59: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: Fri, 15 May 2020 18:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41250 X-GNU-PR-Package: emacs Original-Received: via spool by 41250-submit@debbugs.gnu.org id=B41250.158956908224439 (code B ref 41250); Fri, 15 May 2020 18:59:02 +0000 Original-Received: (at 41250) by debbugs.gnu.org; 15 May 2020 18:58:02 +0000 Original-Received: from localhost ([127.0.0.1]:38735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZfX0-0006Lx-0M for submit@debbugs.gnu.org; Fri, 15 May 2020 14:58:02 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:52654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZfWy-0006LW-Ea for 41250@debbugs.gnu.org; Fri, 15 May 2020 14:58:01 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04FIvaVZ003222; Fri, 15 May 2020 18:57:53 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; s=corp-2020-01-29; bh=fuKk/AF3sf65n/6oSj4YJ+RyAx23/LWFgg0c6/H1MLY=; b=U88+qPH6MxZ1oLUMJj1vDqGXncseeIgutcR+LqfUpTjKTTY+ne9YU8FCKxswb85gVXZO IOm+mtX02maEB9fTEnwwcyJPx1lSaTfdTVZjUZm2G3pEDQi6ccpSE25rTb4P9uT5SnV1 cJZbMBDtYQ67oczPVJHalIqrdxmrQ7RXwyBJuZkv1ng9NJPQkiprmWBTklLCqrbVjkg7 smbRW/TEe7qFAR/JqsVcQgvbG1/9Fp1sS6++j+pqqReUu/ABUBYrxYWzw9vvjQPwrR3Y fyzSQbZUlmP2fAwQFdE3ZnDtzV9we8D0aWXV2ypMgS2qg4UgDedpFHol6EVp3M1E+T4b 3w== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 3100xww5wx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 15 May 2020 18:57:53 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04FImDXX052633; Fri, 15 May 2020 18:55:52 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 3100yfb5va-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 May 2020 18:55:52 +0000 Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 04FItmbW020845; Fri, 15 May 2020 18:55:49 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4993.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9622 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 phishscore=0 adultscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005150157 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9622 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 lowpriorityscore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 cotscore=-2147483648 mlxscore=0 phishscore=0 adultscore=0 impostorscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005150158 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:180352 Archived-At: --__158956894790960356abhmp0001.oracle.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable > I think format string asks for more documentation and > more cognitive effort on part of user :-) and as such > maybe it is better to have it as part of Dired+. >=20 > Kind-of more for hard-core users who prefer much > deeper level of customization? Emacs users are of all kinds. No user who doesn't understand `format' would need to make that particular option-value choice. This is no different from options we have that have a catch-all choice of a function, which they can use to get pretty much any behavior. And that's another reasonable alternative here to a choice of a format string: a function that accepts the current switches as its (first) argument. That's even more general, and it wouldn't freak out a user unfamiliar with format strings. ;-) And that also covers truncating, trivially. There's nothing special about truncating. It just happens to correspond directly to your immediate problem: a long list of switches. Attached is a patch that does what I think should be done. The option value can be: nil - to get the current behavior `as-is' - show the full switches an integer - show first N chars of switches a function - show whatever it returns, when passed `dired-actual-switches' If Emacs doesn't want to go this route then I guess I'll just use it for Dired+. ___ I do think your suggestion of mouseover the mode-line indication showing the full switches is a good one. I've added command `diredp-change-ls-switches' to Dired+, and added it to menu-bar menu `Dir' (aka `Subdir'). It shows the current switches in the prompt, so you can just hit `C-g' if all you want is see what the current switches are. And because it's in the menu, you can get to it by clicking the lighter in the mode-line. (Menu `Dir' is the first menu listed when you click.)=20 --__158956894790960356abhmp0001.oracle.com Content-Type: application/octet-stream; name="dired-2020-05-15a.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="dired-2020-05-15a.patch" ZGlmZiAtdSBkaXJlZC5lbCBkaXJlZC0yMDIwLTA1LTE1YS1QQVRDSEVELmVsCi0tLSBkaXJlZC5l bAkyMDIwLTA1LTE1IDExOjIzOjMyLjgwNDgyMzgwMCAtMDcwMAorKysgZGlyZWQtMjAyMC0wNS0x NWEtUEFUQ0hFRC5lbAkyMDIwLTA1LTE1IDExOjI2OjIwLjcwMjA1MTAwMCAtMDcwMApAQCAtNDEx NCwyMiArNDExNCw0MCBAQAogICAiTm9uLW5pbCBtZWFucyB0aGUgRGlyZWQgc29ydCBjb21tYW5k IGlzIGRpc2FibGVkLgogVGhlIGlkZWEgaXMgdG8gc2V0IHRoaXMgYnVmZmVyLWxvY2FsbHkgaW4g c3BlY2lhbCBEaXJlZCBidWZmZXJzLiIpCiAKKyhkZWZjdXN0b20gZGlyZWQtc3dpdGNoZXMtaW4t bW9kZS1saW5lIG5pbAorICAiSG93IHRvIGluZGljYXRlIGBkaXJlZC1hY3R1YWwtc3dpdGNoZXMn IGluIG1vZGUtbGluZS4KK1Bvc3NpYmxlIHZhbHVlczoKKyAqIGBuaWwnOiAgICBJbmRpY2F0ZSBu YW1lLW9yLWRhdGUgc29ydCBvcmRlciwgaWYgcG9zc2libGUuCisgICAgICAgICAgICAgRWxzZSBz aG93IGZ1bGwgc3dpdGNoZXMuCisgKiBgYXMtaXMnOiAgU2hvdyBmdWxsIHN3aXRjaGVzLgorICog SW50ZWdlcjogIFNob3cgb25seSB0aGUgZmlyc3QgTiBjaGFycyBvZiBmdWxsIHN3aXRjaGVzLgor ICogRnVuY3Rpb246IFBhc3MgYGRpcmVkLWFjdHVhbC1zd2l0Y2hlcycgYXMgYXJnIGFuZCBzaG93 IHJlc3VsdC4iCisgIDp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QtYWN0dWFsLXN3aXRjaGVzKQotCQkg ICAiRGlyZWQgYnkgbmFtZSIpCi0JCSAgKChzdHJpbmctbWF0Y2gtcAotCQkgICAgZGlyZWQtc29y dC1ieS1kYXRlLXJlZ2V4cCBkaXJlZC1hY3R1YWwtc3dpdGNoZXMpCi0JCSAgICJEaXJlZCBieSBk YXRlIikKLQkJICAodAotCQkgICAoY29uY2F0ICJEaXJlZCAiIGRpcmVkLWFjdHVhbC1zd2l0Y2hl cykpKSkpCisJICAobGV0ICgoY2FzZS1mb2xkLXNlYXJjaCAgbmlsKSkKKyAgICAgICAgICAgIChp ZiBkaXJlZC1zd2l0Y2hlcy1pbi1tb2RlLWxpbmUKKyAgICAgICAgICAgICAgICAoY29uY2F0ICJE aXJlZCAiCisgICAgICAgICAgICAgICAgICAgICAgICAoY29uZCAoKGludGVnZXJwIGRpcmVkLXN3 aXRjaGVzLWluLW1vZGUtbGluZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc3Vi c3RyaW5nIGRpcmVkLWFjdHVhbC1zd2l0Y2hlcworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgMCBkaXJlZC1zd2l0Y2hlcy1pbi1tb2RlLWxpbmUpKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKChmdW5jdGlvbnAgZGlyZWQtc3dpdGNoZXMtaW4tbW9kZS1s aW5lKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChmb3JtYXQgIiVzIiAoZnVuY2Fs bCBkaXJlZC1zd2l0Y2hlcy1pbi1tb2RlLWxpbmUKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlyZWQtYWN0dWFsLXN3aXRjaGVzKSkpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAodCBkaXJlZC1hY3R1YWwtc3dpdGNoZXMpKSkKKyAg ICAgICAgICAgICAgKGNvbmQgKChzdHJpbmctbWF0Y2gtcCBkaXJlZC1zb3J0LWJ5LW5hbWUtcmVn ZXhwIGRpcmVkLWFjdHVhbC1zd2l0Y2hlcykKKyAgICAgICAgICAgICAgICAgICAgICJEaXJlZCBi eSBuYW1lIikKKyAgICAgICAgICAgICAgICAgICAgKChzdHJpbmctbWF0Y2gtcCBkaXJlZC1zb3J0 LWJ5LWRhdGUtcmVnZXhwIGRpcmVkLWFjdHVhbC1zd2l0Y2hlcykKKyAgICAgICAgICAgICAgICAg ICAgICJEaXJlZCBieSBkYXRlIikKKyAgICAgICAgICAgICAgICAgICAgKHQgKGNvbmNhdCAiRGly ZWQgIiBkaXJlZC1hY3R1YWwtc3dpdGNoZXMpKSkpKSkKICAgICAoZm9yY2UtbW9kZS1saW5lLXVw ZGF0ZSkpKQogCiAoZGVmaW5lLW9ic29sZXRlLWZ1bmN0aW9uLWFsaWFzICdkaXJlZC1zb3J0LXNl dC1tb2RlbGluZQo= --__158956894790960356abhmp0001.oracle.com--