From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 27 09:26:20 2016 Received: (at submit) by debbugs.gnu.org; 27 Feb 2016 14:26:20 +0000 Received: from localhost ([127.0.0.1]:48301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZfp6-0005Ns-Be for submit@debbugs.gnu.org; Sat, 27 Feb 2016 09:26:20 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53723) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZfp4-0005Ng-Um for submit@debbugs.gnu.org; Sat, 27 Feb 2016 09:26:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZfoy-0006aS-Vy for submit@debbugs.gnu.org; Sat, 27 Feb 2016 09:26:13 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZfoy-0006aO-TH for submit@debbugs.gnu.org; Sat, 27 Feb 2016 09:26:12 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZfox-0002I2-W5 for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2016 09:26:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZfou-0006U4-QV for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2016 09:26:11 -0500 Received: from calancha-ilc.kek.jp ([130.87.234.234]:48990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZfou-0006TZ-Fr for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2016 09:26:08 -0500 Received: by calancha-ilc.kek.jp (Postfix, from userid 500) id 53D07D9C7; Sat, 27 Feb 2016 23:29:25 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by calancha-ilc.kek.jp (Postfix) with ESMTP id 3B9BE6108 for ; Sat, 27 Feb 2016 23:29:25 +0900 (JST) Date: Sat, 27 Feb 2016 23:29:25 +0900 (JST) From: Tino Calancha X-X-Sender: calancha@calancha-ilc.kek.jp To: bug-gnu-emacs@gnu.org Subject: 25.1.50; Display number of marked files Message-ID: User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="1468197610-1861040374-1456583365=:1080" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --1468197610-1861040374-1456583365=:1080 Content-Type: text/plain; format=flowed; charset=US-ASCII Added a function displaying the number of marked files in the minibuffer. Such function could be bound to 'N'. In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.29) Repository revision: 25c5651951ef39f650927652dac8b4bbfccb60fa --1468197610-1861040374-1456583365=:1080 Content-Type: text/plain; charset=US-ASCII; name=dired_show-num-marked-files.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=dired_show-num-marked-files.patch ZGlmZiAtLWdpdCBhL2xpc3AvZGlyZWQuZWwgYi9saXNwL2RpcmVkLmVsDQpp bmRleCA2Yzc0NDVjLi4zMTRhNzAxIDEwMDY0NA0KLS0tIGEvbGlzcC9kaXJl ZC5lbA0KKysrIGIvbGlzcC9kaXJlZC5lbA0KQEAgLTE1MDUsNiArMTUwNSw3 IEBAIGRpcmVkLW1vZGUtbWFwDQogICAgIChkZWZpbmUta2V5IG1hcCAiKi8i ICdkaXJlZC1tYXJrLWRpcmVjdG9yaWVzKQ0KICAgICAoZGVmaW5lLWtleSBt YXAgIipAIiAnZGlyZWQtbWFyay1zeW1saW5rcykNCiAgICAgKGRlZmluZS1r ZXkgbWFwICIqJSIgJ2RpcmVkLW1hcmstZmlsZXMtcmVnZXhwKQ0KKyAgICAo ZGVmaW5lLWtleSBtYXAgIk4iICdkaXJlZC1udW1iZXItbWFya2VkLWZpbGVz KQ0KICAgICAoZGVmaW5lLWtleSBtYXAgIipjIiAnZGlyZWQtY2hhbmdlLW1h cmtzKQ0KICAgICAoZGVmaW5lLWtleSBtYXAgIipzIiAnZGlyZWQtbWFyay1z dWJkaXItZmlsZXMpDQogICAgIChkZWZpbmUta2V5IG1hcCAiKm0iICdkaXJl ZC1tYXJrKQ0KQEAgLTE2NTEsNiArMTY1Miw5IEBAIGRpcmVkLW1vZGUtbWFw DQogICAgIChkZWZpbmUta2V5IG1hcCBbbWVudS1iYXIgaW1tZWRpYXRlIHJl dmVydC1idWZmZXJdDQogICAgICAgJyhtZW51LWl0ZW0gIlJlZnJlc2giIHJl dmVydC1idWZmZXINCiAJCSAgOmhlbHAgIlVwZGF0ZSBjb250ZW50cyBvZiBz aG93biBkaXJlY3RvcmllcyIpKQ0KKyAgICAoZGVmaW5lLWtleSBtYXAgW21l bnUtYmFyIGltbWVkaWF0ZSBkaXJlZC1udW1iZXItbWFya2VkLWZpbGVzXQ0K KyAgICAgICcobWVudS1pdGVtICIjTWFya2VkIEZpbGVzIiBkaXJlZC1udW1i ZXItbWFya2VkLWZpbGVzDQorCQkgIDpoZWxwICJEaXNwbGF5IG51bWJlciBv ZiBtYXJrZWQgZmlsZXMiKSkNCiANCiAgICAgKGRlZmluZS1rZXkgbWFwIFtt ZW51LWJhciBpbW1lZGlhdGUgZGFzaGVzXQ0KICAgICAgICcoIi0tIikpDQpA QCAtMzM0NSw2ICszMzQ5LDE4IEBAIGRpcmVkLW1hcmstZmlsZXMtcmVnZXhw DQogCSAgICAoYW5kIGZuIChzdHJpbmctbWF0Y2gtcCByZWdleHAgZm4pKSkp DQogICAgICAibWF0Y2hpbmcgZmlsZSIpKSkNCiANCisoZGVmdW4gZGlyZWQt bnVtYmVyLW1hcmtlZC1maWxlcygpDQorICAiRGlzcGxheSBudW1iZXIgb2Yg bWFya2VkIGZpbGVzIg0KKyAgKGludGVyYWN0aXZlKQ0KKyAgKGxldCogKChm aWxlcyAgIChkaXJlZC1nZXQtbWFya2VkLWZpbGVzIG5pbCBuaWwgbmlsIHQp KQ0KKyAgICAgICAgIChubWFya2VkIChsZW5ndGggZmlsZXMpKSkNCisgICAg KGNvbmQgKChudWxsIChjZHIgZmlsZXMpKQ0KKyAgICAgICAgICAgKG1lc3Nh Z2UgIk5vIG1hcmtlZCBmaWxlcyIpKQ0KKyAgICAgICAgICAoKGFuZCAoPSBu bWFya2VkIDIpIChlcSAoY2FyIGZpbGVzKSB0KSkNCisgICAgICAgICAgICht ZXNzYWdlICIxIG1hcmtlZCBmaWxlIiBubWFya2VkKSBubWFya2VkKQ0KKyAg ICAgICAgICAodA0KKyAgICAgICAgICAgKG1lc3NhZ2UgIiVkIG1hcmtlZCBm aWxlcyIgbm1hcmtlZCkgbm1hcmtlZCkpKSkNCisNCiAoZGVmdW4gZGlyZWQt bWFyay1maWxlcy1jb250YWluaW5nLXJlZ2V4cCAocmVnZXhwICZvcHRpb25h bCBtYXJrZXItY2hhcikNCiAgICJNYXJrIGFsbCBmaWxlcyB3aXRoIGNvbnRl bnRzIGNvbnRhaW5pbmcgUkVHRVhQIGZvciB1c2UgaW4gbGF0ZXIgY29tbWFu ZHMuDQogQSBwcmVmaXggYXJndW1lbnQgbWVhbnMgdG8gdW5tYXJrIHRoZW0g aW5zdGVhZC4NCg== --1468197610-1861040374-1456583365=:1080-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 27 09:37:55 2016 Received: (at 22829) by debbugs.gnu.org; 27 Feb 2016 14:37:55 +0000 Received: from localhost ([127.0.0.1]:48306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZg0J-0005gG-EU for submit@debbugs.gnu.org; Sat, 27 Feb 2016 09:37:55 -0500 Received: from calancha-ilc.kek.jp ([130.87.234.234]:50016) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZg0I-0005g0-1N for 22829@debbugs.gnu.org; Sat, 27 Feb 2016 09:37:54 -0500 Received: by calancha-ilc.kek.jp (Postfix, from userid 500) id 21C95D9C7; Sat, 27 Feb 2016 23:41:04 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by calancha-ilc.kek.jp (Postfix) with ESMTP id 0DE276108 for <22829@debbugs.gnu.org>; Sat, 27 Feb 2016 23:41:04 +0900 (JST) Date: Sat, 27 Feb 2016 23:41:04 +0900 (JST) From: Tino Calancha X-X-Sender: calancha@calancha-ilc.kek.jp To: 22829@debbugs.gnu.org Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="1468197610-1313493966-1456584064=:1080" X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 22829 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --1468197610-1313493966-1456584064=:1080 Content-Type: text/plain; format=flowed; charset=US-ASCII Return the correct value when number of marked files equals 1. --1468197610-1313493966-1456584064=:1080 Content-Type: text/plain; charset=US-ASCII; name=dired_show-num-marked-files_2.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=dired_show-num-marked-files_2.patch ZGlmZiAtLWdpdCBhL2xpc3AvZGlyZWQuZWwgYi9saXNwL2RpcmVkLmVsDQpp bmRleCA2Yzc0NDVjLi41ODE0ZTU1IDEwMDY0NA0KLS0tIGEvbGlzcC9kaXJl ZC5lbA0KKysrIGIvbGlzcC9kaXJlZC5lbA0KQEAgLTE1MDUsNiArMTUwNSw3 IEBAIGRpcmVkLW1vZGUtbWFwDQogICAgIChkZWZpbmUta2V5IG1hcCAiKi8i ICdkaXJlZC1tYXJrLWRpcmVjdG9yaWVzKQ0KICAgICAoZGVmaW5lLWtleSBt YXAgIipAIiAnZGlyZWQtbWFyay1zeW1saW5rcykNCiAgICAgKGRlZmluZS1r ZXkgbWFwICIqJSIgJ2RpcmVkLW1hcmstZmlsZXMtcmVnZXhwKQ0KKyAgICAo ZGVmaW5lLWtleSBtYXAgIk4iICdkaXJlZC1udW1iZXItbWFya2VkLWZpbGVz KQ0KICAgICAoZGVmaW5lLWtleSBtYXAgIipjIiAnZGlyZWQtY2hhbmdlLW1h cmtzKQ0KICAgICAoZGVmaW5lLWtleSBtYXAgIipzIiAnZGlyZWQtbWFyay1z dWJkaXItZmlsZXMpDQogICAgIChkZWZpbmUta2V5IG1hcCAiKm0iICdkaXJl ZC1tYXJrKQ0KQEAgLTE2NTEsNiArMTY1Miw5IEBAIGRpcmVkLW1vZGUtbWFw DQogICAgIChkZWZpbmUta2V5IG1hcCBbbWVudS1iYXIgaW1tZWRpYXRlIHJl dmVydC1idWZmZXJdDQogICAgICAgJyhtZW51LWl0ZW0gIlJlZnJlc2giIHJl dmVydC1idWZmZXINCiAJCSAgOmhlbHAgIlVwZGF0ZSBjb250ZW50cyBvZiBz aG93biBkaXJlY3RvcmllcyIpKQ0KKyAgICAoZGVmaW5lLWtleSBtYXAgW21l bnUtYmFyIGltbWVkaWF0ZSBkaXJlZC1udW1iZXItbWFya2VkLWZpbGVzXQ0K KyAgICAgICcobWVudS1pdGVtICIjTWFya2VkIEZpbGVzIiBkaXJlZC1udW1i ZXItbWFya2VkLWZpbGVzDQorCQkgIDpoZWxwICJEaXNwbGF5IG51bWJlciBv ZiBtYXJrZWQgZmlsZXMiKSkNCiANCiAgICAgKGRlZmluZS1rZXkgbWFwIFtt ZW51LWJhciBpbW1lZGlhdGUgZGFzaGVzXQ0KICAgICAgICcoIi0tIikpDQpA QCAtMzM0NSw2ICszMzQ5LDE4IEBAIGRpcmVkLW1hcmstZmlsZXMtcmVnZXhw DQogCSAgICAoYW5kIGZuIChzdHJpbmctbWF0Y2gtcCByZWdleHAgZm4pKSkp DQogICAgICAibWF0Y2hpbmcgZmlsZSIpKSkNCiANCisoZGVmdW4gZGlyZWQt bnVtYmVyLW1hcmtlZC1maWxlcygpDQorICAiRGlzcGxheSBudW1iZXIgb2Yg bWFya2VkIGZpbGVzIg0KKyAgKGludGVyYWN0aXZlKQ0KKyAgKGxldCogKChm aWxlcyAgIChkaXJlZC1nZXQtbWFya2VkLWZpbGVzIG5pbCBuaWwgbmlsIHQp KQ0KKyAgICAgICAgIChubWFya2VkIChsZW5ndGggZmlsZXMpKSkNCisgICAg KGNvbmQgKChudWxsIChjZHIgZmlsZXMpKQ0KKyAgICAgICAgICAgKG1lc3Nh Z2UgIk5vIG1hcmtlZCBmaWxlcyIpKQ0KKyAgICAgICAgICAoKGFuZCAoPSBu bWFya2VkIDIpIChlcSAoY2FyIGZpbGVzKSB0KSkNCisgICAgICAgICAgICht ZXNzYWdlICIxIG1hcmtlZCBmaWxlIikgKDEtIG5tYXJrZWQpKQ0KKyAgICAg ICAgICAodA0KKyAgICAgICAgICAgKG1lc3NhZ2UgIiVkIG1hcmtlZCBmaWxl cyIgbm1hcmtlZCkgbm1hcmtlZCkpKSkNCisNCiAoZGVmdW4gZGlyZWQtbWFy ay1maWxlcy1jb250YWluaW5nLXJlZ2V4cCAocmVnZXhwICZvcHRpb25hbCBt YXJrZXItY2hhcikNCiAgICJNYXJrIGFsbCBmaWxlcyB3aXRoIGNvbnRlbnRz IGNvbnRhaW5pbmcgUkVHRVhQIGZvciB1c2UgaW4gbGF0ZXIgY29tbWFuZHMu DQogQSBwcmVmaXggYXJndW1lbnQgbWVhbnMgdG8gdW5tYXJrIHRoZW0gaW5z dGVhZC4NCg== --1468197610-1313493966-1456584064=:1080-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 28 00:38:46 2016 Received: (at 22829) by debbugs.gnu.org; 28 Feb 2016 05:38:46 +0000 Received: from localhost ([127.0.0.1]:49333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZu45-0007TK-Tj for submit@debbugs.gnu.org; Sun, 28 Feb 2016 00:38:46 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:42887) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZu44-0007TD-LQ for 22829@debbugs.gnu.org; Sun, 28 Feb 2016 00:38:45 -0500 Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aZu3f-00036T-FP; Sun, 28 Feb 2016 06:38:20 +0100 From: Lars Ingebrigtsen To: Tino Calancha Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) References: Date: Sun, 28 Feb 2016 16:08:15 +1030 In-Reply-To: (Tino Calancha's message of "Sat, 27 Feb 2016 23:41:04 +0900 (JST)") Message-ID: <87mvqlv1h4.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1aZu3f-00036T-FP X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1457242700.34617@lPUXwaMauhHcxFHhByhTHw X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22829 Cc: 22829@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Tino Calancha writes: > + (define-key map "N" 'dired-number-marked-files) [...] > +(defun dired-number-marked-files() > + "Display number of marked files" > + (interactive) > + (let* ((files (dired-get-marked-files nil nil nil t)) > + (nmarked (length files))) > + (cond ((null (cdr files)) > + (message "No marked files")) > + ((and (= nmarked 2) (eq (car files) t)) > + (message "1 marked file") (1- nmarked)) > + (t > + (message "%d marked files" nmarked) nmarked)))) And I'm not sure I'm feeling the utility of this function, either. What's the use case? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 28 01:33:45 2016 Received: (at 22829) by debbugs.gnu.org; 28 Feb 2016 06:33:45 +0000 Received: from localhost ([127.0.0.1]:49444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZuvJ-0005hb-At for submit@debbugs.gnu.org; Sun, 28 Feb 2016 01:33:45 -0500 Received: from calancha-ilc.kek.jp ([130.87.234.234]:50288) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZuvF-0005hB-Pf for 22829@debbugs.gnu.org; Sun, 28 Feb 2016 01:33:42 -0500 Received: by calancha-ilc.kek.jp (Postfix, from userid 500) id 7CC6CD902; Sun, 28 Feb 2016 15:36:48 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by calancha-ilc.kek.jp (Postfix) with ESMTP id 68A0A9163; Sun, 28 Feb 2016 15:36:48 +0900 (JST) Date: Sun, 28 Feb 2016 15:36:48 +0900 (JST) From: Tino Calancha X-X-Sender: calancha@calancha-ilc.kek.jp To: Lars Ingebrigtsen Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) In-Reply-To: <87mvqlv1h4.fsf@gnus.org> Message-ID: References: <87mvqlv1h4.fsf@gnus.org> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 22829 Cc: Tino Calancha , 22829@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > And I'm not sure I'm feeling the utility of this function, either. > What's the use case? For those marking files in several directories quite often, and using dired-change-marks to separate files in different categories: those people may be interested in counting number of marked files. I need this every day, but I agree not too many people would find it useful. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 01 11:29:00 2016 Received: (at 22829) by debbugs.gnu.org; 1 Mar 2016 16:29:00 +0000 Received: from localhost ([127.0.0.1]:56519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aanAR-0007I9-Ey for submit@debbugs.gnu.org; Tue, 01 Mar 2016 11:29:00 -0500 Received: from mhu52.post.kek.jp ([130.87.45.62]:56556) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaiOG-0002jm-1E for 22829@debbugs.gnu.org; Tue, 01 Mar 2016 06:22:56 -0500 Received: from mip52.post.kek.jp (mip52 [130.87.45.5]) by mhu52 (Postfix) with ESMTP id CE6BD20B92 for <22829@debbugs.gnu.org>; Tue, 1 Mar 2016 20:22:48 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.22,522,1449500400"; d="scan'208";a="4999900" Received: from mdi52.post.kek.jp (HELO mdi52) ([130.87.45.58]) by mip52.post.kek.jp with ESMTP; 01 Mar 2016 20:22:50 +0900 Received: from calancha-ilc.kek.jp (calancha-ilc.kek.jp [130.87.234.234]) by mdi52 (Postfix) with ESMTP id C479620967 for <22829@debbugs.gnu.org>; Tue, 1 Mar 2016 20:22:48 +0900 (JST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Date: Tue, 01 Mar 2016 20:26:06 +0900 To: "22829@debbugs.gnu.org" <22829@debbugs.gnu.org> Subject: 25.1.50; Display number of marked files MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Constantino Calancha" Organization: IPNS (KEK) Message-ID: User-Agent: Opera Mail/12.16 (Linux) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 22829 X-Mailman-Approved-At: Tue, 01 Mar 2016 11:28:58 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > For those marking files in several directories quite often, and using > dired-change-marks to separate files in different categories: those > people may be interested in counting number of marked files. I need > this every day, but I agree not too many people would find it useful. Well not just in that case. The main use if as a fast way to know the number of files in the current directory: t N (Maybe it could optionally prompt for `dired-marker-char'). If you don't find this useful then we can just ignore it. No problem. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 01 19:33:39 2016 Received: (at 22829) by debbugs.gnu.org; 2 Mar 2016 00:33:39 +0000 Received: from localhost ([127.0.0.1]:56834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaujS-00057H-Mi for submit@debbugs.gnu.org; Tue, 01 Mar 2016 19:33:38 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:59865 helo=homiemail-a101.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaujQ-000579-Cp for 22829@debbugs.gnu.org; Tue, 01 Mar 2016 19:33:36 -0500 Received: from homiemail-a101.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a101.g.dreamhost.com (Postfix) with ESMTP id DF83D117E06A; Tue, 1 Mar 2016 16:33:34 -0800 (PST) Received: from localhost.linkov.net (82.131.10.45.cable.starman.ee [82.131.10.45]) (Authenticated sender: jurta@jurta.org) by homiemail-a101.g.dreamhost.com (Postfix) with ESMTPA id A21BB117E065; Tue, 1 Mar 2016 16:33:33 -0800 (PST) From: Juri Linkov To: Tino Calancha Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) Organization: LINKOV.NET References: <87mvqlv1h4.fsf@gnus.org> Date: Wed, 02 Mar 2016 02:32:39 +0200 In-Reply-To: (Tino Calancha's message of "Sun, 28 Feb 2016 15:36:48 +0900 (JST)") Message-ID: <87fuw9203w.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22829 Cc: Lars Ingebrigtsen , 22829@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >> And I'm not sure I'm feeling the utility of this function, either. >> What's the use case? > > For those marking files in several directories quite often, and using > dired-change-marks to separate files in different categories: those > people may be interested in counting number of marked files. I need > this every day, but I agree not too many people would find it useful. I confirm this is very useful. I'm using the same for a long time, but additionally also displaying a total sum of sizes on every mark (this emulates the behavior of File Commanders on marking files by INS). The code I'm using in ~/.emacs is very very old, and nowadays you could implement the same with less code. ;; 2 new functions: (defun dired-get-file-info () "Get file info files for which PREDICATE returns non-nil." ;; code for this function is borrowed from dired-x.el::dired-mark-sexp (let (inode s mode nlink uid gid size time name sym) (save-excursion (if (dired-move-to-filename) (let (pos (mode-len 10) (dired-re-inode-size "\\s *\\([0-9]*\\)\\s *\\([0-9]*\\) ?")) (beginning-of-line) (forward-char 2) (if (looking-at dired-re-inode-size) (progn (goto-char (match-end 0)) (setq inode (string-to-int (buffer-substring (match-beginning 1) (match-end 1))) s (string-to-int (buffer-substring (match-beginning 2) (match-end 2))))) (setq inode nil s nil)) (setq mode (buffer-substring (point) (+ mode-len (point)))) (forward-char mode-len) (setq nlink (read (current-buffer))) (setq uid (buffer-substring (+ (point) 1) (progn (forward-word 1) (point)))) ;; works only with ls patch ;; patched in dired.el:dired-move-to-filename-regexp ;; (re-search-forward "\\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\\)") ;; try standard expression (re-search-forward directory-listing-before-filename-regexp) (goto-char (match-beginning 2)) (forward-char -1) (setq size (string-to-int (replace-regexp-in-string ;; handle thousand separators in sizes "," "" (buffer-substring (save-excursion ;; (backward-word 1) (skip-chars-backward "[0-9,.]") (setq pos (point))) (point))))) (goto-char pos) (backward-word 1) (setq gid (buffer-substring (save-excursion (forward-word 1) (point)) (point)) time (buffer-substring (match-beginning 1) (1- (dired-move-to-filename))) name (buffer-substring (point) (or (dired-move-to-end-of-filename t) (point))) sym (progn (if (looking-at " -> ") (buffer-substring (progn (forward-char 4) (point)) (progn (end-of-line) (point))) ""))) (list (cons 'inode inode) (cons 's s) (cons 'mode mode) (cons 'nlink nlink) (cons 'uid uid) (cons 'gid gid) (cons 'size size) (cons 'time time) (cons 'name name) (cons 'sym sym))) nil)))) ;; TODO: use `pint2hrstr' in Lisp (defun dired-count-sizes (&optional mark) "Count sizes of files marked by MARK mark." ;; TODO: add this info to mode-line and file count too, e.g.: F32 S64k ;; and make minor mode ;; see `dired-change-marks' (interactive (let* ((cursor-in-echo-area t) (mark (progn (message "Count files marked by mark: ") (read-char)))) (list mark))) (if (or (eq mark ?\r)) (ding) (let ((string (format "\n%c" mark)) (buffer-read-only) (total-size 0) total-size-str (total-count 0)) (save-excursion (goto-char (point-min)) (while (search-forward string nil t) (if (if (= mark ?\ ) (save-match-data (dired-get-filename 'no-dir t)) t) (if (equal (buffer-substring-no-properties (match-beginning 0) (match-end 0)) string) (setq total-size (+ total-size (*;;(/ (cdr (assoc 'size (dired-get-file-info))) 1.0);;1024) ) total-count (+ total-count 1)))))) (setq total-size-str (replace-regexp-in-string "^," "" (apply 'string (reverse (string-to-list (replace-regexp-in-string "\\([0-9]\\{3\\}\\)" "\\1," (apply 'string (reverse (string-to-list (replace-regexp-in-string "\.0$" "" (number-to-string total-size))))))))))) (message "Marked %s files with %s bytes" total-count total-size-str)))) (define-key dired-mode-map [(shift f5)] 'dired-count-sizes) (defun my-dired-mark (arg) "Mark ARG files and print the total size of marked files." (interactive "P") (dired-mark arg) (dired-count-sizes dired-marker-char)) (define-key dired-mode-map [insert] 'my-dired-mark) (defun my-dired-unmark-backward (arg) "Move up lines, remove deletion flag there and print size of marked files." (interactive "p") (dired-unmark-backward arg) (dired-count-sizes dired-marker-char)) (define-key dired-mode-map [backspace] 'my-dired-unmark-backward) From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 02 12:29:45 2016 Received: (at 22829) by debbugs.gnu.org; 2 Mar 2016 17:29:45 +0000 Received: from localhost ([127.0.0.1]:58050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abAam-0000sq-PA for submit@debbugs.gnu.org; Wed, 02 Mar 2016 12:29:44 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:53218) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abAaj-0000sh-P9 for 22829@debbugs.gnu.org; Wed, 02 Mar 2016 12:29:42 -0500 Received: from [31.55.6.3] (helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1abAZx-000854-EA; Wed, 02 Mar 2016 18:28:53 +0100 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> Date: Wed, 02 Mar 2016 17:28:52 +0000 In-Reply-To: <87fuw9203w.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 02 Mar 2016 02:32:39 +0200") Message-ID: <87io14rdpn.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1abAZx-000854-EA X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1457544534.71521@mfulXKs/Yt5xTjBY3VkaQw X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22829 Cc: Tino Calancha , 22829@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Juri Linkov writes: > I confirm this is very useful. I'm using the same for a long time, > but additionally also displaying a total sum of sizes on every mark > (this emulates the behavior of File Commanders on marking files by INS). This is beginning to sound more useful. :-) Including both the number of files and the total file size is something I could see myself wanting to have. Tino, could you amend your patch to do that, too? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 02 15:04:49 2016 Received: (at 22829) by debbugs.gnu.org; 2 Mar 2016 20:04:49 +0000 Received: from localhost ([127.0.0.1]:58148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abD0o-0007xr-7B for submit@debbugs.gnu.org; Wed, 02 Mar 2016 15:04:49 -0500 Received: from mail.mojserwer.eu ([195.110.48.8]:41297) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abD0j-0007xg-Qy for 22829@debbugs.gnu.org; Wed, 02 Mar 2016 15:04:45 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 6D18E9D2003; Wed, 2 Mar 2016 21:04:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6scflJfyBinB; Wed, 2 Mar 2016 21:04:36 +0100 (CET) Received: from localhost (unknown [109.232.24.28]) by mail.mojserwer.eu (Postfix) with ESMTPSA id F14759D2002; Wed, 2 Mar 2016 21:04:35 +0100 (CET) References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> <87io14rdpn.fsf@gnus.org> User-agent: mu4e 0.9.13; emacs 25.1.50.6 From: Marcin Borkowski To: Lars Ingebrigtsen Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) In-reply-to: <87io14rdpn.fsf@gnus.org> Date: Wed, 02 Mar 2016 21:04:34 +0100 Message-ID: <878u20abot.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22829 Cc: Tino Calancha , 22829@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2016-03-02, at 18:28, Lars Ingebrigtsen wrote: > Juri Linkov writes: > >> I confirm this is very useful. I'm using the same for a long time, >> but additionally also displaying a total sum of sizes on every mark >> (this emulates the behavior of File Commanders on marking files by INS). > > This is beginning to sound more useful. :-) Including both the number > of files and the total file size is something I could see myself wanting > to have. +1. What about the size of directories are marked? I assume that it is to costly to include the recursively computed size...? Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 02 19:20:38 2016 Received: (at 22829) by debbugs.gnu.org; 3 Mar 2016 00:20:39 +0000 Received: from localhost ([127.0.0.1]:58315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abH0Q-0007BU-P0 for submit@debbugs.gnu.org; Wed, 02 Mar 2016 19:20:38 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:54096 helo=homiemail-a18.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abH0O-0007BK-Aj for 22829@debbugs.gnu.org; Wed, 02 Mar 2016 19:20:36 -0500 Received: from homiemail-a18.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTP id 4A96725006B; Wed, 2 Mar 2016 16:20:34 -0800 (PST) Received: from localhost.linkov.net (82.131.91.74.cable.starman.ee [82.131.91.74]) (Authenticated sender: jurta@jurta.org) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTPA id 11530250069; Wed, 2 Mar 2016 16:20:32 -0800 (PST) From: Juri Linkov To: Marcin Borkowski Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) Organization: LINKOV.NET References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> <87io14rdpn.fsf@gnus.org> <878u20abot.fsf@mbork.pl> Date: Thu, 03 Mar 2016 02:17:23 +0200 In-Reply-To: <878u20abot.fsf@mbork.pl> (Marcin Borkowski's message of "Wed, 02 Mar 2016 21:04:34 +0100") Message-ID: <878u208lf0.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22829 Cc: Tino Calancha , Lars Ingebrigtsen , 22829@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>> I confirm this is very useful. I'm using the same for a long time, >>> but additionally also displaying a total sum of sizes on every mark >>> (this emulates the behavior of File Commanders on marking files by INS). >> >> This is beginning to sound more useful. :-) Including both the number >> of files and the total file size is something I could see myself wanting >> to have. > > +1. > > What about the size of directories are marked? I assume that it is to > costly to include the recursively computed size...? Yes, doing `du -sh` often takes soo long... But we could include sizes of subdirs only when called with a prefix arg. Oh, and I noticed that the proposed key 'N' is already bound to dired-man in dired-x.el. Another good mnemonic key would be '#', but it's taken as well. Than maybe put it on the marking prefix key '*'. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 03 00:53:00 2016 Received: (at 22829) by debbugs.gnu.org; 3 Mar 2016 05:53:00 +0000 Received: from localhost ([127.0.0.1]:58430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abMC4-0008Hb-4b for submit@debbugs.gnu.org; Thu, 03 Mar 2016 00:53:00 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:58825) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abMC2-0008HT-Eb for 22829@debbugs.gnu.org; Thu, 03 Mar 2016 00:52:58 -0500 Received: from [31.55.6.3] (helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1abMBd-0002uQ-Oo; Thu, 03 Mar 2016 06:52:33 +0100 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> <87io14rdpn.fsf@gnus.org> <878u20abot.fsf@mbork.pl> <878u208lf0.fsf@mail.linkov.net> Date: Thu, 03 Mar 2016 05:52:33 +0000 In-Reply-To: <878u208lf0.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 03 Mar 2016 02:17:23 +0200") Message-ID: <87mvqgjefy.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1abMBd-0002uQ-Oo X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1457589153.91757@iJAIH5R1BxkxWdtrRyMWFQ X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22829 Cc: Tino Calancha , 22829@debbugs.gnu.org, Marcin Borkowski X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Juri Linkov writes: > Yes, doing `du -sh` often takes soo long... But we could include sizes > of subdirs only when called with a prefix arg. I think the default should be to compute the sizes of files in the directories, too. Perhaps a prefix to not do that... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 03 04:55:33 2016 Received: (at 22829) by debbugs.gnu.org; 3 Mar 2016 09:55:33 +0000 Received: from localhost ([127.0.0.1]:58591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abPym-0007Rw-Tc for submit@debbugs.gnu.org; Thu, 03 Mar 2016 04:55:33 -0500 Received: from calancha-ilc.kek.jp ([130.87.234.234]:56124) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abPyj-0007Rg-Rt for 22829@debbugs.gnu.org; Thu, 03 Mar 2016 04:55:31 -0500 Received: by calancha-ilc.kek.jp (Postfix, from userid 500) id 697DE9652; Thu, 3 Mar 2016 18:58:40 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by calancha-ilc.kek.jp (Postfix) with ESMTP id 4C3235B for <22829@debbugs.gnu.org>; Thu, 3 Mar 2016 18:58:40 +0900 (JST) Date: Thu, 3 Mar 2016 18:58:40 +0900 (JST) From: Tino Calancha X-X-Sender: calancha@calancha-ilc.kek.jp To: 22829@debbugs.gnu.org Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) In-Reply-To: <87fuw9203w.fsf@mail.linkov.net> Message-ID: References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="1468197610-1410875418-1456999120=:25062" X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 22829 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --1468197610-1410875418-1456999120=:25062 Content-Type: text/plain; format=flowed; charset=ISO-8859-7 Content-Transfer-Encoding: 8BIT >I confirm this is very useful. I'm using the same for a long time, >but additionally also displaying a total sum of sizes on every mark Thank you Juri, I like very much your idea about showing the file sizes! If we modify `dired-get-marked-files' as in the Bug#22892 we can get in a straightforward way the file sizes from the file system. I include the modified version of your code after these comments. >What about the size of directories are marked? I assume that it is to >costly to include the recursively computed size...? Good idea. >This is beginning to sound more useful. :-) Sure, now is much better. >the proposed key 'N' is already bound to dired-man in dired-x.el. >Another good mnemonic key would be '#', but it's taken as well. >Than maybe put it on the marking prefix key '*'. I do like '*#', but i like 'N' more. We can also reconsider a bit about the keybinding 'N' for dired-man. Honestly i don't see the needs for this, having `man' and `woman' working nicely. Indeed, the funtion is not working as it should: (dired "/bin") j bash RET N bash RET Canąt find the /bin/bash manpage ;; Notice how i need to introduce 'bash' by hand, because the ;; interactive specification of this func. is just (interactive). ;; I don't expect anyone will complaint if we change 'N' binding here. >Yes, doing `du -sh` often takes soo long... But we could include sizes >of subdirs only when called with a prefix arg. >I think the default should be to compute the sizes of files in the >directories, too. Perhaps a prefix to not do that... I have included the subdir sizes as an option: currently the subdir sizes are not computed by default. We can change this behaviour to the opposite, with subdir sizes computed by default, after the code being well tested. There are two functions doing the same thing: * my-dired-count-sizes-opt1: * my-dired-count-sizes-opt2: This looks nicer but it requires cl-lib. Current implementation just works for local subdirectories. If the Dired buffer is visiting a remote directory we need to introduce some tramp handlers. I need support from tramp experts. In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.29) of 2016-03-03 built on calancha-pc Repository revision: 887f6126c5ce9084f93083765ac026ca6b28175c ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Following code requires the patch on Bug#22892 (defcustom my-dired-used-space-program "du" "Program to get recursively the total size of a directory We assume the output has the format of `du'. The value of this variable must be just a command name or file name; if you want to specify options, use `my-dired-used-space-args'. A value of nil disables this feature." :type '(choice (string :tag "Program") (const :tag "None" nil)) :group 'dired) ;; this var is not a defcustom because current implementation ;; of `my-dired-count-sizes-opt1' and `my-dired-count-sizes-opt2' expect ;; sizes in bytes; then, depending of the value `my-dired-human-readable' ;; those sizes and shown in human readable units or keep in byts. (defvar my-dired-used-space-args "-sk" "Options to use when running `my-dired-used-space-program'.") (defvar my-dired-human-readable nil "When Non-nil, `my-dired-count-sizes' display file sizes using `file-size-human-readable'.") (defun my-dired-toggle-human-readable () (interactive) (setq my-dired-human-readable (not my-dired-human-readable)) (let ((string (if my-dired-human-readable "Using human-readable units in `my-dired-count-sizes'" "Using comma separator in `my-dired-count-sizes'"))) (message string))) (defun my-dired-use-comma-separator (num) "Return number NUM as an string using comma separator" (replace-regexp-in-string "^," "" (apply 'string (reverse (string-to-list (replace-regexp-in-string "\\([0-9]\\{3\\}\\)" "\\1," (apply 'string (reverse (string-to-list (replace-regexp-in-string "\\.0$" "" (number-to-string num))))))))))) (defun my-dired-file-marked-with-char-p (&optional mark) "Return t if file at current line is marked with MARK When MARK nil, `dired-marked-char' is used. If MARK equals any, any marker is accepted." (let ((marker (cond ((null mark) (dired-marker-regexp)) ((characterp mark) (concat "^" (regexp-quote (char-to-string mark)))) (t (dired-marker-regexp 'all-marks))))) (save-excursion (forward-line 0) (looking-at-p marker)))) ;;; ;;; Doesn't require cl-lib ;;; (defun my-dired-count-sizes-opt1 (&optional mark ask include-dirs) "Count sizes of files marked by MARK mark. When ASK non-nil user is prompted for MARK. Otherwise `dired-marker-char' is used. Optional arg INCLUDE-DIRS, if non-nil, run `my-dired-used-space-program' on the markd directories. Otherwise the size of the directories is not included." ;; TODO: add this info to mode-line and file count too, e.g.: F32 S64k ;; and make minor mode ;; see `dired-change-marks' (interactive (let* ((cursor-in-echo-area t) (default current-prefix-arg) (mark (or (and default (progn (message "Count files marked with mark: ") (read-char))) dired-marker-char)) (dirs (and default my-dired-used-space-program (y-or-n-p "Include directories? ")))) (list mark t dirs))) (unless mark (setq mark dired-marker-char)) ;; If `my-dired-used-space-program' not available signal an error. (when (and include-dirs (not (equal 0 (condition-case nil (process-file my-dired-used-space-program nil nil nil null-device) (error nil))))) (error "Program `my-dired-used-space-program' not found")) (if (eq mark ?\r) (progn (message "Mark cannot be \\r") (sit-for 1) (ding)) (let* ((files (dired-get-marked-files nil nil nil t mark)) (ndirectories 0) (nreg-files 0) (total-size (or (and (not (cdr files)) 0) (apply '+ (mapcar (lambda(fname-attrb) (let ((fname (car fname-attrb)) (attrb (cdr fname-attrb))) (if (eq (elt attrb 0) t) (progn (setq ndirectories (1+ ndirectories)) (if (not include-dirs) 0 (with-temp-buffer (call-process my-dired-used-space-program nil t nil my-dired-used-space-args fname) (goto-char 1) (search-forward-regexp "^[[:alnum:]]+" nil t) (* 1024.0 (string-to-number (match-string 0)))))) (setq nreg-files (1+ nreg-files)) (elt attrb 7)))) (mapcar (lambda(x) (cons x (file-attributes x))) (delq t files)))))) (total-size-str (if my-dired-human-readable (file-size-human-readable total-size) (my-dired-use-comma-separator total-size))) (total-count (if (eq (car files) t) 1 (length files)))) (if (null (cdr files)) (message "No marked files with mark '%s'" (char-to-string mark)) (message "Marked %s %s (%d non-dirs/%d dirs) with '%s' and total size %s%s%s" total-count (or (and (eq (car files) t) "file") "files") nreg-files ndirectories (char-to-string mark) total-size-str (or (and my-dired-human-readable "") " bytes") (or (and (not include-dirs) " (dirs size excluded)") "")))))) (define-key dired-mode-map [(shift f5)] 'my-dired-count-sizes-opt1) ;(define-key dired-mode-map (kbd "N") 'my-dired-count-sizes-opt1); dired-man (define-key dired-mode-map (kbd "*#") 'my-dired-count-sizes-opt1) ;;; ;;; Following function requires cl-lib ;;; (defun my-dired-count-sizes-opt2 (&optional mark ask include-dirs) "Count sizes of files marked by MARK mark. When ASK non-nil user is prompted for MARK. Otherwise `dired-marker-char' is used. Optional arg INCLUDE-DIRS, if non-nil, run `my-dired-used-space-program' on the markd directories. Otherwise the size of the directories is not included." ;; TODO: add this info to mode-line and file count too, e.g.: F32 S64k ;; and make minor mode ;; see `dired-change-marks' (interactive (let* ((cursor-in-echo-area t) (default current-prefix-arg) (mark (or (and default (progn (message "Count files marked with mark: ") (read-char))) dired-marker-char)) (dirs (and default my-dired-used-space-program (y-or-n-p "Include directories? ")))) (list mark t dirs))) (unless mark (setq mark dired-marker-char)) ;; If `my-dired-used-space-program' not available signal an error. (when (and include-dirs (not (equal 0 (condition-case nil (process-file my-dired-used-space-program nil nil nil null-device) (error nil))))) (error "Program `my-dired-used-space-program' not found")) (require 'cl-lib) ; for cl-remove-if and cl-set-difference (if (eq mark ?\r) (progn (message "Mark cannot be \\r") (sit-for 1) (ding)) (let* ((files (dired-get-marked-files nil nil nil t mark)) (non-dirs (cl-remove-if (lambda(x) (eq (car (file-attributes x)) t)) files)) (dirs (cl-set-difference files non-dirs :test 'equal)) (ndirectories (length dirs)) (nreg-files (length non-dirs)) (total-size (apply '+ (mapcar (lambda(x) (elt x 7)) (mapcar 'file-attributes (delq t non-dirs))))) total-size-str total-count) (when (and include-dirs (not (= ndirectories 0))) (let ((size 0)) (with-temp-buffer (apply 'call-process my-dired-used-space-program nil t nil my-dired-used-space-args dirs) (goto-char 1) (while (search-forward-regexp "^[[:alnum:]]+" nil t) (setq size (+ size (string-to-number (match-string 0)))))) (setq total-size (+ total-size (* 1024.0 size))))) (setq total-size-str (if my-dired-human-readable (file-size-human-readable total-size) (my-dired-use-comma-separator total-size)) total-count (if (eq (car files) t) 1 (length files))) (if (null (cdr files)) (message "No marked files with mark '%s'" (char-to-string mark)) (message "Marked %s %s (%d non-dirs/%d dirs) with '%s' and total size %s%s%s" total-count (or (and (eq (car files) t) "file") "files") nreg-files ndirectories (char-to-string mark) total-size-str (or (and my-dired-human-readable "") " bytes") (or (and (not include-dirs) " (dirs size excluded)") "")))))) ;; (define-key dired-mode-map [(shift f5)] 'my-dired-count-sizes-opt2) ;; ;;(define-key dired-mode-map (kbd "N") 'my-dired-count-sizes-opt2); dired-man ;; (define-key dired-mode-map (kbd "*#") 'my-dired-count-sizes-opt2) ;; Bound for comparison with `my-dired-count-sizes-opt1' (bound to '*#') (define-key dired-mode-map (kbd "N") 'my-dired-count-sizes-opt2) (defun my-dired-mark (&optional arg mark) "Mark ARG files and print the total size of marked files In interactive calls, if ARG equals to '(4), the user is asked for arg and marker-char." (interactive (let* ((default current-prefix-arg) (mark (cond ((equal default '(4)) (progn (message "Mark files with mark: ") (read-char))) (t dired-marker-char))) (nfiles (and default (string-to-number (read-string "Number of files to mark: " nil nil "1"))))) (list (list nfiles) mark))) (let ((dired-marker-char (or mark dired-marker-char))) (dired-mark arg)) (my-dired-count-sizes mark)) (define-key dired-mode-map [insert] 'my-dired-mark) (defun my-dired-unmark-backward (&optional arg) "Move ARG up lines, remove deletion flag there and print size of marked files In interactive calls, if `current-prefix-arg' equals '(4), the user is prompt for ARG." (interactive (let* ((default current-prefix-arg) (nfiles (and (equal default '(4)) (string-to-number (read-string "Number of files to unmark: " nil nil "1"))))) (list (or nfiles 1)))) (let (files) (save-excursion (cond ((null arg) (dired-next-line -1) (push (dired-get-filename nil 'noerror) files)) ((or (numberp arg) (and (consp arg) (numberp (car arg)))) (let ((times (or (and (atom arg) arg) (car arg)))) (while (not (= times 0)) (dired-next-line -1) (when (my-dired-file-marked-with-char-p ?a) (push (dired-get-filename nil 'noerror) files)) (setq times (1- times))) (setq files (delq nil files)))))) (dired-unmark-backward arg) (let* ((total-size (apply '+ (mapcar (lambda(x) (elt x 7)) (mapcar 'file-attributes files)))) (total-size-str (if my-dired-human-readable (file-size-human-readable total-size) (my-dired-use-comma-separator total-size)))) (if (null files) (message "No marked files") (message "Unmarked %s %s with %s%s" (length files) (or (and (cdr files) "files") "file") total-size-str (or (and my-dired-human-readable "") " bytes")))))) (define-key dired-mode-map [backspace] 'my-dired-unmark-backward) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; --1468197610-1410875418-1456999120=:25062-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 03 06:21:24 2016 Received: (at 22829) by debbugs.gnu.org; 3 Mar 2016 11:21:24 +0000 Received: from localhost ([127.0.0.1]:58646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abRJs-0002gn-2T for submit@debbugs.gnu.org; Thu, 03 Mar 2016 06:21:24 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50615) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abRJp-0002gY-SV for 22829@debbugs.gnu.org; Thu, 03 Mar 2016 06:21:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abRJk-0006hR-0v for 22829@debbugs.gnu.org; Thu, 03 Mar 2016 06:21:16 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abRJU-0006VP-GV; Thu, 03 Mar 2016 06:21:00 -0500 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1abRJT-0002hc-Ob; Thu, 03 Mar 2016 06:20:59 -0500 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Lars Ingebrigtsen In-reply-to: <87mvqgjefy.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 03 Mar 2016 05:52:33 +0000) Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> <87io14rdpn.fsf@gnus.org> <878u20abot.fsf@mbork.pl> <878u208lf0.fsf@mail.linkov.net> <87mvqgjefy.fsf@gnus.org> Message-Id: Date: Thu, 03 Mar 2016 06:20:59 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22829 Cc: f92capac@gmail.com, 22829@debbugs.gnu.org, mbork@mbork.pl, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] I am concerned that features like these might make Dired painfully slow in difficult cases such as a very large directory. If they are programmed to stop counting after a certain number of matches, that bad effect will be avoided. -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 03 06:26:33 2016 Received: (at 22829) by debbugs.gnu.org; 3 Mar 2016 11:26:33 +0000 Received: from localhost ([127.0.0.1]:58656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abROr-0002sU-9L for submit@debbugs.gnu.org; Thu, 03 Mar 2016 06:26:33 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:45710) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abROo-0002sL-Of for 22829@debbugs.gnu.org; Thu, 03 Mar 2016 06:26:31 -0500 Received: from host86-187-68-58.range86-187.btcentralplus.com ([86.187.68.58] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1abROI-0001vn-6N; Thu, 03 Mar 2016 12:25:58 +0100 From: Lars Ingebrigtsen To: Richard Stallman Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> <87io14rdpn.fsf@gnus.org> <878u20abot.fsf@mbork.pl> <878u208lf0.fsf@mail.linkov.net> <87mvqgjefy.fsf@gnus.org> Date: Thu, 03 Mar 2016 11:25:57 +0000 In-Reply-To: (Richard Stallman's message of "Thu, 03 Mar 2016 06:20:59 -0500") Message-ID: <87fuw7hkfu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1abROI-0001vn-6N X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1457609161.12452@L8Mu+3GyqAB03IkuL28J4w X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22829 Cc: f92capac@gmail.com, 22829@debbugs.gnu.org, mbork@mbork.pl, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Richard Stallman writes: > I am concerned that features like these might make Dired painfully > slow in difficult cases such as a very large directory. If they are > programmed to stop counting after a certain number of matches, that > bad effect will be avoided. These are new interactive commands. They do not slow down anything. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 03 07:28:01 2016 Received: (at 22829) by debbugs.gnu.org; 3 Mar 2016 12:28:02 +0000 Received: from localhost ([127.0.0.1]:58685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abSML-0004Jy-N0 for submit@debbugs.gnu.org; Thu, 03 Mar 2016 07:28:01 -0500 Received: from mout.web.de ([212.227.15.14]:59298) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abSMK-0004Jj-ES for 22829@debbugs.gnu.org; Thu, 03 Mar 2016 07:28:00 -0500 Received: from drachen.dragon ([94.218.223.112]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0M0f1C-1ZkIwJ2WYY-00uqvh; Thu, 03 Mar 2016 13:27:53 +0100 From: Michael Heerdegen To: Tino Calancha Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> Date: Thu, 03 Mar 2016 13:27:52 +0100 In-Reply-To: (Tino Calancha's message of "Thu, 3 Mar 2016 18:58:40 +0900 (JST)") Message-ID: <87k2ljiw53.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:gxwZWa60Q0US187sqNu0HHEAHSJZ00CEYibRgeO8WHn8pCQbS+6 2Zdk9OTVj19KYJpNKmVxy5P+LgQUCY/PjFVgDv90c7UxnTM+Ndn8Xl8Qvn5pI87J1D4kLXH 2dcwNp+EKQEYl8swHA2l7Z0QCf/PytCwDTStAuLNn506P1NcAGvzvvzigq9D2FbacC6RPkw u71UPVl7QHhflqz0Qvb+A== X-UI-Out-Filterresults: notjunk:1;V01:K0:/6ofnPi5M30=:pD+exynxBapPfEpLzEDMBY vDMlUbxifz1fyhGm8TGrCqmMU23umsvN35oeYosR2lyEGbd+t7cGzrf+S9JbqGww7iA4wG4fV 4CW2hvCrZJb2hLRPV9v/ZE2vap6f+ylsrajiJiuUkhZ8E6mJGaZvBrrbytAO26n66jqKHXdaE KbYI6iDD4cupElTq4fbDOrku7gJV5RpTOiN0LsILOcuIuSarKzRgEXWJmEh/5Ue4itkFZ9GKX u+I78tbqclO7FOQb/pMIWgnPRM2vuRbFfzvh7jxkLBb/tAhUSsTTMG4f7exYsRDWkEnaHhhQS 2zaByU+xJko+cddQ6lescP+nTBSEe9svjCA9zXsTT8xrGbJxt5bttsrwoyhO0xwGe9PLQgDAP RQveVigzCxYhY8B2zkPOUptJgqUR8aw7V8T1nIlZHz0iNvNuXMAId/4lH3OnMx+BW1F8GMKja mIyyHItKP2f8NgjdV37AN6/8DeFFrZf5ifeN8Dxowy5RrMAtNwrBBLpgSJtBeFB8i/Xt5473y ldMGWvpLxkpQ6ZxxPMn0CM8GHf6tMc6gk86/1vJmQq+J+f/T8rszni3ojnEditAqKYTTJqh6H zlcVG+3q1UMud26FD9NSm4+pyfJkTE/rtzC4lD3qYasN4/SEctTnkknYATNingU0n7sB9Cyhh ZqC304dXANg0yQIYSqK2iTrEo6tAZs+boUqFgSQUiJTwSwQits0IpvONSXr+huBPC7juqVTNq EaoTh3QLizDB9Tyg7AHFU6SvGvM5DhrLKSwnpIfzbBhvev3PIkv6BvCJfc9M2clk3HI5ASnNH ecRCfPZ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22829 Cc: 22829@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Tino Calancha writes: > We can also reconsider a bit about the keybinding 'N' > for dired-man. Honestly i don't see the needs for this, having `man' > and `woman' working nicely. Indeed, the funtion is not working as it > should: > (dired "/bin") > j bash RET N bash RET > Can=E2=80=99t find the /bin/bash manpage > ;; Notice how i need to introduce 'bash' by hand, because the > ;; interactive specification of this func. is just (interactive). > ;; I don't expect anyone will complaint if we change 'N' binding here. You misinterpret what this command is for (I am using it). The command expects a man page at point (not an executable having a man page). This is like `dired-info' which displays info files from dired. The prompt is for asking for a man command to render the page. This is e.g. useful for software that you didn't install via "make install", or for browsing "/usr/share/man" from within dired. Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 03 07:52:07 2016 Received: (at 22829) by debbugs.gnu.org; 3 Mar 2016 12:52:07 +0000 Received: from localhost ([127.0.0.1]:58700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abSjf-0006Wo-03 for submit@debbugs.gnu.org; Thu, 03 Mar 2016 07:52:07 -0500 Received: from mail-pf0-f169.google.com ([209.85.192.169]:36381) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abSjd-0006WK-Fr for 22829@debbugs.gnu.org; Thu, 03 Mar 2016 07:52:05 -0500 Received: by mail-pf0-f169.google.com with SMTP id 63so14573897pfe.3 for <22829@debbugs.gnu.org>; Thu, 03 Mar 2016 04:52:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:references:date:to:mime-version:content-transfer-encoding :from:message-id:in-reply-to:user-agent; bh=aF/CMwQC6K8XAtgpire0DSVekF+ZHRpHa0mEsveh5HM=; b=iGw4XlylnAtGrSgqZUb35vMoJE5mQP2bdKLQrTYkkRve2J326XxqlZrvofux1b8R8B ciyLeuXDT6RL/nm2CjazqGVxbM49qR20RQfcJbNfCY/tvNL0kJdLvvz0r8tR7Kdl1jPp 3oX/XShxA2/6zqo/s8YZNIQLeKy3cGeCIxcitRU+IvyCDeSeMyD0xVtfGbejmEEzzQR8 Nfp0bBxZ8z80QU4UDIK5VkqVQTOXNthXwoIpFOZ4EA0rTUopa4FCV2ogtQN2sk9r4iEZ jueeuX/mpDxuk2cgPo5h9LXzaHgEIQVu8lGLbDF5SP7nMhqimQ/yU0g1YK71lHB0Hm9m aH9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:references:date:to:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=aF/CMwQC6K8XAtgpire0DSVekF+ZHRpHa0mEsveh5HM=; b=NTY9fbM+Knp9Fu4fnrgDp0+vtj9NqtyQwqKIXXUVkfIloYIUw2DhU/tKzYMNCnzWJN pYcL2gCbklyA01UY3h47sIgmQi/mL5UiHhn69iQyygCILlQihjvZs6DmoYZCawr2d52j M2HWqkiuLETU4XuY8fqf4W7PE6oksU19dFmyfPakj3mYbLKCUkeEQGmY9tpTbnaAgk5m 6vKv7rmOgqpRKo2areOHTqr3ph7Yc+OhH6AhnVKUZtftQ2A8s9xH3jQ7vLKjrgAfWefy q3xKgtkEzt34aLE5MP5CnexBQMlteDXNW/5egp/ypM5VSagx39ngJhBuCvs1wUVq/P92 phSQ== X-Gm-Message-State: AD7BkJLwAUVpoh86BTNXO/gaINhIASfnnlnJBfUwpJPvb+vUL/qEBqaGefKw22Mch7Ecwg== X-Received: by 10.98.16.12 with SMTP id y12mr3456152pfi.6.1457009519672; Thu, 03 Mar 2016 04:51:59 -0800 (PST) Received: from calancha-ilc.kek.jp (calancha-ilc.kek.jp. [130.87.234.234]) by smtp.gmail.com with ESMTPSA id v11sm3895326pfa.60.2016.03.03.04.51.58 for <22829@debbugs.gnu.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 03 Mar 2016 04:51:59 -0800 (PST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> <87k2ljiw53.fsf@web.de> Date: Thu, 03 Mar 2016 21:55:14 +0900 To: "22829@debbugs.gnu.org" <22829@debbugs.gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Constantino Calancha" Message-ID: In-Reply-To: <87k2ljiw53.fsf@web.de> User-Agent: Opera Mail/12.16 (Linux) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22829 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > You misinterpret what this command is for (I am using it). > > The command expects a man page at point (not an executable having a man > page). This is like `dired-info' which displays info files from dired. > The prompt is for asking for a man command to render the page. > > This is e.g. useful for software that you didn't install via "make > install", or for browsing "/usr/share/man" from within dired. Thanks Michael for the clarification. Let's forget about my proposal of binding the new commands with 'N'. '*#' and '*N' are available: both bindings are quite mnemonic and in my keyboard (american one) both looks suitable for carrying this task. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 06 19:29:25 2016 Received: (at 22829) by debbugs.gnu.org; 7 Mar 2016 00:29:25 +0000 Received: from localhost ([127.0.0.1]:37149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1acj36-00062W-Uz for submit@debbugs.gnu.org; Sun, 06 Mar 2016 19:29:25 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:59838 helo=homiemail-a17.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1acj35-00062O-By for 22829@debbugs.gnu.org; Sun, 06 Mar 2016 19:29:23 -0500 Received: from homiemail-a17.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a17.g.dreamhost.com (Postfix) with ESMTP id 7AFAA2B206A; Sun, 6 Mar 2016 16:29:21 -0800 (PST) Received: from localhost.linkov.net (62.65.224.79.cable.starman.ee [62.65.224.79]) (Authenticated sender: jurta@jurta.org) by homiemail-a17.g.dreamhost.com (Postfix) with ESMTPA id ABEAC2B2065; Sun, 6 Mar 2016 16:29:20 -0800 (PST) From: Juri Linkov To: Tino Calancha Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) Organization: LINKOV.NET References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> Date: Mon, 07 Mar 2016 02:04:55 +0200 In-Reply-To: (Tino Calancha's message of "Thu, 3 Mar 2016 18:58:40 +0900 (JST)") Message-ID: <874mcjjfs8.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22829 Cc: 22829@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > I have included the subdir sizes as an option: currently the subdir sizes are > not computed by default. We can change this behaviour to the opposite, > with subdir sizes computed by default, after the code being well tested. Thank you! I have a feeling that code could be optimized more before installing to dired. I'll check it to estimate how well it works. One quick comment: in defcustom my-dired-used-space-program you could find if an executable exists like: (defcustom my-dired-used-space-program (and (executable-find "du") du") For more examples, please see defcustom dired-chown-program or defcustom archive-zip-extract how to define a command with its arguments in one defcustom. > There are two functions doing the same thing: > * my-dired-count-sizes-opt1: > * my-dired-count-sizes-opt2: This looks nicer but it requires cl-lib. dired-aux.el already includes (require 'cl-lib) - twice (just in case :), so there is no problem in using 'cl-lib. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 07 19:24:23 2016 Received: (at 22829) by debbugs.gnu.org; 8 Mar 2016 00:24:23 +0000 Received: from localhost ([127.0.0.1]:38456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1ad5Rn-0000AW-EF for submit@debbugs.gnu.org; Mon, 07 Mar 2016 19:24:23 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:33656 helo=homiemail-a21.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1ad5Rm-0000AO-3q for 22829@debbugs.gnu.org; Mon, 07 Mar 2016 19:24:22 -0500 Received: from homiemail-a21.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTP id 492A2300064; Mon, 7 Mar 2016 16:24:20 -0800 (PST) Received: from localhost.linkov.net (85.253.57.59.cable.starman.ee [85.253.57.59]) (Authenticated sender: jurta@jurta.org) by homiemail-a21.g.dreamhost.com (Postfix) with ESMTPA id 6EA4E300061; Mon, 7 Mar 2016 16:24:19 -0800 (PST) From: Juri Linkov To: Tino Calancha Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) Organization: LINKOV.NET References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> Date: Tue, 08 Mar 2016 02:19:53 +0200 In-Reply-To: (Tino Calancha's message of "Thu, 3 Mar 2016 18:58:40 +0900 (JST)") Message-ID: <87y49tg6s6.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22829 Cc: 22829@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > If we modify `dired-get-marked-files' as in the Bug#22892 > we can get in a straightforward way the file sizes from the file system. > I include the modified version of your code after these comments. I still doubt if old code could be of any help. When using file-attributes instead of parsing the ls output in the dired buffer it would be easier for you to implement new code from scratch with much shorter result. Some parts of old code (to parse the dired buffer) would be useful only in case if you decide to implement displaying recursive directory sizes in-line as was requested yesterday in http://emacs.stackexchange.com/questions/20766/display-recursive-folder-sizes-in-line-in-dired From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 08 05:17:08 2016 Received: (at 22829) by debbugs.gnu.org; 8 Mar 2016 10:17:08 +0000 Received: from localhost ([127.0.0.1]:38656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1adEhQ-0007QD-1q for submit@debbugs.gnu.org; Tue, 08 Mar 2016 05:17:08 -0500 Received: from calancha-ilc.kek.jp ([130.87.234.234]:58831) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1adEhO-0007Pf-NE for 22829@debbugs.gnu.org; Tue, 08 Mar 2016 05:17:07 -0500 Received: by calancha-ilc.kek.jp (Postfix, from userid 500) id 0D0E4DA86; Tue, 8 Mar 2016 19:20:15 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by calancha-ilc.kek.jp (Postfix) with ESMTP id EA6FB642E; Tue, 8 Mar 2016 19:20:15 +0900 (JST) Date: Tue, 8 Mar 2016 19:20:15 +0900 (JST) From: Tino Calancha X-X-Sender: calancha@calancha-ilc.kek.jp To: 22829@debbugs.gnu.org Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) In-Reply-To: <874mcjjfs8.fsf@mail.linkov.net> Message-ID: References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> <874mcjjfs8.fsf@mail.linkov.net> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 22829 Cc: Tino Calancha , 22829@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Thank you! I have a feeling that code could be optimized more before > installing to dired. I'll check it to estimate how well it works. Please, test the latest `my-dired-count-sizes-opt3' (at the end of the comments): *) Added the tramp handlers to make this work on remote directories. *) `du' receives all the directories at once. > One quick comment: in defcustom my-dired-used-space-program > you could find if an executable exists like: > > (defcustom my-dired-used-space-program (and (executable-find "du") du") Thank you. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Following code requires the patch on Bug#22893 (defcustom my-dired-used-space-program (purecopy (let ((opts (if (string-prefix-p "gnu" (symbol-name system-type)) "-sb" "-sk"))) ; -k overestimate used space for files w/ size < 1024 (cond ((executable-find "du") (list "du" opts)) ((file-executable-p "/usr/sbin/du") (list "/usr/sbin/du" opts)) ((file-executable-p "/etc/du") (list "/etc/du" opts)) (t (list "du" opts))))) "Program and its options to get recursively the total size of a directory. We assume the output has the format of `du'. A value of nil disables this feature." :type '(list (string :tag "Program") (repeat :tag "Options" :inline t (stting :format "%v"))) :group 'dired) (defun my-dired-count-sizes-opt3 (&optional mark ask include-dirs) "Count sizes of files marked by MARK mark. When ASK non-nil user is prompted for MARK. Otherwise `dired-marker-char' is used. Optional arg INCLUDE-DIRS, if non-nil, run `my-dired-used-space-program' on the markd directories. Otherwise the size of the directories is not included." ;; TODO: add this info to mode-line and file count too, e.g.: F32 S64k ;; and make minor mode ;; see `dired-change-marks' (interactive (let* ((cursor-in-echo-area t) (default current-prefix-arg) (mark (or (and default (progn (message "Count files marked with mark: ") (read-char))) dired-marker-char)) (dirs (and default (car my-dired-used-space-program) (y-or-n-p "Include directories? ")))) (list mark t dirs))) (unless mark (setq mark dired-marker-char)) ;; If `my-dired-used-space-program' not available signal an error. (when (and include-dirs (not (equal 0 (condition-case nil (process-file (car my-dired-used-space-program) nil nil nil null-device) (error nil))))) (error "Program `my-dired-used-space-program' not found")) (require 'cl-lib) ; for cl-remove-if and cl-nset-difference (if (eq mark ?\r) (progn (message "Mark cannot be \\r") (sit-for 1) (ding)) (let* ((files (dired-get-marked-files nil nil nil t mark)) (num-files (or (and (not (cdr files)) 0) (and (equal t (car files)) (pop files) 1) (length files))) (non-dirs (cl-remove-if (lambda(x) (eq (car (file-attributes x)) t)) files)) (total-size (apply '+ (mapcar (lambda(x) (elt x 7)) (mapcar 'file-attributes non-dirs)))) (dirs (cl-nset-difference files non-dirs :test 'equal)) (num-dirs (length dirs)) (num-non-dirs (- num-files num-dirs)) (handler (and dirs (find-file-name-handler (car dirs) 'call-process))) total-size-str) (when (and include-dirs (not (= num-dirs 0))) (let ((size 0) (scale-factor (if (string= (cadr my-dired-used-space-program) "-sk") 1024.0 1.0))) (with-temp-buffer (if handler (apply handler 'process-file (car my-dired-used-space-program) nil t nil (cadr my-dired-used-space-program) (mapcar 'file-name-nondirectory dirs)) (apply 'process-file (car my-dired-used-space-program) nil t nil (cadr my-dired-used-space-program) dirs)) (goto-char 1) (while (search-forward-regexp "^[0-9]+" nil t) (setq size (+ size (string-to-number (match-string 0)))))) (setq total-size (+ total-size (* scale-factor size))))) (setq total-size-str (if my-dired-human-readable (file-size-human-readable total-size) (my-dired-use-comma-separator total-size))) (if (= num-files 0) (message "No marked files with mark '%s'" (char-to-string mark)) (message "Marked %d %s (%d non-dirs/%d dirs) with '%s' and total size %s%s%s" num-files (or (and (= num-files 1) "file") "files") num-non-dirs num-dirs (char-to-string mark) total-size-str (or (and my-dired-human-readable "") " bytes") (or (and (not include-dirs) " (dirs size excluded)") "")))))) (define-key dired-mode-map (kbd "*N") 'my-dired-count-sizes-opt3) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 08 05:31:39 2016 Received: (at 22829) by debbugs.gnu.org; 8 Mar 2016 10:31:39 +0000 Received: from localhost ([127.0.0.1]:38662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1adEvT-0007kL-FM for submit@debbugs.gnu.org; Tue, 08 Mar 2016 05:31:39 -0500 Received: from calancha-ilc.kek.jp ([130.87.234.234]:58838) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1adEvS-0007k8-7t for 22829@debbugs.gnu.org; Tue, 08 Mar 2016 05:31:38 -0500 Received: by calancha-ilc.kek.jp (Postfix, from userid 500) id 46FEFDA86; Tue, 8 Mar 2016 19:34:47 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by calancha-ilc.kek.jp (Postfix) with ESMTP id D3F8CB41B; Tue, 8 Mar 2016 19:34:47 +0900 (JST) Date: Tue, 8 Mar 2016 19:34:47 +0900 (JST) From: Tino Calancha X-X-Sender: calancha@calancha-ilc.kek.jp To: Juri Linkov Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) In-Reply-To: <87y49tg6s6.fsf@mail.linkov.net> Message-ID: References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> <87y49tg6s6.fsf@mail.linkov.net> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 22829 Cc: Tino Calancha , 22829@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Some parts of old code (to parse the dired buffer) would be useful > only in case if you decide to implement displaying recursive > directory sizes in-line as was requested yesterday in > http://emacs.stackexchange.com/questions/20766/display-recursive-folder-sizes-in-line-in-dired I guess that request is related with the Richard's concern mentioned before in this thread. Adding such information by default in the dired buffer may slow down things too much. If the ls command would add a new switch to show such recursive directory sizes, maybe it could be reasonable to implement such option. Otherwise, i don't think it could be practical. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 09 11:40:16 2016 Received: (at 22829) by debbugs.gnu.org; 9 Mar 2016 16:40:17 +0000 Received: from localhost ([127.0.0.1]:41732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1adh9k-0001xS-Nm for submit@debbugs.gnu.org; Wed, 09 Mar 2016 11:40:16 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57365) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1adh9j-0001xD-De for 22829@debbugs.gnu.org; Wed, 09 Mar 2016 11:40:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adh9Y-0007I8-PI for 22829@debbugs.gnu.org; Wed, 09 Mar 2016 11:40:10 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adh6x-0005ld-23; Wed, 09 Mar 2016 11:37:23 -0500 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1adh6w-000651-BM; Wed, 09 Mar 2016 11:37:22 -0500 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Tino Calancha In-reply-to: (message from Tino Calancha on Tue, 8 Mar 2016 19:34:47 +0900 (JST)) Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> <87y49tg6s6.fsf@mail.linkov.net> Message-Id: Date: Wed, 09 Mar 2016 11:37:22 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22829 Cc: f92capac@gmail.com, 22829@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > I guess that request is related with the Richard's concern mentioned before in this thread. > Adding such information by default in the dired buffer may slow down > things too much. It might be possible to implement somethin to show a certain total by default and avoid a painful slowdown, if the code stops counting when it reaches a certain limit. -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 10:29:27 2019 Received: (at 22829) by debbugs.gnu.org; 25 Jun 2019 14:29:27 +0000 Received: from localhost ([127.0.0.1]:33146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfmRr-0002i3-0O for submit@debbugs.gnu.org; Tue, 25 Jun 2019 10:29:27 -0400 Received: from quimby.gnus.org ([80.91.231.51]:50504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfmRm-0002hs-JO for 22829@debbugs.gnu.org; Tue, 25 Jun 2019 10:29:23 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfmRi-0000u5-F9; Tue, 25 Jun 2019 16:29:20 +0200 From: Lars Ingebrigtsen To: "Constantino Calancha" Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> <87k2ljiw53.fsf@web.de> Date: Tue, 25 Jun 2019 16:29:18 +0200 In-Reply-To: (Constantino Calancha's message of "Thu, 03 Mar 2016 21:55:14 +0900") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: "Constantino Calancha" writes: > '*#' and '*N' are available: both bindings are quite mnemonic > and in my keyboard (american one) both looks suitable for carrying > this task. `* N' sounds nice. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22829 Cc: "22829@debbugs.gnu.org" <22829@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Constantino Calancha" writes: > '*#' and '*N' are available: both bindings are quite mnemonic > and in my keyboard (american one) both looks suitable for carrying > this task. `* N' sounds nice. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 10:29:46 2019 Received: (at 22829) by debbugs.gnu.org; 25 Jun 2019 14:29:46 +0000 Received: from localhost ([127.0.0.1]:33149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfmSA-0002ia-CO for submit@debbugs.gnu.org; Tue, 25 Jun 2019 10:29:46 -0400 Received: from quimby.gnus.org ([80.91.231.51]:50518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfmS8-0002iR-6T for 22829@debbugs.gnu.org; Tue, 25 Jun 2019 10:29:44 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfmS3-0000wQ-FD; Tue, 25 Jun 2019 16:29:43 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#22829: Acknowledgement (25.1.50; Display number of marked files) References: <87mvqlv1h4.fsf@gnus.org> <87fuw9203w.fsf@mail.linkov.net> <87io14rdpn.fsf@gnus.org> Date: Tue, 25 Jun 2019 16:29:39 +0200 In-Reply-To: <87io14rdpn.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 02 Mar 2016 17:28:52 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > Juri Linkov writes: > >> I confirm this is very useful. I'm using the same for a long time, >> but additionally also displaying a total sum of sizes on every mark >> (this emulates [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22829 Cc: Tino Calancha , 22829@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Juri Linkov writes: > >> I confirm this is very useful. I'm using the same for a long time, >> but additionally also displaying a total sum of sizes on every mark >> (this emulates the behavior of File Commanders on marking files by INS). > > This is beginning to sound more useful. :-) Including both the number > of files and the total file size is something I could see myself wanting > to have. > > Tino, could you amend your patch to do that, too? I did this, and have now committed to the Emacs trunk. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 10:29:52 2019 Received: (at control) by debbugs.gnu.org; 25 Jun 2019 14:29:52 +0000 Received: from localhost ([127.0.0.1]:33152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfmSF-0002it-OT for submit@debbugs.gnu.org; Tue, 25 Jun 2019 10:29:52 -0400 Received: from quimby.gnus.org ([80.91.231.51]:50534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfmSE-0002il-Cx for control@debbugs.gnu.org; Tue, 25 Jun 2019 10:29:50 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfmSB-0000wX-SN for control@debbugs.gnu.org; Tue, 25 Jun 2019 16:29:49 +0200 Date: Tue, 25 Jun 2019 16:29:47 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #22829 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 22829 fixed close 22829 27.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 22829 fixed close 22829 27.1 quit From unknown Fri Aug 15 02:01:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 24 Jul 2019 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator