Fails on Emacs 24 #290

Closed
fullofcaffeine opened this Issue Mar 26, 2013 · 23 comments

Comments

Projects
None yet
10 participants
@fullofcaffeine

The key combo correctly triggers the app, but selecting the file and hitting return does not open it in Emacs.

  • GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2013-03-12 on bob.porkrind.org
  • OSX Lion

Any hints appreciated!

Marcelo.

@ghost ghost assigned jmitchell Mar 26, 2013

@jmitchell

This comment has been minimized.

Show comment Hide comment
@jmitchell

jmitchell Mar 26, 2013

Thanks for reporting this.

It's working well for me through a couple different builds of Aquamacs:

  • GNU Emacs 23.3.50.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54) of 2011-08-04 on braeburn.aquamacs.org
  • GNU Emacs 24.3.50.3 (x86_64-apple-darwin10.8.0, NS apple-appkit-1038.36) of 2013-03-26 on asura.local

Does PeepOpen's file search window crash when you try to select a file?

Is PeepOpen working on the same machine for any other text editors, or even an older version of Emacs? It will help narrow the scope if we know it works for some other editor.

If you have any ~/Library/Logs/DiagnosticReports/PeepOpen* files can you post the most recent?

Thanks for reporting this.

It's working well for me through a couple different builds of Aquamacs:

  • GNU Emacs 23.3.50.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54) of 2011-08-04 on braeburn.aquamacs.org
  • GNU Emacs 24.3.50.3 (x86_64-apple-darwin10.8.0, NS apple-appkit-1038.36) of 2013-03-26 on asura.local

Does PeepOpen's file search window crash when you try to select a file?

Is PeepOpen working on the same machine for any other text editors, or even an older version of Emacs? It will help narrow the scope if we know it works for some other editor.

If you have any ~/Library/Logs/DiagnosticReports/PeepOpen* files can you post the most recent?

@geoffwozniak

This comment has been minimized.

Show comment Hide comment
@geoffwozniak

geoffwozniak Mar 28, 2013

Using Emacs from here: http://www.emacsformacosx.com/builds

This version works:

This one doesn't:

Latest nightly doesn't work either:

It doesn't crash, but it does put the focus back on Emacs -- it just doesn't select the file.

Using Emacs from here: http://www.emacsformacosx.com/builds

This version works:

This one doesn't:

Latest nightly doesn't work either:

It doesn't crash, but it does put the focus back on Emacs -- it just doesn't select the file.

@topfunky

This comment has been minimized.

Show comment Hide comment
@topfunky

topfunky Mar 28, 2013

Owner

At the risk of redirecting the problem, it sounds like a problem with
Emacs. We use the standard Mac OS "open" command, equivalent to dragging
and dropping a file onto an app. It sounds like Emacs broke their support
for that in a recent revision.

I'll try this out when I'm back at a computer that runs Emacs.

On Wednesday, March 27, 2013, Geoff Wozniak wrote:

Using Emacs from here: http://www.emacsformacosx.com/builds

This version works:

http://www.emacsformacosx.com/emacs-builds/Emacs-24.2-universal-10.6.8.dmg

This one doesn't:

http://www.emacsformacosx.com/emacs-builds/Emacs-24.3-universal-10.6.8.dmg

Latest nightly doesn't work either:

http://www.emacsformacosx.com/emacs-builds/Emacs-2013-03-27-112150-universal-10.6.8.dmg

It doesn't crash, but it does put the focus back on Emacs -- it just
doesn't select the file.


Reply to this email directly or view it on GitHubhttps://github.com/topfunky/PeepOpen-Issues/issues/290#issuecomment-15562113
.

Geoffrey Grosenbach
boss@topfunky.com
........................
PeepCode Screencasts
http://peepcode.com

Owner

topfunky commented Mar 28, 2013

At the risk of redirecting the problem, it sounds like a problem with
Emacs. We use the standard Mac OS "open" command, equivalent to dragging
and dropping a file onto an app. It sounds like Emacs broke their support
for that in a recent revision.

I'll try this out when I'm back at a computer that runs Emacs.

On Wednesday, March 27, 2013, Geoff Wozniak wrote:

Using Emacs from here: http://www.emacsformacosx.com/builds

This version works:

http://www.emacsformacosx.com/emacs-builds/Emacs-24.2-universal-10.6.8.dmg

This one doesn't:

http://www.emacsformacosx.com/emacs-builds/Emacs-24.3-universal-10.6.8.dmg

Latest nightly doesn't work either:

http://www.emacsformacosx.com/emacs-builds/Emacs-2013-03-27-112150-universal-10.6.8.dmg

It doesn't crash, but it does put the focus back on Emacs -- it just
doesn't select the file.


Reply to this email directly or view it on GitHubhttps://github.com/topfunky/PeepOpen-Issues/issues/290#issuecomment-15562113
.

Geoffrey Grosenbach
boss@topfunky.com
........................
PeepCode Screencasts
http://peepcode.com

@geoffwozniak

This comment has been minimized.

Show comment Hide comment
@geoffwozniak

geoffwozniak Mar 28, 2013

For what it's worth, the following works fine from the command line:

open -a /Applications/Emacs.app /path/to/some/file

For what it's worth, the following works fine from the command line:

open -a /Applications/Emacs.app /path/to/some/file
@topfunky

This comment has been minimized.

Show comment Hide comment
@topfunky

topfunky Mar 28, 2013

Owner

Weird. That's what we're doing too. I'll check it out.

On Wednesday, March 27, 2013, Geoff Wozniak wrote:

For what it's worth, the following works fine from the command line:

open -a /Applications/Emacs.app /path/to/some/file


Reply to this email directly or view it on GitHubhttps://github.com/topfunky/PeepOpen-Issues/issues/290#issuecomment-15564473
.

Geoffrey Grosenbach
boss@topfunky.com
........................
PeepCode Screencasts
http://peepcode.com

Owner

topfunky commented Mar 28, 2013

Weird. That's what we're doing too. I'll check it out.

On Wednesday, March 27, 2013, Geoff Wozniak wrote:

For what it's worth, the following works fine from the command line:

open -a /Applications/Emacs.app /path/to/some/file


Reply to this email directly or view it on GitHubhttps://github.com/topfunky/PeepOpen-Issues/issues/290#issuecomment-15564473
.

Geoffrey Grosenbach
boss@topfunky.com
........................
PeepCode Screencasts
http://peepcode.com

@jmitchell

This comment has been minimized.

Show comment Hide comment
@jmitchell

jmitchell Apr 2, 2013

Thanks, @geoffwozniak. I tested the first two builds you referred to and got the same results. In both versions I could open files via open -a and drag-drop, but PeepOpen only played nicely with the older version.

Some changes must have been introduced between 2012-08-27 and 2013-03-13 to cause this. It could be the build script used by emacsformacosx.com or even the Emacs source. Given that I've tested and confirmed that PeepOpen works well with Aquamacs (Emacs version 24.3.50.3), I strongly suspect it's related to the emacsformacosx.com builds.

According to the About page, the build environment has changed during that time.

Also Note: Recent Emacs builds (since 2012-12-16) have been built against Mac OS 10.7 (Lion) and have Lion full screen support if you are running on Lion or Mountain Lion. They also have better retina display support and are code signed. Also Yay!

At a glance most of the commits to the build script in that timespan look benign, except perhaps this one. I recommend using the build script prior to that change to build a new DMG against the latest Emacs source.

Thanks, @geoffwozniak. I tested the first two builds you referred to and got the same results. In both versions I could open files via open -a and drag-drop, but PeepOpen only played nicely with the older version.

Some changes must have been introduced between 2012-08-27 and 2013-03-13 to cause this. It could be the build script used by emacsformacosx.com or even the Emacs source. Given that I've tested and confirmed that PeepOpen works well with Aquamacs (Emacs version 24.3.50.3), I strongly suspect it's related to the emacsformacosx.com builds.

According to the About page, the build environment has changed during that time.

Also Note: Recent Emacs builds (since 2012-12-16) have been built against Mac OS 10.7 (Lion) and have Lion full screen support if you are running on Lion or Mountain Lion. They also have better retina display support and are code signed. Also Yay!

At a glance most of the commits to the build script in that timespan look benign, except perhaps this one. I recommend using the build script prior to that change to build a new DMG against the latest Emacs source.

@andrewvc

This comment has been minimized.

Show comment Hide comment
@andrewvc

andrewvc Apr 15, 2013

+1 on this, I'm getting it as well.

+1 on this, I'm getting it as well.

@sids

This comment has been minimized.

Show comment Hide comment
@sids

sids Sep 1, 2013

I am facing the same problem after upgrading to the 24.3 build of Emacs downloaded from http://www.emacsformacosx.com/

The cause seems to be that, in this build, the function invocation-name is returning "Emacs-10.7" instead of "Emacs". I've been able to get the setup working by replacing the call to this function in peepopen.el with "Emacs".

sids commented Sep 1, 2013

I am facing the same problem after upgrading to the 24.3 build of Emacs downloaded from http://www.emacsformacosx.com/

The cause seems to be that, in this build, the function invocation-name is returning "Emacs-10.7" instead of "Emacs". I've been able to get the setup working by replacing the call to this function in peepopen.el with "Emacs".

@topfunky

This comment has been minimized.

Show comment Hide comment
@topfunky

topfunky Sep 1, 2013

Owner

I've also noticed this. Will try to get a fix out.

On Sunday, September 1, 2013, Siddhartha Reddy wrote:

I am facing the same problem after upgrading to the 24.3 build of Emacs
downloaded from http://www.emacsformacosx.com/

The cause seems to be that, in this build, the function invocation-nameis returning "Emacs-10.7" instead of "Emacs". I've been able to get the
setup working by replacing the call to this function in peepopen.el with
"Emacs".


Reply to this email directly or view it on GitHubhttps://github.com/topfunky/PeepOpen-Issues/issues/290#issuecomment-23630355
.

Geoffrey Grosenbach
boss@topfunky.com

Owner

topfunky commented Sep 1, 2013

I've also noticed this. Will try to get a fix out.

On Sunday, September 1, 2013, Siddhartha Reddy wrote:

I am facing the same problem after upgrading to the 24.3 build of Emacs
downloaded from http://www.emacsformacosx.com/

The cause seems to be that, in this build, the function invocation-nameis returning "Emacs-10.7" instead of "Emacs". I've been able to get the
setup working by replacing the call to this function in peepopen.el with
"Emacs".


Reply to this email directly or view it on GitHubhttps://github.com/topfunky/PeepOpen-Issues/issues/290#issuecomment-23630355
.

Geoffrey Grosenbach
boss@topfunky.com

@fullofcaffeine

This comment has been minimized.

Show comment Hide comment
@fullofcaffeine

fullofcaffeine Oct 8, 2013

Any updates on this? Getting a new frame everytime I open a file with Peepopen is starting to annoy me.

Any updates on this? Getting a new frame everytime I open a file with Peepopen is starting to annoy me.

@andrewvc

This comment has been minimized.

Show comment Hide comment
@andrewvc

andrewvc Oct 8, 2013

+1

andrewvc commented Oct 8, 2013

+1

@fullofcaffeine

This comment has been minimized.

Show comment Hide comment
@fullofcaffeine

fullofcaffeine Nov 12, 2013

@topfunky , @jmitchell I would really appreciate an update on this. I use Peepopen extensively with Emacs (24) and the new-frame-per-file thing is driving me crazy. I wouldn't like to downgrade to Emacs 23, since I have a lot of custom code that relies on Emacs 24 features.

@topfunky , @jmitchell I would really appreciate an update on this. I use Peepopen extensively with Emacs (24) and the new-frame-per-file thing is driving me crazy. I wouldn't like to downgrade to Emacs 23, since I have a lot of custom code that relies on Emacs 24 features.

@fullofcaffeine

This comment has been minimized.

Show comment Hide comment
@fullofcaffeine

fullofcaffeine Nov 27, 2013

bump

Pretty please...

bump

Pretty please...

@fery

This comment has been minimized.

Show comment Hide comment
@fery

fery Dec 1, 2013

As @sids says there is an easy fix, just replace in peepcode.el line 72

 (format "open 'peepopen://%s?editor=%s'"
         (expand-file-name root)
         (invocation-name)))))

For

 (format "open 'peepopen://%s?editor=Emacs'"
         (expand-file-name root)))))

fery commented Dec 1, 2013

As @sids says there is an easy fix, just replace in peepcode.el line 72

 (format "open 'peepopen://%s?editor=%s'"
         (expand-file-name root)
         (invocation-name)))))

For

 (format "open 'peepopen://%s?editor=Emacs'"
         (expand-file-name root)))))
@fullofcaffeine

This comment has been minimized.

Show comment Hide comment
@fullofcaffeine

fullofcaffeine Jan 9, 2014

Replaced like you said, but the problem is still there.

Here's my peepopen.el file: http://pastie.org/8616181

What could be wrong?

Marcelo.

Replaced like you said, but the problem is still there.

Here's my peepopen.el file: http://pastie.org/8616181

What could be wrong?

Marcelo.

@fullofcaffeine

This comment has been minimized.

Show comment Hide comment
@fullofcaffeine

fullofcaffeine Jan 19, 2014

@fery Here's a screenshot of that portion of the code:

https://www.dropbox.com/s/ze7pihiy3ines9q/Screenshot%202014-01-19%2014.53.47.png

Do you see anything wrong?

@fery Here's a screenshot of that portion of the code:

https://www.dropbox.com/s/ze7pihiy3ines9q/Screenshot%202014-01-19%2014.53.47.png

Do you see anything wrong?

@fery

This comment has been minimized.

Show comment Hide comment
@fery

fery Jan 20, 2014

Hey @fullofcaffeine

I can't see anything wrong. Are you using GNU Emacs or any other like Aquamacs?

I have done a gist with my peepopen.el:

https://gist.github.com/fery/8512926

Hope it helps

fery commented Jan 20, 2014

Hey @fullofcaffeine

I can't see anything wrong. Are you using GNU Emacs or any other like Aquamacs?

I have done a gist with my peepopen.el:

https://gist.github.com/fery/8512926

Hope it helps

@fullofcaffeine

This comment has been minimized.

Show comment Hide comment
@fullofcaffeine

fullofcaffeine Feb 4, 2014

Not sure what's wrong, but even after using the exact content of your gist as my peepopen.el, I'm experiencing the same issue. And I made sure it's loading this file and not another one, by accident.

Perhaps it's my Emacs version:

GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2013-03-12 on bob.porkrind.org

OSX Mavericks.

Any ideas?

Not sure what's wrong, but even after using the exact content of your gist as my peepopen.el, I'm experiencing the same issue. And I made sure it's loading this file and not another one, by accident.

Perhaps it's my Emacs version:

GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2013-03-12 on bob.porkrind.org

OSX Mavericks.

Any ideas?

@fullofcaffeine

This comment has been minimized.

Show comment Hide comment
@fullofcaffeine

fullofcaffeine Feb 12, 2014

Nevermind.

I started using this: https://github.com/railwaycat/emacs-mac-port, and that fixed the issue. This fork is very cool by the way, with quite a bit of usability improvements for OSX.

That being said, there's still an issue with the regular Cocoa emacs 24 (downloaded from emacsformacosx.com). I'll consider this ticket solved for now, though, since using the mac-port works great,

Cheers,

Marcelo.

Nevermind.

I started using this: https://github.com/railwaycat/emacs-mac-port, and that fixed the issue. This fork is very cool by the way, with quite a bit of usability improvements for OSX.

That being said, there's still an issue with the regular Cocoa emacs 24 (downloaded from emacsformacosx.com). I'll consider this ticket solved for now, though, since using the mac-port works great,

Cheers,

Marcelo.

@rounders

This comment has been minimized.

Show comment Hide comment
@rounders

rounders Feb 20, 2014

i just upgraded to emacs 24.3 using homebrew and I'm seeing the same problem as described in this issue. Specifically the peepopen file selector opens up just fine, however, selecting a file does not open it up in Emacs.

i just upgraded to emacs 24.3 using homebrew and I'm seeing the same problem as described in this issue. Specifically the peepopen file selector opens up just fine, however, selecting a file does not open it up in Emacs.

@rounders

This comment has been minimized.

Show comment Hide comment
@rounders

rounders Feb 20, 2014

the fix suggested by @sids has fixed the issue for me as well.

the fix suggested by @sids has fixed the issue for me as well.

rounders added a commit to rounders/emacsdir that referenced this issue Feb 20, 2014

@EDmitry

This comment has been minimized.

Show comment Hide comment
@EDmitry

EDmitry May 9, 2014

I am experiencing the same issue. I don't understand why replacing (invocation-name) with Emacs works, since peepopen does this:

# Emacs shows as "Emacs-10.4"
      cleanedEditorApplicationName = if editorApplicationName.match(/Emacs/)
          cleanedEditorApplicationName = "Emacs"
        else
          editorApplicationName
        end

      NSWorkspace.sharedWorkspace.openFile(record.absFilePath,
                                           withApplication:cleanedEditorApplicationName)

And the invocation-name returns Emacs-10.7

EDmitry commented May 9, 2014

I am experiencing the same issue. I don't understand why replacing (invocation-name) with Emacs works, since peepopen does this:

# Emacs shows as "Emacs-10.4"
      cleanedEditorApplicationName = if editorApplicationName.match(/Emacs/)
          cleanedEditorApplicationName = "Emacs"
        else
          editorApplicationName
        end

      NSWorkspace.sharedWorkspace.openFile(record.absFilePath,
                                           withApplication:cleanedEditorApplicationName)

And the invocation-name returns Emacs-10.7

@ahmadseleem

This comment has been minimized.

Show comment Hide comment
@ahmadseleem

ahmadseleem May 30, 2014

As @fery said

(format "open 'peepopen://%s?editor=Emacs'"
         (expand-file-name root)))))

to line 72

but, you have to make sure to add this:

(setq ns-pop-up-frames nil)

to your init.el or so

I think this should be default now as almost everybody is using v 24

As @fery said

(format "open 'peepopen://%s?editor=Emacs'"
         (expand-file-name root)))))

to line 72

but, you have to make sure to add this:

(setq ns-pop-up-frames nil)

to your init.el or so

I think this should be default now as almost everybody is using v 24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment