From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 12:55:55 2017 Received: (at submit) by debbugs.gnu.org; 5 Mar 2017 17:55:56 +0000 Received: from localhost ([127.0.0.1]:41229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckaNv-0001BI-Ga for submit@debbugs.gnu.org; Sun, 05 Mar 2017 12:55:55 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckaNt-0001Az-Mb for submit@debbugs.gnu.org; Sun, 05 Mar 2017 12:55:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckaNn-00028U-0g for submit@debbugs.gnu.org; Sun, 05 Mar 2017 12:55:48 -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.3 required=5.0 tests=BAYES_50,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49109) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ckaNm-000289-Tm for submit@debbugs.gnu.org; Sun, 05 Mar 2017 12:55:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckaNl-0001la-8m for bug-gnu-emacs@gnu.org; Sun, 05 Mar 2017 12:55:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckaNi-00024O-4k for bug-gnu-emacs@gnu.org; Sun, 05 Mar 2017 12:55:45 -0500 Received: from gproxy6-pub.mail.unifiedlayer.com ([67.222.39.168]:36494) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ckaNh-000236-Kj for bug-gnu-emacs@gnu.org; Sun, 05 Mar 2017 12:55:42 -0500 Received: (qmail 5842 invoked by uid 0); 5 Mar 2017 17:55:27 -0000 Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy6.mail.unifiedlayer.com with SMTP; 5 Mar 2017 17:55:27 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id sHvP1u00W2f2jeq01HvStv; Sun, 05 Mar 2017 10:55:27 -0700 X-Authority-Analysis: v=2.1 cv=R4+QR7hX c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=6Iz7jQTuP9IA:10 a=l05HkUJgB8fd0-uaMoQA:9 a=77Na18wavAi-fx8F:21 a=BiSx3WcNwXM56b2X:21 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=EiSn1hyPPN0mPq4nnEYaa6Sl7ayFoNyt4xol3AvdbhY=; b=cpFYvEAFP2CCEbBWvlhcnLjE1z MRX0ZtXBsft1w8tWset9WLMgiMIeuIIPxFA+Ebswm8E+cB5usRI1girK5jyW7yEnNnjCtdYr8a72B JWD/Fdvujuds6Hs14baDB3zZI; Received: from 71-218-43-111.hlrn.qwest.net ([71.218.43.111]:57486 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1ckaNP-0003eI-84 for bug-gnu-emacs@gnu.org; Sun, 05 Mar 2017 10:55:23 -0700 From: Tom Tromey To: bug-gnu-emacs@gnu.org Subject: 25.2; set dired-directory in vc-dir mode Date: Sun, 05 Mar 2017 10:55:21 -0700 Message-ID: <87r32b1ud2.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box522.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.218.43.111 X-Exim-ID: 1ckaNP-0003eI-84 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-218-43-111.hlrn.qwest.net (bapiya) [71.218.43.111]:57486 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] 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.5 (----) 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.5 (----) I'd find it handy if vc-dir buffers had dired-directory set. This can serve as an indication that the buffer is associated with some directory, even though it's not visiting a file. I've appended the patch I would like to apply. Let me know what you think. Tom diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 0363aab..2281333 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -1016,6 +1016,7 @@ vc-dir-mode (set (make-local-variable 'vc-ewoc) (ewoc-create #'vc-dir-printer)) (set (make-local-variable 'revert-buffer-function) 'vc-dir-revert-buffer-function) + (setq dired-directory default-directory) (setq list-buffers-directory (expand-file-name "*vc-dir*" default-directory)) (add-to-list 'vc-dir-buffers (current-buffer)) ;; Make sure that if the directory buffer is killed, the update In GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.8) of 2017-03-02 built on bapiya Repository revision: 6e788ef0e262fafc014c21f4ad52cc5dc9f1715b Windowing system distributor 'Fedora Project', version 11.0.11901000 System Description: Fedora release 25 (Twenty Five) Configured using: 'configure --prefix=/home/tromey/Emacs/install/ --with-modules' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES Important settings: value of $LANG: en_US.utf8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: VC dir Minor modes in effect: shell-dirtrack-mode: t diff-auto-refine-mode: t which-function-mode: t global-auto-revert-mode: t erc-services-mode: t erc-list-mode: t erc-menu-mode: t erc-autojoin-mode: t erc-ring-mode: t erc-networks-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-match-mode: t erc-netsplit-mode: t erc-hl-nicks-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t savehist-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Mark set [2 times] Sending... Mark set [2 times] Sending via mail... Type C-x 1 to delete the help window. [2 times] Sending email Sending email done Sending...done a is undefined Scanning for dabbrevs...done Load-path shadows: /home/tromey/.emacs.d/elpa/bubbles-0.5/bubbles hides /home/tromey/Emacs/install/share/emacs/25.2/lisp/play/bubbles /home/tromey/.emacs.d/elpa/soap-client-3.1.1/soap-inspect hides /home/tromey/Emacs/install/share/emacs/25.2/lisp/net/soap-inspect /home/tromey/.emacs.d/elpa/soap-client-3.1.1/soap-client hides /home/tromey/Emacs/install/share/emacs/25.2/lisp/net/soap-client Features: (shadow emacsbug network-stream nsm starttls tls gnutls mailalias smtpmail sort mailcap bbdb-message sendmail mail-extr vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs whitespace log-edit message idna dired rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util cc-mode cc-fonts cc-guess cc-menus cc-cmds shell rx dabbrev eieio-opt speedbar sb-image ezimage dframe find-func copyright debug add-log vc-git diff-mode easy-mmode misearch multi-isearch jka-compr flyspell ispell diminish edmacro kmacro projectile grep compile ibuf-ext ibuffer dash appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs which-func imenu minimap autorevert filenotify cus-start cus-load status erc-services erc-list erc-menu erc-join erc-ring erc-networks erc-pcomplete pcomplete erc-track erc-match erc-netsplit erc-hl-nicks color erc-button erc-fill erc-stamp wid-edit erc-goodies erc erc-backend erc-compat format-spec auth-source eieio gnus-util mm-util help-fns mail-prsvr password-cache thingatpt pp warnings advice vc-dir ewoc vc vc-dispatcher cc-styles cc-align cc-engine cc-vars cc-defs bbdb bbdb-site timezone ange-ftp comint ansi-color ring server savehist finder-inf dwarf-mode-autoloads gdb-shell-autoloads eieio-core lisppaste-autoloads pydoc-info-autoloads info-look cl-seq cl-macs cl weblogger-autoloads info package epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib bbdb-loaddefs time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 349646 37130) (symbols 48 38486 0) (miscs 40 928 1341) (strings 32 81666 10590) (string-bytes 1 2782947) (vectors 16 40092) (vector-slots 8 1457709 144853) (floats 8 533 448) (intervals 56 14838 166) (buffers 976 42)) From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 18:55:28 2017 Received: (at 25983) by debbugs.gnu.org; 5 Mar 2017 23:55:28 +0000 Received: from localhost ([127.0.0.1]:41515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckfzs-00058t-GK for submit@debbugs.gnu.org; Sun, 05 Mar 2017 18:55:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckfzp-00058f-9C for 25983@debbugs.gnu.org; Sun, 05 Mar 2017 18:55:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckfzj-0001md-AN for 25983@debbugs.gnu.org; Sun, 05 Mar 2017 18:55:20 -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]:37959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckfzJ-0001bh-Ql; Sun, 05 Mar 2017 18:54:53 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ckfzH-0006YJ-9b; Sun, 05 Mar 2017 18:54:51 -0500 From: Glenn Morris To: Tom Tromey Subject: Re: bug#25983: 25.2; set dired-directory in vc-dir mode References: <87r32b1ud2.fsf@tromey.com> X-Spook: National security Los Zetas Port Authority IMF Plume AMW X-Ran: _+:[Q(85n9yRM7mM,d/wN.sdE{`VB:S4@@SHBk]*Zc"3./>~k.dS?/~CjI9\[5M|rrRG\s X-Hue: brightred X-Debbugs-No-Ack: yes X-Attribution: GM Date: Sun, 05 Mar 2017 18:54:51 -0500 In-Reply-To: <87r32b1ud2.fsf@tromey.com> (Tom Tromey's message of "Sun, 05 Mar 2017 10:55:21 -0700") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain 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: 25983 Cc: 25983@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: -5.0 (-----) Tom Tromey wrote: > I'd find it handy if vc-dir buffers had dired-directory set. > This can serve as an indication that the buffer is associated with some > directory, even though it's not visiting a file. Is dired-directory not basically an internal dired variable that should only be set in Dired mode, and modes derived from it, which vc-dir is not? Documentation: The directory name or wildcard spec that this Dired directory lists. Local to each Dired buffer. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 19:05:03 2017 Received: (at 25983) by debbugs.gnu.org; 6 Mar 2017 00:05:03 +0000 Received: from localhost ([127.0.0.1]:41523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckg99-0005NR-Jo for submit@debbugs.gnu.org; Sun, 05 Mar 2017 19:05:03 -0500 Received: from gproxy7-pub.mail.unifiedlayer.com ([70.40.196.235]:47876) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1ckg97-0005Ms-Et for 25983@debbugs.gnu.org; Sun, 05 Mar 2017 19:05:02 -0500 Received: (qmail 19531 invoked by uid 0); 6 Mar 2017 00:04:51 -0000 Received: from unknown (HELO cmgw2) (10.0.90.83) by gproxy7.mail.unifiedlayer.com with SMTP; 6 Mar 2017 00:04:51 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw2 with id sQ4l1u01Q2f2jeq01Q4oTw; Sun, 05 Mar 2017 17:04:51 -0700 X-Authority-Analysis: v=2.1 cv=H5NInYoi c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=6Iz7jQTuP9IA:10 a=mDV3o1hIAAAA:8 a=Jp7hOZt7zGVzuTXQRA4A:9 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=eeYX0L3Cu7CB6+uG+jVLmlJnWFqnopgd5umnM6t09xw=; b=VzX792o4r+BMAG8e/pMhnHQAnf DE2t7TRPYX9KGlLfQMCFWNVE019/N3Z/EXcm3O8xoEOMGAXt8LlqYpJY1Db5JY36vPBZpE1hoXjW6 I1eg7YpMZNof1gbYlPV8sGG5v; Received: from 71-218-43-111.hlrn.qwest.net ([71.218.43.111]:54598 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1ckg8r-0004Gh-Ly; Sun, 05 Mar 2017 17:04:45 -0700 From: Tom Tromey To: Glenn Morris Subject: Re: bug#25983: 25.2; set dired-directory in vc-dir mode References: <87r32b1ud2.fsf@tromey.com> X-Attribution: Tom Date: Sun, 05 Mar 2017 17:04:44 -0700 In-Reply-To: (Glenn Morris's message of "Sun, 05 Mar 2017 18:54:51 -0500") Message-ID: <87h9371d9f.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box522.bluehost.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.218.43.111 X-Exim-ID: 1ckg8r-0004Gh-Ly X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-218-43-111.hlrn.qwest.net (bapiya) [71.218.43.111]:54598 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 25983 Cc: Tom Tromey , 25983@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.1 (/) >>>>> "GM" == Glenn Morris writes: GM> Is dired-directory not basically an internal dired variable that should GM> only be set in Dired mode, and modes derived from it, which vc-dir is not? Various bits of code (and some other code I have seen, not part of Emacs) seem to examine it. And vc-dir seems dired-like. The basic problem is that I don't think there's a good way to indicate: "this buffer is associated with this directory, but isn't visiting a file". dired-directory is the only one I know of. default-directory seems almost right but it's a bit random for some buffers; like *shell* or *compilation*. There's list-buffer-directory but it is just a random string, not actually a directory name. The backstory for this bug is that I have this handy bit of code I got from someone on #emacs: ;; From fledermaus (defun kill-buffers-under (under) (interactive "DKill buffers under: ") (setq under (concat "^" (expand-file-name under))) (mapc (lambda (buf) (let ((path (or (buffer-file-name buf) (progn (set-buffer buf) (and dired-directory (expand-file-name dired-directory)) )) )) ;;(message "checking %S: %S vs |%s|" buf path under) (and path (string-match under path) (progn (message "Killing buffer %s" (buffer-name buf)) (kill-buffer buf))) )) (buffer-list))) ... and I'd rather not add a special hack just for vc-dir, and then for whatever other modes crop up. I guess I'm being a bit lazy trying to avoid introducing a new variable. But maybe I should? Tom From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 15 11:51:36 2020 Received: (at 25983) by debbugs.gnu.org; 15 Sep 2020 15:51:36 +0000 Received: from localhost ([127.0.0.1]:60352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIDF1-0006G4-TO for submit@debbugs.gnu.org; Tue, 15 Sep 2020 11:51:36 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIDEz-0006Fn-9N for 25983@debbugs.gnu.org; Tue, 15 Sep 2020 11:51:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ePLGDHLeYPWsQ3je6BQ1fdh8L396M2LIk8NrV2P0gAY=; b=tAtq5TXAKtLg1KdOUiHyE0OSSI bIviuHm7QfS1QLnjnrfIR9vNO89GbUosuDua/nCDckUNobNjUfOb5J24mBYFlyMzyIttHpZ7FIzGr +grbDit+4y9ACVMvBk55Qw2x5Zn8Lo2vSsr96ZueGeun9/ucwi9sSKj4Iotq1wBwgJx8=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIDEq-0001ya-08; Tue, 15 Sep 2020 17:51:26 +0200 From: Lars Ingebrigtsen To: Tom Tromey Subject: Re: bug#25983: 25.2; set dired-directory in vc-dir mode References: <87r32b1ud2.fsf@tromey.com> <87h9371d9f.fsf@tromey.com> X-Now-Playing: Saito Koji's _433-1_: "433_056" Date: Tue, 15 Sep 2020 17:51:22 +0200 In-Reply-To: <87h9371d9f.fsf@tromey.com> (Tom Tromey's message of "Sun, 05 Mar 2017 17:04:44 -0700") Message-ID: <871rj36nt1.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: Tom Tromey writes: >>>>>> "GM" == Glenn Morris writes: > > GM> Is dired-directory not basically an internal dired variable that should > GM> only be set in Dired mode, and modes derived from it, which vc-d [...] 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: 25983 Cc: Glenn Morris , 25983@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 (-) Tom Tromey writes: >>>>>> "GM" == Glenn Morris writes: > > GM> Is dired-directory not basically an internal dired variable that should > GM> only be set in Dired mode, and modes derived from it, which vc-dir is not? > > Various bits of code (and some other code I have seen, not part of > Emacs) seem to examine it. And vc-dir seems dired-like. Hm... Well, there's a bunch of buffers that are kinda-sorta dired-like (like `M-x grep'), so adding this just to vc-dir seems a bit odd to me. > The backstory for this bug is that I have this handy bit of code I got > from someone on #emacs: > > ;; From fledermaus > (defun kill-buffers-under (under) [...] > (and dired-directory > (expand-file-name dired-directory)) )) )) [...] > ... and I'd rather not add a special hack just for vc-dir, and then for > whatever other modes crop up. > > I guess I'm being a bit lazy trying to avoid introducing a new variable. > But maybe I should? All buffers have a default-directory, but you want to make a function that kills are buffers that are "like" dired (in that they display a buffer pointing to a directory, and there are things you can do there)? I don't think you'll be able to find a definition of what's "like" dired enough that this would make sense... especially when the use case doesn't seem that ... comprehensible? That is, I think only the user that writes a function like this knows what buffer types they want to consider killing. Finding a general solution here doesn't seem very likely, so I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 15 11:51:44 2020 Received: (at control) by debbugs.gnu.org; 15 Sep 2020 15:51:44 +0000 Received: from localhost ([127.0.0.1]:60355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIDFA-0006GQ-7b for submit@debbugs.gnu.org; Tue, 15 Sep 2020 11:51:44 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIDF8-0006GD-GM for control@debbugs.gnu.org; Tue, 15 Sep 2020 11:51:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MivH87Snh5mQhei8d7AHRvAkx6u+oH1H/BhUTfW1Y+Q=; b=eQTYKehJNkBg/h+jxNhEg8gyT4 ex3vxhJLVsuh3JN90XI6jg4dk0KRZxW7E57BeWsBKNmZvl18JfUW1ENEFf7uusl+gMC1ErQ5qgHwX F+mJlxgKpXZdfIv1Bm6zh3MXLazRD6al+TerWznkPfInhl7hZnMx9RzTakO2E5wrWlgA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIDF0-0001yi-L6 for control@debbugs.gnu.org; Tue, 15 Sep 2020 17:51:36 +0200 Date: Tue, 15 Sep 2020 17:51:33 +0200 Message-Id: <87zh5r598a.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #25983 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 25983 wontfix close 25983 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 25983 wontfix close 25983 quit From unknown Sat Aug 09 14:04:57 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, 14 Oct 2020 11:24:09 +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