From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Re: Directory name to variable (dired?) Date: Mon, 8 Oct 2018 07:18:26 -0800 Organization: AkWebsoft Message-ID: <20181008151826.GF17855@mail.akwebsoft.com> References: <20181007214950.GA17855@mail.akwebsoft.com> <20181007231453.GB17855@mail.akwebsoft.com> <9c5dbc22-80fa-4284-b4ed-46b70425d6b0@default> <20181008002005.GD17855@mail.akwebsoft.com> <7b0e4173-69d6-4f90-8563-dad8a8a36820@default> <20181008150817.GE17855@mail.akwebsoft.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1539011826 10599 195.159.176.226 (8 Oct 2018 15:17:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 8 Oct 2018 15:17:06 +0000 (UTC) User-Agent: Mutt/1.10.0 (2018-05-17) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 08 17:17:02 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9XHJ-0002c3-Jk for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Oct 2018 17:17:01 +0200 Original-Received: from localhost ([::1]:46851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9XJP-0000lZ-VJ for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Oct 2018 11:19:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9XIr-0000ky-0u for help-gnu-emacs@gnu.org; Mon, 08 Oct 2018 11:18:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9XIm-00047u-Bv for help-gnu-emacs@gnu.org; Mon, 08 Oct 2018 11:18:36 -0400 Original-Received: from tjohnson.mtaonline.net ([64.4.232.191]:55794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9XIj-0003ym-Ub for help-gnu-emacs@gnu.org; Mon, 08 Oct 2018 11:18:32 -0400 Original-Received: by linus (Postfix, from userid 1000) id 448FC24015F; Mon, 8 Oct 2018 07:18:26 -0800 (AKDT) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <20181008150817.GE17855@mail.akwebsoft.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.4.232.191 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118205 Archived-At: * Tim Johnson [181008 07:15]: > * Drew Adams [181007 17:59]: > > > And I note that `default-directory is buffer local, so my variable > > > assignment must be made while I am still in dired. > > > > It is buffer-local, but it is available in any buffer. > To determine if a buffer is a dired buffer, it seems that I can > verify that by evaluating `dired-omit-mode > > Is there a more idiomatic way to do so? Duh! Asked and answered: Probably something like (eq (major-mode) "dired-mode") ;; untested thanks to everyone, good thread -- Tim Johnson http://www.tj49.com