From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Praveen Kumar Newsgroups: gmane.emacs.bugs Subject: bug#21573: 24.5; file-accessible-directory-p behaves incorrectly with executable file on Mac OS X Date: Sat, 26 Sep 2015 23:27:19 -0700 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113dd9d241eeb40520b4ac40 X-Trace: ger.gmane.org 1443370588 22936 80.91.229.3 (27 Sep 2015 16:16:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Sep 2015 16:16:28 +0000 (UTC) To: 21573@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 27 18:16:13 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZgEcU-0001Ca-5T for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Sep 2015 18:16:10 +0200 Original-Received: from localhost ([::1]:58030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgEcT-0002Ht-On for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Sep 2015 12:16:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgEcO-0002Hl-Tm for bug-gnu-emacs@gnu.org; Sun, 27 Sep 2015 12:16:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgEcN-0007UC-9n for bug-gnu-emacs@gnu.org; Sun, 27 Sep 2015 12:16:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgEcN-0007U8-65 for bug-gnu-emacs@gnu.org; Sun, 27 Sep 2015 12:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZgEcM-0001yj-Rv for bug-gnu-emacs@gnu.org; Sun, 27 Sep 2015 12:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Praveen Kumar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Sep 2015 16:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21573 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14433705247536 (code B ref -1); Sun, 27 Sep 2015 16:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Sep 2015 16:15:24 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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== X-Received: by 10.202.192.131 with SMTP id q125mr7185872oif.118.1443335239755; Sat, 26 Sep 2015 23:27:19 -0700 (PDT) Original-Received: by 10.60.39.2 with HTTP; Sat, 26 Sep 2015 23:27:19 -0700 (PDT) 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-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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106973 Archived-At: --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--