unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6179: OSX: Emacs.app is loading files specified by relative pathname twice
@ 2010-05-13  2:46 Roy Liu
  2010-05-16  8:37 ` bug#6179: Addendum Roy Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Roy Liu @ 2010-05-13  2:46 UTC (permalink / raw)
  To: 6179

[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]

Package: emacs
Version: 23.2

I've noticed strange loading behavior for Emacs.app when I wrap it with a
script:


#!/bin/bash

/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs "$@"


Here are my observations:
1) For files specified with --find-file and --find and --visit, loading goes
fine.
2) For files specified with absolute paths, loading is also fine.
3) For files specified with relative pathnames, things start getting weird.
 For example, loading "a/b/c/d.txt" will load the desired file, but it will
then try to load "a/b/c/a/b/c/d.txt", which clearly doesn't exist.  It's as
if directory "a/b/c" has been added to some sort of search path (in addition
to $PWD) in which emacs then relatively searches for "a/b/c/d.txt", thus
resulting in the joined result "a/b/c/a/b/c/d.txt".

I don't know if this should be a bug, since the desired usage of Emacs.app
is to run through the window manager (some form of "open"), which is a
sheltered environment.
I've built Emacs.app from MacPorts, which, from what I can tell, introduces
no special modifications or patches, and so I believe that this defect is
repeatable.

-Roy

[-- Attachment #2: Type: text/html, Size: 1469 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#6179: Addendum
  2010-05-13  2:46 bug#6179: OSX: Emacs.app is loading files specified by relative pathname twice Roy Liu
@ 2010-05-16  8:37 ` Roy Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Roy Liu @ 2010-05-16  8:37 UTC (permalink / raw)
  To: 6179

[-- Attachment #1: Type: text/plain, Size: 1034 bytes --]

I dug into the problem further, and this patch seems to be dealing with the
problem:


--- lisp/term/ns-win.el.orig    2010-05-15 17:14:55.000000000 -0700
+++ lisp/term/ns-win.el 2010-05-15 17:15:00.000000000 -0700
@@ -785,7 +785,7 @@
   "Do a `find-file' with the `ns-input-file' as argument."
   (interactive)
   (let ((f) (file) (bufwin1) (bufwin2))
-    (setq f (file-truename (car ns-input-file)))
+    (setq f (car ns-input-file))
     (setq ns-input-file (cdr ns-input-file))
     (setq file (find-file-noselect f))
     (setq bufwin1 (get-buffer-window file 'visible))
@@ -802,8 +802,7 @@
       (select-window bufwin2)
       (find-file f))
      (ns-pop-up-frames
-      (ns-hide-emacs 'activate)
-      (let ((pop-up-frames t)) (pop-to-buffer file nil)))
+      (ns-hide-emacs 'activate))
      (t
       (ns-hide-emacs 'activate)
       (find-file f)))))
Documents/build/macports/a


Unfortunately, since I am no Emacs-app expert, I can't tell you in clear
terms what it does exactly.  Perhaps a guru can elucidate.

-Roy

[-- Attachment #2: Type: text/html, Size: 1474 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-16  8:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-13  2:46 bug#6179: OSX: Emacs.app is loading files specified by relative pathname twice Roy Liu
2010-05-16  8:37 ` bug#6179: Addendum Roy Liu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).