From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 27 12:15:24 2015 Received: (at submit) by debbugs.gnu.org; 27 Sep 2015 16:15:24 +0000 Received: from localhost ([127.0.0.1]:45800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgEbj-0001xT-AH for submit@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 ) id 1Zg5Qj-0003Tr-Pw for submit@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 ) id 1Zg5Qh-0004xi-Rf for submit@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 ) id 1Zg5Qh-0004xe-OR for submit@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 ) id 1Zg5Qg-0006eX-DL for bug-gnu-emacs@gnu.org; Sun, 27 Sep 2015 02:27:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zg5Qe-0004xQ-SV for bug-gnu-emacs@gnu.org; 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 ) id 1Zg5Qe-0004xM-KP for bug-gnu-emacs@gnu.org; Sun, 27 Sep 2015 02:27:20 -0400 Received: by oiev17 with SMTP id v17so76461129oie.1 for ; 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: Subject: 24.5; file-accessible-directory-p behaves incorrectly with executable file on Mac OS X From: Praveen Kumar To: bug-gnu-emacs@gnu.org 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@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (----) --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


Create an executable file (script) as follow= s:


$ 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-nam= e)


This should return nil, because the given fi= le 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 affec= ting 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', ve= rsion 10.3.1348

Configured using:

`configure --with-ns '--enable-locallisp= path=3D/Library/Application

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

Support/Emacs/site-lisp''


Important settings:

=C2=A0 value of $LANG: en_US.UTF-8

=C2=A0 locale-coding-system: utf-8-unix


Major mode: Python


Minor modes in effect:

=C2=A0 tooltip-mode: t

=C2=A0 electric-indent-mode: t

=C2=A0 mouse-wheel-mode: t

=C2=A0 tool-bar-mode: t

=C2=A0 menu-bar-mode: t

=C2=A0 file-name-shadow-mode: t

=C2=A0 global-font-lock-mode: t

=C2=A0 font-lock-mode: t

=C2=A0 blink-cursor-mode: t

=C2=A0 auto-composition-mode: t

=C2=A0 auto-encryption-mode: t

=C2=A0 auto-compression-mode: t

=C2=A0 line-number-mode: t

=C2=A0 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 precedi= ng 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 me= ssage format-spec rfc822 mml

mml-sec mm-decode mm-bodies mm-encode mail-p= arse rfc2231 mailabbrev

gmm-utils mailheader sendmail rfc2047 rfc204= 5 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 tool= tip electric uniquify

ediff-hook vc-hooks lisp-float-type mwheel n= s-win tool-bar dnd fontset

image regexp-opt fringe tabulated-list newco= mment lisp-mode prog-mode

register page menu-bar rfn-eshadow timer sel= ect 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-cmp= r-hook help simple abbrev

minibuffer nadvice loaddefs button faces cus= -face macroexp files

text-properties overlay sha1 md5 base64 form= at env code-pages mule

custom widget hashtable-print-readable backq= uote 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-- From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 02 13:17:23 2015 Received: (at 21573) by debbugs.gnu.org; 2 Dec 2015 18:17:23 +0000 Received: from localhost ([127.0.0.1]:36507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4Bxy-0004xM-Gg for submit@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 ) id 1a4Bso-0004p0-J9 for 21573@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@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 To: 21573@debbugs.gnu.org Date: Wed, 02 Dec 2015 21:11:45 +0300 Message-ID: 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@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 03 02:14:26 2015 Received: (at 21573) by debbugs.gnu.org; 3 Dec 2015 07:14:26 +0000 Received: from localhost ([127.0.0.1]:36825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4O5x-0006ta-QR for submit@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 ) id 1a4O5v-0006tR-GN for 21573@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@a-mtaout20.012.net.il> for 21573@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@a-mtaout20.012.net.il>; Thu, 03 Dec 2015 09:14:22 +0200 (IST) Date: Thu, 03 Dec 2015 09:14:05 +0200 From: Eli Zaretskii Subject: Re: bug#21573: (no subject) In-reply-to: X-012-Sender: halo1@inter.net.il To: Alexander Zhukov Message-id: <8337vkj96q.fsf@gnu.org> References: 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 > 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@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii 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: 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 > 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 > 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? From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 03 11:50:54 2015 Received: (at 21573) by debbugs.gnu.org; 3 Dec 2015 16:50:54 +0000 Received: from localhost ([127.0.0.1]:37700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4X5n-00075P-HM for submit@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 ) id 1a4SvY-0005aj-JJ for 21573@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 To: Eli Zaretskii Subject: Re: bug#21573: (no subject) References: <8337vkj96q.fsf@gnu.org> Date: Thu, 03 Dec 2015 15:23:41 +0300 In-Reply-To: <8337vkj96q.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 03 Dec 2015 09:14:05 +0200") Message-ID: 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 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@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 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 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 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 06 01:29:01 2015 Received: (at 21573) by debbugs.gnu.org; 6 Dec 2015 06:29:01 +0000 Received: from localhost ([127.0.0.1]:40310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5Soe-0002lm-8q for submit@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 ) id 1a5Soa-0002lX-BK for 21573@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: From: YAMAMOTO Mitsuharu To: Alexander Zhukov Subject: Re: bug#21573: (no subject) In-Reply-To: References: <8337vkj96q.fsf@gnu.org> 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 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@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 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 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 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@math.s.chiba-u.ac.jp #import 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]; } From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 26 06:07:50 2016 Received: (at 21573) by debbugs.gnu.org; 26 Mar 2016 10:07:50 +0000 Received: from localhost ([127.0.0.1]:38269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ajl8H-0007Ld-Vr for submit@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 ) id 1ajl8G-0007LO-5z for 21573@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@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@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@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 To: 21573@debbugs.gnu.org Subject: Re: bug#21573 Date: Sat, 26 Mar 2016 11:07:31 +0100 Message-ID: <8760w9imcc.fsf@bernoul.li> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21573 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 (/) 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? From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 03 05:44:55 2021 Received: (at 21573-done) by debbugs.gnu.org; 3 Jan 2021 10:44:55 +0000 Received: from localhost ([127.0.0.1]:33350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kw0sZ-0007ri-31 for submit@debbugs.gnu.org; Sun, 03 Jan 2021 05:44:55 -0500 Received: from outbound.soverin.net ([116.202.65.218]:33281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kw0sX-0007rV-Up for 21573-done@debbugs.gnu.org; Sun, 03 Jan 2021 05:44:54 -0500 Received: from smtp.soverin.net (unknown [10.10.3.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id EB24C60846; Sun, 3 Jan 2021 10:44:47 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.142]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1609670687; bh=RGlN46LshjOec5N+O6vv2xHuXnUVDWmTCyBFq3CGm5c=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=N+V50Dp2SxuRaG3D0ANZ+MwF3DqbZReHCUCieao6+o/Ar0wCetkV0staM/S41FwW3 yFJa0EKix5GgMdbYXJBoEnKiQvKDgLwBsZNfyKBsBMwF2LZ4LlM9/7f2huJIxw1dvP T3zsLxp1lfd2XoPnIJMg+EykqSZ9Ns1gIq812gOGmuRVK6Q1fgYLvwkwV77/LfXHaO U4IrG8XhfeMcIHzKshXpuL+2t0G2ou/W4DjMNXkkhB1X166kW10AdYovlLXT7tBfQA Z0+NQTdIwKOR8m7Z8mUrRLf18BdoSuEI9+RB4VgbwdRXYSLxNrHvz5IGMVIogsupb3 sOyGxricT6SMg== Received: by breton.holly.idiocy.org (Postfix, from userid 501) id C177620298C910; Sun, 3 Jan 2021 10:44:45 +0000 (GMT) From: Alan Third To: YAMAMOTO Mitsuharu Subject: Re: bug#21573: 24.5; file-accessible-directory-p behaves incorrectly with executable file on Mac OS X References: <8337vkj96q.fsf@gnu.org> Date: Sun, 03 Jan 2021 10:44:45 +0000 In-Reply-To: (YAMAMOTO Mitsuharu's message of "Sun, 06 Dec 2015 15:28:52 +0900") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21573-done Cc: 21573-done@debbugs.gnu.org, Alexander Zhukov 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 (-) YAMAMOTO Mitsuharu writes: >>>>>> On Thu, 03 Dec 2015 15:23:41 +0300, Alexander Zhukov said: > > I've just sent a bug report to Apple. I can no longer reproduce this, so presumably Apple have fixed it. -- Alan Third From unknown Sat Aug 16 10:45:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 31 Jan 2021 12: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