GNU bug report logs - #21573
24.5; file-accessible-directory-p behaves incorrectly with executable file on Mac OS X

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Praveen Kumar <kprav33n@HIDDEN>; dated Sun, 27 Sep 2015 16:16:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 21573 <at> debbugs.gnu.org:


Received: (at 21573) by debbugs.gnu.org; 26 Mar 2016 10:07:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 26 06:07:50 2016
Received: from localhost ([127.0.0.1]:38269 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ajl8H-0007Ld-Vr
	for submit <at> debbugs.gnu.org; Sat, 26 Mar 2016 06:07:50 -0400
Received: from mail.hostpark.net ([212.243.197.30]:59649)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jonas@HIDDEN>) id 1ajl8G-0007LO-5z
 for 21573 <at> debbugs.gnu.org; Sat, 26 Mar 2016 06:07:48 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.hostpark.net (Postfix) with ESMTP id 9573F16A7A
 for <21573 <at> debbugs.gnu.org>; Sat, 26 Mar 2016 11:07:41 +0100 (CET)
X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net
Received: from mail.hostpark.net ([127.0.0.1])
 by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10124)
 with ESMTP id lig8zT28T7lI for <21573 <at> debbugs.gnu.org>;
 Sat, 26 Mar 2016 11:07:41 +0100 (CET)
Received: from hal (84-73-67-69.dclient.hispeed.ch [84.73.67.69])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mail.hostpark.net (Postfix) with ESMTPSA id 33C2516A78
 for <21573 <at> debbugs.gnu.org>; Sat, 26 Mar 2016 11:07:41 +0100 (CET)
User-agent: mu4e 0.9.17; emacs 25.0.92.1
From: Jonas Bernoulli <jonas@HIDDEN>
To: 21573 <at> debbugs.gnu.org
Subject: Re: bug#21573
Date: Sat, 26 Mar 2016 11:07:31 +0100
Message-ID: <8760w9imcc.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 21573
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Would it be possible to work around this by replacing

  (file-accessible-directory-p file)

with

  (and (file-directory-p file)
       (file-accessible-directory-p file))

or does `file-directory-p' suffer from the same issue?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21573; Package emacs. Full text available.

Message received at 21573 <at> debbugs.gnu.org:


Received: (at 21573) by debbugs.gnu.org; 6 Dec 2015 06:29:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 06 01:29:01 2015
Received: from localhost ([127.0.0.1]:40310 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a5Soe-0002lm-8q
	for submit <at> debbugs.gnu.org; Sun, 06 Dec 2015 01:29:00 -0500
Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:56271)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <mituharu@HIDDEN>) id 1a5Soa-0002lX-BK
 for 21573 <at> debbugs.gnu.org; Sun, 06 Dec 2015 01:28:58 -0500
Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10])
 by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id D761BC0572;
 Sun,  6 Dec 2015 15:28:52 +0900 (JST)
Date: Sun, 06 Dec 2015 15:28:52 +0900
Message-ID: <wl610c3xaz.wl%mituharu@HIDDEN>
From: YAMAMOTO Mitsuharu <mituharu@HIDDEN>
To: Alexander Zhukov <zuav@HIDDEN>
Subject: Re: bug#21573: (no subject)
In-Reply-To: <m28u5bbu0i.fsf@HIDDEN>
References: <CAKS2yETB6Vd_7_=raEEa_WGBU-UzvaxuZfvpVLEESJFHLCO61w@HIDDEN>
 <m2d1uobtzy.fsf@HIDDEN> <8337vkj96q.fsf@HIDDEN>
 <m28u5bbu0i.fsf@HIDDEN>
User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8
 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8)
 MULE/5.0 (SAKAKI)
Organization: Faculty of Science, Chiba University
MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
Content-Type: text/plain; charset=US-ASCII
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  >>>>> On Thu, 03 Dec 2015 15:23:41 +0300, Alexander Zhukov
 <zuav@HIDDEN> said: > Yes, it's OS X specific. Even more, it's seems
 to be specific to my > machine and the author of the original bug. I have
 reported this bug > to magit initially and so far nobody with OS X machines
 was able to > reproduce the bug. [...] 
 Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 2.0 SLIGHTLY_BAD_SUBJECT   Subject contains something slightly spammy
 -0.0 T_RP_MATCHES_RCVD      Envelope sender domain matches handover relay
 domain
X-Debbugs-Envelope-To: 21573
Cc: 21573 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  >>>>> On Thu, 03 Dec 2015 15:23:41 +0300, Alexander Zhukov
    <zuav@HIDDEN> said: > Yes, it's OS X specific. Even more, it's seems
    to be specific to my > machine and the author of the original bug. I have
    reported this bug > to magit initially and so far nobody with OS X machines
    was able to > reproduce the bug. [...] 
 
 Content analysis details:   (2.0 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  2.0 SLIGHTLY_BAD_SUBJECT   Subject contains something slightly spammy
 -0.0 T_RP_MATCHES_RCVD      Envelope sender domain matches handover relay
                             domain

>>>>> On Thu, 03 Dec 2015 15:23:41 +0300, Alexander Zhukov <zuav@HIDDEN> said:

> Yes, it's OS X specific. Even more, it's seems to be specific to my
> machine and the author of the original bug. I have reported this bug
> to magit initially and so far nobody with OS X machines was able to
> reproduce the bug.

I could reproduce it with the Mac port as well as the NS port on OS X
10.11.  It seems that faccessat (AT_CWD, "pathToExecutable/.", F_OK,
AT_EACCESS) returns 0 after the call to -[NSWindow
setRepresentedFilename:@"pathToExecutable"], which sets the proxy icon
on the title bar.  If you compile the source (faccessattest.m) at the
end of this mail with $ cc faccessattest.m -framework Cocoa, and run
it with $ ./a.out, then the output becomes

-1
0

rather than expected

-1
-1

I've just sent a bug report to Apple.

				     YAMAMOTO Mitsuharu
				mituharu@HIDDEN

#import <Cocoa/Cocoa.h>

int main (int argc, char *argv[])
{
  char *name, *nameWithSlashDot;

  name = argv[argc - 1];
  nameWithSlashDot = alloca (strlen (name) + sizeof ("/."));
  sprintf (nameWithSlashDot, "%s/.", name);

  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
  NSWindow *window = [[[NSWindow alloc] init] autorelease];

  printf ("%d\n", faccessat (AT_FDCWD, nameWithSlashDot, F_OK, AT_EACCESS));
  [window setRepresentedFilename:[NSString stringWithUTF8String:name]];
  printf ("%d\n", faccessat (AT_FDCWD, nameWithSlashDot, F_OK, AT_EACCESS));

  [pool release];
}




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21573; Package emacs. Full text available.

Message received at 21573 <at> debbugs.gnu.org:


Received: (at 21573) by debbugs.gnu.org; 3 Dec 2015 16:50:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 03 11:50:54 2015
Received: from localhost ([127.0.0.1]:37700 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a4X5n-00075P-HM
	for submit <at> debbugs.gnu.org; Thu, 03 Dec 2015 11:50:54 -0500
Received: from eu2.mail.crystax.net ([144.76.48.94]:29146)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <zuav@HIDDEN>) id 1a4SvY-0005aj-JJ
 for 21573 <at> debbugs.gnu.org; Thu, 03 Dec 2015 07:24:03 -0500
Received: by eu2.mail.crystax.net (Postfix, from userid 65534)
 id 6C173201F3; Thu,  3 Dec 2015 15:23:54 +0300 (MSK)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crystax.net;
 s=CRYSTAX; t=1449145434;
 bh=dv+Ax14+Z95ZB48AdhnAs8bC3KfD7bi7PfOKcGQbzIk=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To;
 b=NDatp0mLDvITJOX+ieyjk4td/pn9JskM4HbQMFWgjV+mifgQ3l+b+86zzfhMMHUK9
 +QBPh0I/Ft3zHrA3MiRBK4T7Ghco4xH9dqBuNDfPoJrkPox8M/A6MBQRKg2SRB0h23
 E6UeuGxopqsVgHo4ixKNvinexxNyDrZtdjY7H/Aw=
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on eu2.mail.crystax.net
X-Spam-Level: 
X-Spam-Status: No, score=-103.0 required=3.5 tests=ALL_TRUSTED,BAYES_00,
 DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,USER_IN_WHITELIST autolearn=ham
 autolearn_force=no version=3.4.1
Received: from ithilien (unknown [77.241.46.223])
 by eu2.mail.crystax.net (Postfix) with ESMTPSA id 62E9A201E7;
 Thu,  3 Dec 2015 15:23:42 +0300 (MSK)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crystax.net;
 s=CRYSTAX; t=1449145422;
 bh=dv+Ax14+Z95ZB48AdhnAs8bC3KfD7bi7PfOKcGQbzIk=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To;
 b=ONgnKLE2zc/djfY827lNHkj69bm5ET77ivhmoyrGrtTA6+GJSbt58B3e3NTY3/dZ3
 RewkI1NXpqOk5BmKwtQoJRcRSWIr5sIEsbI1Lt/w7iTqBn96v7mXlyYju02CK/HLwA
 r6BYsmVsUzU++Dj0nytCanyIENyPgB5v0+71GGIU=
From: Alexander Zhukov <zuav@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#21573: (no subject)
References: <CAKS2yETB6Vd_7_=raEEa_WGBU-UzvaxuZfvpVLEESJFHLCO61w@HIDDEN>
 <m2d1uobtzy.fsf@HIDDEN> <8337vkj96q.fsf@HIDDEN>
Date: Thu, 03 Dec 2015 15:23:41 +0300
In-Reply-To: <8337vkj96q.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 03 Dec
 2015 09:14:05 +0200")
Message-ID: <m28u5bbu0i.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  >>>>> Eli Zaretskii (EZ) writes: >> From: Alexander Zhukov
 <zuav@HIDDEN> Date: Wed, 02 Dec 2015 >> 21:11:45 +0300 >> >> 1. Create
 Git repo with a one file: some bash scripts with >> executable bit set, f.e.
 script.sh. >> >> 2. Open fresh terminal. I mean close running terminal app
 with Cmd-Q >> and run a fresh copy. >> >> 3. Run Emacs app like this: >>
 /Applications/Emacs.app/Contents/MacOS/Emacs -Q & >> >> 4. Eval in the scratch
 buffer (file-accessible-directory-p >> "/private/var/tmp/repo/script.sh").
 The result should be 'nil' >> >> 5. Open file: C-x C-f ".../script.sh" >>
 >> 6. Go back the scratch buffer and eval (file-accessible-directory-p >>
 ".../script.sh") The result should be 't'. [...] 
 Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 2.0 SLIGHTLY_BAD_SUBJECT   Subject contains something slightly spammy
 -0.0 T_RP_MATCHES_RCVD      Envelope sender domain matches handover relay
 domain
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 T_DKIM_INVALID         DKIM-Signature header exists but is not valid
X-Debbugs-Envelope-To: 21573
X-Mailman-Approved-At: Thu, 03 Dec 2015 11:50:48 -0500
Cc: 21573 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  >>>>> Eli Zaretskii (EZ) writes: >> From: Alexander Zhukov
    <zuav@HIDDEN> Date: Wed, 02 Dec 2015 >> 21:11:45 +0300 >> >> 1. Create
    Git repo with a one file: some bash scripts with >> executable bit set, f.e.
    script.sh. >> >> 2. Open fresh terminal. I mean close running terminal app
    with Cmd-Q >> and run a fresh copy. >> >> 3. Run Emacs app like this: >>
   /Applications/Emacs.app/Contents/MacOS/Emacs -Q & >> >> 4. Eval in the scratch
    buffer (file-accessible-directory-p >> "/private/var/tmp/repo/script.sh").
    The result should be 'nil' >> >> 5. Open file: C-x C-f ".../script.sh" >>
    >> 6. Go back the scratch buffer and eval (file-accessible-directory-p >>
    ".../script.sh") The result should be 't'. [...] 
 
 Content analysis details:   (2.0 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  2.0 SLIGHTLY_BAD_SUBJECT   Subject contains something slightly spammy
 -0.0 T_RP_MATCHES_RCVD      Envelope sender domain matches handover relay
                             domain
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 T_DKIM_INVALID         DKIM-Signature header exists but is not valid

>>>>> Eli Zaretskii (EZ) writes:

 >> From: Alexander Zhukov <zuav@HIDDEN> Date: Wed, 02 Dec 2015
 >> 21:11:45 +0300
 >> 
 >> 1. Create Git repo with a one file: some bash scripts with
 >> executable bit set, f.e. script.sh.
 >> 
 >> 2. Open fresh terminal. I mean close running terminal app with Cmd-Q
 >> and run a fresh copy.
 >> 
 >> 3. Run Emacs app like this:
 >> /Applications/Emacs.app/Contents/MacOS/Emacs -Q &
 >> 
 >> 4. Eval in the scratch buffer (file-accessible-directory-p
 >> "/private/var/tmp/repo/script.sh"). The result should be 'nil'
 >> 
 >> 5. Open file: C-x C-f ".../script.sh"
 >> 
 >> 6. Go back the scratch buffer and eval (file-accessible-directory-p
 >> ".../script.sh") The result should be 't'.

 EZ> It is nil here.

 >> 7. Exit Emacs with C-x C-c
 >> 
 >> 8. Run Emacs from the same terminal window as in 3.
 >> 
 >> 9. Eval in the scratch buffer (file-accessible-directory-p
 >> "/private/var/tmp/repo/script.sh") The result should be t

 EZ> No, it again returns nil here.  As it should, since this file is
 EZ> not a directory.

 >> NB I'm using standard terminal app that goes with OS X.

 EZ> Could be something OS X specific, I tried on GNU/Linux and on
 EZ> Windows, and the function always returns nil for files that are not
 EZ> directories.

 EZ> I tried both in a Git repository where I have many files, and in a
 EZ> repository where I have only one shell script, as you mentioned.
 EZ> The results are always the same.

Yes, it's OS X specific. Even more, it's seems to be specific to my
machine and the author of the original bug. I have reported this bug to
magit initially and so far nobody with OS X machines was able to
reproduce the bug.

 EZ> What version of Emacs do you use?

GNU Emacs 24.5.1 (x86_64-apple-darwin14.3.0, NS apple-appkit-1347.57) of
2015-04-13 on ithilien

-- 
Alexander Zhukov




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21573; Package emacs. Full text available.

Message received at 21573 <at> debbugs.gnu.org:


Received: (at 21573) by debbugs.gnu.org; 3 Dec 2015 07:14:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 03 02:14:26 2015
Received: from localhost ([127.0.0.1]:36825 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a4O5x-0006ta-QR
	for submit <at> debbugs.gnu.org; Thu, 03 Dec 2015 02:14:26 -0500
Received: from mtaout20.012.net.il ([80.179.55.166]:57475)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1a4O5v-0006tR-GN
 for 21573 <at> debbugs.gnu.org; Thu, 03 Dec 2015 02:14:24 -0500
Received: from conversion-daemon.a-mtaout20.012.net.il by
 a-mtaout20.012.net.il (HyperSendmail v2007.08) id
 <0NYR00100TBLAN00@HIDDEN> for 21573 <at> debbugs.gnu.org;
 Thu, 03 Dec 2015 09:14:22 +0200 (IST)
Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NYR000KRTFXYC60@HIDDEN>;
 Thu, 03 Dec 2015 09:14:22 +0200 (IST)
Date: Thu, 03 Dec 2015 09:14:05 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#21573: (no subject)
In-reply-to: <m2d1uobtzy.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Alexander Zhukov <zuav@HIDDEN>
Message-id: <8337vkj96q.fsf@HIDDEN>
References: <CAKS2yETB6Vd_7_=raEEa_WGBU-UzvaxuZfvpVLEESJFHLCO61w@HIDDEN>
 <m2d1uobtzy.fsf@HIDDEN>
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  > From: Alexander Zhukov <zuav@HIDDEN> > Date: Wed, 02
 Dec 2015 21:11:45 +0300 > > 1. Create Git repo with a one file: some bash
 scripts with executable > bit set, f.e. script.sh. > > 2. Open fresh terminal.
 I mean close running terminal app with Cmd-Q and > run a fresh copy. > >
 3. Run Emacs app like this: /Applications/Emacs.app/Contents/MacOS/Emacs >
 -Q & > > 4. Eval in the scratch buffer (file-accessible-directory-p >
 "/private/var/tmp/repo/script.sh").
 The result should be 'nil' > > 5. Open file: C-x C-f ".../script.sh" > >
 6. Go back the scratch buffer and eval > (file-accessible-directory-p
 ".../script.sh") > The result should be 't'. [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 2.0 SLIGHTLY_BAD_SUBJECT   Subject contains something slightly spammy
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
 trust [80.179.55.166 listed in list.dnswl.org]
 0.9 SPF_FAIL               SPF: sender does not match SPF record (fail)
 [SPF failed: Please see http://www.openspf.net/Why?s=mfrom; id=eliz%40gnu.org;
 ip=80.179.55.166; r=debbugs.gnu.org]
X-Debbugs-Envelope-To: 21573
Cc: 21573 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > From: Alexander Zhukov <zuav@HIDDEN> > Date: Wed, 02
    Dec 2015 21:11:45 +0300 > > 1. Create Git repo with a one file: some bash
    scripts with executable > bit set, f.e. script.sh. > > 2. Open fresh terminal.
    I mean close running terminal app with Cmd-Q and > run a fresh copy. > >
   3. Run Emacs app like this: /Applications/Emacs.app/Contents/MacOS/Emacs >
    -Q & > > 4. Eval in the scratch buffer (file-accessible-directory-p > "/private/var/tmp/repo/script.sh").
    The result should be 'nil' > > 5. Open file: C-x C-f ".../script.sh" > >
   6. Go back the scratch buffer and eval > (file-accessible-directory-p ".../script.sh")
    > The result should be 't'. [...] 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
                             trust
                             [80.179.55.166 listed in list.dnswl.org]
  2.0 SLIGHTLY_BAD_SUBJECT   Subject contains something slightly spammy
  0.9 SPF_FAIL               SPF: sender does not match SPF record (fail)
 [SPF failed: Please see http://www.openspf.net/Why?s=mfrom;id=eliz%40gnu.org;ip=80.179.55.166;r=debbugs.gnu.org]

> From: Alexander Zhukov <zuav@HIDDEN>
> Date: Wed, 02 Dec 2015 21:11:45 +0300
> 
> 1. Create Git repo with a one file: some bash scripts with executable
>    bit set, f.e. script.sh.
> 
> 2. Open fresh terminal. I mean close running terminal app with Cmd-Q and
>    run a fresh copy.
> 
> 3. Run Emacs app like this: /Applications/Emacs.app/Contents/MacOS/Emacs
>    -Q &
> 
> 4. Eval in the scratch buffer (file-accessible-directory-p
>    "/private/var/tmp/repo/script.sh"). The result should be 'nil'
> 
> 5. Open file: C-x C-f ".../script.sh"
> 
> 6. Go back the scratch buffer and eval
>    (file-accessible-directory-p ".../script.sh")
>    The result should be 't'.

It is nil here.

> 7. Exit Emacs with C-x C-c
> 
> 8. Run Emacs from the same terminal window as in 3.
> 
> 9. Eval in the scratch buffer
>    (file-accessible-directory-p "/private/var/tmp/repo/script.sh")
>    The result should be t

No, it again returns nil here.  As it should, since this file is not a
directory.

> NB I'm using standard terminal app that goes with OS X.

Could be something OS X specific, I tried on GNU/Linux and on Windows,
and the function always returns nil for files that are not
directories.

I tried both in a Git repository where I have many files, and in a
repository where I have only one shell script, as you mentioned.  The
results are always the same.

What version of Emacs do you use?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21573; Package emacs. Full text available.

Message received at 21573 <at> debbugs.gnu.org:


Received: (at 21573) by debbugs.gnu.org; 2 Dec 2015 18:17:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 02 13:17:23 2015
Received: from localhost ([127.0.0.1]:36507 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a4Bxy-0004xM-Gg
	for submit <at> debbugs.gnu.org; Wed, 02 Dec 2015 13:17:23 -0500
Received: from eu2.mail.crystax.net ([144.76.48.94]:20370)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <zuav@HIDDEN>) id 1a4Bso-0004p0-J9
 for 21573 <at> debbugs.gnu.org; Wed, 02 Dec 2015 13:12:04 -0500
Received: by eu2.mail.crystax.net (Postfix, from userid 65534)
 id DFD3DB6ED; Wed,  2 Dec 2015 21:12:00 +0300 (MSK)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crystax.net;
 s=CRYSTAX; t=1449079920;
 bh=vDKXOW0o6DJ/Rz49W4c20/Eva4cCLuEIjpS8+XZsfDw=; h=From:To:Date;
 b=gYCMrUvYUuFGASxgMCyQb8fGljHgJ9lgNuZBJ9uHv4YAMoG6JVouvwWL3XhWaoZt5
 S2qRDqUymuNa3OaxKmNDi7tjOspuHkJRynvcK2vobTzjomHx43/2LuqGk/2QOvzquP
 4tmXcDoiY6oVdKXkksJsckgM2JLfl3DBKhxYF7+g=
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on eu2.mail.crystax.net
X-Spam-Level: 
X-Spam-Status: No, score=-101.2 required=3.5 tests=ALL_TRUSTED,BAYES_00,
 DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MISSING_SUBJECT,USER_IN_WHITELIST
 autolearn=no autolearn_force=no version=3.4.1
Received: from ithilien (unknown [77.241.46.223])
 by eu2.mail.crystax.net (Postfix) with ESMTPSA id A9693B6E7
 for <21573 <at> debbugs.gnu.org>; Wed,  2 Dec 2015 21:11:47 +0300 (MSK)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crystax.net;
 s=CRYSTAX; t=1449079909;
 bh=vDKXOW0o6DJ/Rz49W4c20/Eva4cCLuEIjpS8+XZsfDw=; h=From:To:Date;
 b=Pi1sbPuqNaQSUhz7zob3eoiClAix15btCxOc6/MtVx1hVTHQ52sT2gP2oA0R2GO6Y
 1sQ2OPE1194bTGhMR19G78npZcs9eOhSVxsRqaxJC9cVSXDphsreSKYol0s/DSXhqi
 TlXPxol+T8lCDjugb5vowZQY4BdtJoC5acrU6y/I=
From: Alexander Zhukov <zuav@HIDDEN>
To: 21573 <at> debbugs.gnu.org
Date: Wed, 02 Dec 2015 21:11:45 +0300
Message-ID: <m2d1uobtzy.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: Hi! Below are the steps I did used to reproduce the problem
 releated to the bug. Please, see https://github.com/magit/magit/issues/2408
 for more info. [...] 
 Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 T_RP_MATCHES_RCVD      Envelope sender domain matches handover relay
 domain
 -0.0 SPF_PASS               SPF: sender matches SPF record
 1.8 MISSING_SUBJECT        Missing Subject: header
 0.2 NO_SUBJECT             Extra score for no subject
 0.0 T_DKIM_INVALID         DKIM-Signature header exists but is not valid
X-Debbugs-Envelope-To: 21573
X-Mailman-Approved-At: Wed, 02 Dec 2015 13:17:20 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Hi! Below are the steps I did used to reproduce the problem
    releated to the bug. Please, see https://github.com/magit/magit/issues/2408
    for more info. [...] 
 
 Content analysis details:   (2.0 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 T_RP_MATCHES_RCVD      Envelope sender domain matches handover relay
                             domain
 -0.0 SPF_PASS               SPF: sender matches SPF record
  1.8 MISSING_SUBJECT        Missing Subject: header
  0.2 NO_SUBJECT             Extra score for no subject
  0.0 T_DKIM_INVALID         DKIM-Signature header exists but is not valid

Hi!

Below are the steps I did used to reproduce the problem releated to the
bug.

Please, see https://github.com/magit/magit/issues/2408 for more info.

Here the steps:

1. Create Git repo with a one file: some bash scripts with executable
   bit set, f.e. script.sh.

2. Open fresh terminal. I mean close running terminal app with Cmd-Q and
   run a fresh copy.

3. Run Emacs app like this: /Applications/Emacs.app/Contents/MacOS/Emacs
   -Q &

4. Eval in the scratch buffer (file-accessible-directory-p
   "/private/var/tmp/repo/script.sh"). The result should be 'nil'

5. Open file: C-x C-f ".../script.sh"

6. Go back the scratch buffer and eval
   (file-accessible-directory-p ".../script.sh")
   The result should be 't'.

7. Exit Emacs with C-x C-c

8. Run Emacs from the same terminal window as in 3.

9. Eval in the scratch buffer
   (file-accessible-directory-p "/private/var/tmp/repo/script.sh")
   The result should be t

NB I'm using standard terminal app that goes with OS X.

-- 
Alexander Zhukov




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21573; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Sep 2015 16:15:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 27 12:15:24 2015
Received: from localhost ([127.0.0.1]:45800 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZgEbj-0001xT-AH
	for submit <at> debbugs.gnu.org; Sun, 27 Sep 2015 12:15:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55642)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <kprav33n@HIDDEN>) id 1Zg5Qj-0003Tr-Pw
 for submit <at> debbugs.gnu.org; Sun, 27 Sep 2015 02:27:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <kprav33n@HIDDEN>) id 1Zg5Qh-0004xi-Rf
 for submit <at> debbugs.gnu.org; Sun, 27 Sep 2015 02:27:25 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:55300)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <kprav33n@HIDDEN>) id 1Zg5Qh-0004xe-OR
 for submit <at> debbugs.gnu.org; Sun, 27 Sep 2015 02:27:23 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37414)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <kprav33n@HIDDEN>) id 1Zg5Qg-0006eX-DL
 for bug-gnu-emacs@HIDDEN; Sun, 27 Sep 2015 02:27:23 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <kprav33n@HIDDEN>) id 1Zg5Qe-0004xQ-SV
 for bug-gnu-emacs@HIDDEN; Sun, 27 Sep 2015 02:27:22 -0400
Received: from mail-oi0-x22a.google.com ([2607:f8b0:4003:c06::22a]:34154)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <kprav33n@HIDDEN>) id 1Zg5Qe-0004xM-KP
 for bug-gnu-emacs@HIDDEN; Sun, 27 Sep 2015 02:27:20 -0400
Received: by oiev17 with SMTP id v17so76461129oie.1
 for <bug-gnu-emacs@HIDDEN>; Sat, 26 Sep 2015 23:27:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:date:message-id:subject:from:to:content-type;
 bh=IAeN48QG+8C2o6c/Z3ukppg5HmeynMPIAEPTxYxO0os=;
 b=f7cPZAqbDb8/8wa4hDpB7A3wZ516dSQ7JFKjSfcrQZQ9Gyx39Vx7Sz5mkWIw/Ux7Qu
 aWGehXyfSbgq86Oy9XEu04BKa/lb4gfdFw+i4CMHAQxtKjf5miU/RKblxB5reHKGV5ER
 PcBt32Ox0gnKcZbaiARTPCexxGuabRtNv5J4POZbLpTVXAx/J8DUkKu82yK+NpUGgwfo
 KXZKc/c7w7hapHPCjOSpLNcdI7vHnUiGdm4/4lKib7vN/GNWRbv1ZJimhDKSuPNOL73S
 QPVRAvV/QuAm33bKQyJTw9Jxq4+rZeJYvSuvpPe9FL5TNP36BIH30NsMeDutdDYZXreJ
 cRig==
MIME-Version: 1.0
X-Received: by 10.202.192.131 with SMTP id q125mr7185872oif.118.1443335239755; 
 Sat, 26 Sep 2015 23:27:19 -0700 (PDT)
Received: by 10.60.39.2 with HTTP; Sat, 26 Sep 2015 23:27:19 -0700 (PDT)
Date: Sat, 26 Sep 2015 23:27:19 -0700
Message-ID: <CAKS2yETB6Vd_7_=raEEa_WGBU-UzvaxuZfvpVLEESJFHLCO61w@HIDDEN>
Subject: 24.5; file-accessible-directory-p behaves incorrectly with executable
 file on Mac OS X
From: Praveen Kumar <kprav33n@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary=001a113dd9d241eeb40520b4ac40
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 27 Sep 2015 12:15:20 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--001a113dd9d241eeb40520b4ac40
Content-Type: text/plain; charset=UTF-8

Create an executable file (script) as follows:


$ cat > /tmp/hello.py

#!/usr/bin/env python

print 'Hello, world!'


$ chmod a+x /tmp/hello.py


Now open the file /tmp/hello.py in Emacs in graphical mode on Mac OS

X. Whil in the hello.py buffer, evaluate the following expression (M-:)


(file-accessible-directory-p buffer-file-name)


This should return nil, because the given file is not a

directory. However, this returns t.


While performing the same in terminal mode, file-accessibel-directory-p

returns nil for the same buffer.


This is inconsistent behavior. This is affecting some extensions those

use this function.




In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)

of 2015-04-10 on builder10-9.porkrind.org

Windowing system distributor `Apple', version 10.3.1348

Configured using:

`configure --with-ns '--enable-locallisppath=/Library/Application

Support/Emacs/${version}/site-lisp:/Library/Application

Support/Emacs/site-lisp''


Important settings:

  value of $LANG: en_US.UTF-8

  locale-coding-system: utf-8-unix


Major mode: Python


Minor modes in effect:

  tooltip-mode: t

  electric-indent-mode: t

  mouse-wheel-mode: t

  tool-bar-mode: t

  menu-bar-mode: t

  file-name-shadow-mode: t

  global-font-lock-mode: t

  font-lock-mode: t

  blink-cursor-mode: t

  auto-composition-mode: t

  auto-encryption-mode: t

  auto-compression-mode: t

  line-number-mode: t

  transient-mark-mode: t


Recent messages:

For information about GNU Emacs and the GNU system, type C-h C-a.

user-error: Beginning of history; no preceding item [2 times]

t

nil

Can't guess python-indent-offset, using defaults: 4

t

Quit

Can't guess python-indent-offset, using defaults: 4

t


Load-path shadows:

None found.


Features:

(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml

mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev

gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util

help-fns mail-prsvr mail-utils vc-git python easymenu json comint ring

cl-loaddefs cl-lib ansi-color time-date tooltip electric uniquify

ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset

image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode

register page menu-bar rfn-eshadow timer select scroll-bar mouse

jit-lock font-lock syntax facemenu font-core frame cham georgian

utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean

japanese hebrew greek romanian slovak czech european ethiopic indian

cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev

minibuffer 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 make-network-process

cocoa ns multi-tty emacs)


Memory information:

((conses 16 80948 5235)

(symbols 48 18314 0)

(miscs 40 48 207)

(strings 32 13377 3859)

(string-bytes 1 387833)

(vectors 16 10470)

(vector-slots 8 385377 7455)

(floats 8 54 283)

(intervals 56 358 4)

(buffers 960 15))

--001a113dd9d241eeb40520b4ac40
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">







<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">Create an executable file (script) as follow=
s:</span></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">$ cat &gt; /tmp/hello.py</span></p>
<p class=3D""><span class=3D"">#!/usr/bin/env python</span></p>
<p class=3D""><span class=3D"">print &#39;Hello, world!&#39;</span></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">$ chmod a+x /tmp/hello.py</span></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">Now open the file /tmp/hello.py in Emacs in =
graphical mode on Mac OS</span></p>
<p class=3D""><span class=3D"">X. Whil in the hello.py buffer, evaluate the=
 following expression (M-:)</span></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">(file-accessible-directory-p buffer-file-nam=
e)</span></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">This should return nil, because the given fi=
le is not a</span></p>
<p class=3D""><span class=3D"">directory. However, this returns t.</span></=
p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">While performing the same in terminal mode, =
file-accessibel-directory-p</span></p>
<p class=3D""><span class=3D"">returns nil for the same buffer.</span></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">This is inconsistent behavior. This is affec=
ting some extensions those</span></p>
<p class=3D""><span class=3D"">use this function.</span></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4=
.0, NS apple-appkit-1265.21)</span></p>
<p class=3D""><span class=3D"">of 2015-04-10 on <a href=3D"http://builder10=
-9.porkrind.org">builder10-9.porkrind.org</a></span></p>
<p class=3D""><span class=3D"">Windowing system distributor `Apple&#39;, ve=
rsion 10.3.1348</span></p>
<p class=3D""><span class=3D"">Configured using:</span></p>
<p class=3D""><span class=3D"">`configure --with-ns &#39;--enable-locallisp=
path=3D/Library/Application</span></p>
<p class=3D""><span class=3D"">Support/Emacs/${version}/site-lisp:/Library/=
Application</span></p>
<p class=3D""><span class=3D"">Support/Emacs/site-lisp&#39;&#39;</span></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">Important settings:</span></p>
<p class=3D""><span class=3D"">=C2=A0 value of $LANG: en_US.UTF-8</span></p=
>
<p class=3D""><span class=3D"">=C2=A0 locale-coding-system: utf-8-unix</spa=
n></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">Major mode: Python</span></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">Minor modes in effect:</span></p>
<p class=3D""><span class=3D"">=C2=A0 tooltip-mode: t</span></p>
<p class=3D""><span class=3D"">=C2=A0 electric-indent-mode: t</span></p>
<p class=3D""><span class=3D"">=C2=A0 mouse-wheel-mode: t</span></p>
<p class=3D""><span class=3D"">=C2=A0 tool-bar-mode: t</span></p>
<p class=3D""><span class=3D"">=C2=A0 menu-bar-mode: t</span></p>
<p class=3D""><span class=3D"">=C2=A0 file-name-shadow-mode: t</span></p>
<p class=3D""><span class=3D"">=C2=A0 global-font-lock-mode: t</span></p>
<p class=3D""><span class=3D"">=C2=A0 font-lock-mode: t</span></p>
<p class=3D""><span class=3D"">=C2=A0 blink-cursor-mode: t</span></p>
<p class=3D""><span class=3D"">=C2=A0 auto-composition-mode: t</span></p>
<p class=3D""><span class=3D"">=C2=A0 auto-encryption-mode: t</span></p>
<p class=3D""><span class=3D"">=C2=A0 auto-compression-mode: t</span></p>
<p class=3D""><span class=3D"">=C2=A0 line-number-mode: t</span></p>
<p class=3D""><span class=3D"">=C2=A0 transient-mark-mode: t</span></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">Recent messages:</span></p>
<p class=3D""><span class=3D"">For information about GNU Emacs and the GNU =
system, type C-h C-a.</span></p>
<p class=3D""><span class=3D"">user-error: Beginning of history; no precedi=
ng item [2 times]</span></p>
<p class=3D""><span class=3D"">t</span></p>
<p class=3D""><span class=3D"">nil</span></p>
<p class=3D""><span class=3D"">Can&#39;t guess python-indent-offset, using =
defaults: 4</span></p>
<p class=3D""><span class=3D"">t</span></p>
<p class=3D""><span class=3D"">Quit</span></p>
<p class=3D""><span class=3D"">Can&#39;t guess python-indent-offset, using =
defaults: 4</span></p>
<p class=3D""><span class=3D"">t</span></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">Load-path shadows:</span></p>
<p class=3D""><span class=3D"">None found.</span></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">Features:</span></p>
<p class=3D""><span class=3D"">(shadow sort gnus-util mail-extr emacsbug me=
ssage format-spec rfc822 mml</span></p>
<p class=3D""><span class=3D"">mml-sec mm-decode mm-bodies mm-encode mail-p=
arse rfc2231 mailabbrev</span></p>
<p class=3D""><span class=3D"">gmm-utils mailheader sendmail rfc2047 rfc204=
5 ietf-drums mm-util</span></p>
<p class=3D""><span class=3D"">help-fns mail-prsvr mail-utils vc-git python=
 easymenu json comint ring</span></p>
<p class=3D""><span class=3D"">cl-loaddefs cl-lib ansi-color time-date tool=
tip electric uniquify</span></p>
<p class=3D""><span class=3D"">ediff-hook vc-hooks lisp-float-type mwheel n=
s-win tool-bar dnd fontset</span></p>
<p class=3D""><span class=3D"">image regexp-opt fringe tabulated-list newco=
mment lisp-mode prog-mode</span></p>
<p class=3D""><span class=3D"">register page menu-bar rfn-eshadow timer sel=
ect scroll-bar mouse</span></p>
<p class=3D""><span class=3D"">jit-lock font-lock syntax facemenu font-core=
 frame cham georgian</span></p>
<p class=3D""><span class=3D"">utf-8-lang misc-lang vietnamese tibetan thai=
 tai-viet lao korean</span></p>
<p class=3D""><span class=3D"">japanese hebrew greek romanian slovak czech =
european ethiopic indian</span></p>
<p class=3D""><span class=3D"">cyrillic chinese case-table epa-hook jka-cmp=
r-hook help simple abbrev</span></p>
<p class=3D""><span class=3D"">minibuffer nadvice loaddefs button faces cus=
-face macroexp files</span></p>
<p class=3D""><span class=3D"">text-properties overlay sha1 md5 base64 form=
at env code-pages mule</span></p>
<p class=3D""><span class=3D"">custom widget hashtable-print-readable backq=
uote make-network-process</span></p>
<p class=3D""><span class=3D"">cocoa ns multi-tty emacs)</span></p>
<p class=3D""><span class=3D""></span><br></p>
<p class=3D""><span class=3D"">Memory information:</span></p>
<p class=3D""><span class=3D"">((conses 16 80948 5235)</span></p>
<p class=3D""><span class=3D"">(symbols 48 18314 0)</span></p>
<p class=3D""><span class=3D"">(miscs 40 48 207)</span></p>
<p class=3D""><span class=3D"">(strings 32 13377 3859)</span></p>
<p class=3D""><span class=3D"">(string-bytes 1 387833)</span></p>
<p class=3D""><span class=3D"">(vectors 16 10470)</span></p>
<p class=3D""><span class=3D"">(vector-slots 8 385377 7455)</span></p>
<p class=3D""><span class=3D"">(floats 8 54 283)</span></p>
<p class=3D""><span class=3D"">(intervals 56 358 4)</span></p>
<p class=3D""><span class=3D"">(buffers 960 15))</span></p></div>

--001a113dd9d241eeb40520b4ac40--




Acknowledgement sent to Praveen Kumar <kprav33n@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#21573; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.