From 160a02e5b1cd70efe45f0cfe980b2acaf2cb2f44 Mon Sep 17 00:00:00 2001 From: Anton Dyachuk Date: Thu, 3 Jan 2013 15:31:45 +0400 Subject: [PATCH 1/6] Update XCode project file --- emacs-handler.xcodeproj/project.pbxproj | 26 ++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/emacs-handler.xcodeproj/project.pbxproj b/emacs-handler.xcodeproj/project.pbxproj index 5fb8d47..f305d32 100644 --- a/emacs-handler.xcodeproj/project.pbxproj +++ b/emacs-handler.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 45; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ @@ -143,9 +143,16 @@ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; + attributes = { + LastUpgradeCheck = 0450; + }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "emacs-handler" */; - compatibilityVersion = "Xcode 3.1"; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + en, + ); mainGroup = 29B97314FDCFA39411CA2CEA /* emacs-handler */; projectDirPath = ""; projectRoot = ""; @@ -204,9 +211,9 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = NO; @@ -220,6 +227,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = NO; @@ -232,26 +240,26 @@ C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; GCC_C_LANGUAGE_STANDARD = c99; GCC_OPTIMIZATION_LEVEL = 0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = macosx10.5; + SDKROOT = ""; }; name = Debug; }; C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = macosx10.5; + MACOSX_DEPLOYMENT_TARGET = 10.7; + SDKROOT = ""; }; name = Release; }; From dd59be5e1d33a81055000cec160c574bc6672de7 Mon Sep 17 00:00:00 2001 From: Anton Dyachuk Date: Thu, 3 Jan 2013 15:32:15 +0400 Subject: [PATCH 2/6] Fix string formatting --- Classes/App.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/App.m b/Classes/App.m index 1d94706..32a0786 100644 --- a/Classes/App.m +++ b/Classes/App.m @@ -30,7 +30,7 @@ -(void)handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSApple if (file) { NSTask *task = [[NSTask alloc] init]; [task setLaunchPath:path]; - [task setArguments:[NSArray arrayWithObjects:@"-n", [NSString stringWithFormat:@"+%d:%d", [line integerValue], [column integerValue]], file, nil]]; + [task setArguments:[NSArray arrayWithObjects:@"-n", [NSString stringWithFormat:@"+%ld:%ld", [line integerValue], [column integerValue]], file, nil]]; [task launch]; [task release]; } From 11ed299b34237bafb18bbea1645a7e7d0af121a7 Mon Sep 17 00:00:00 2001 From: Anton Dyachuk Date: Thu, 3 Jan 2013 15:32:50 +0400 Subject: [PATCH 3/6] Register txmt scheme to work with Emacs --- Classes/App.m | 2 ++ Info.plist | 1 + 2 files changed, 3 insertions(+) diff --git a/Classes/App.m b/Classes/App.m index 32a0786..9a180ac 100644 --- a/Classes/App.m +++ b/Classes/App.m @@ -16,6 +16,8 @@ -(void)handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSApple if (nil == path) return; // emacs://open/?url=file://~/.bash_profile&line=11&column=2 + // or + // txmt://open/?url=file://~/.bash_profile&line=11&column=2 NSURL *url = [NSURL URLWithString:[[event paramDescriptorForKeyword:keyDirectObject] stringValue]]; if (url && [[url host] isEqualToString:@"open"]) { diff --git a/Info.plist b/Info.plist index 1880412..deb1fa4 100644 --- a/Info.plist +++ b/Info.plist @@ -8,6 +8,7 @@ CFBundleURLSchemes emacs + txmt CFBundleURLName org.unknownplace.emacshandler From 9c320fbd348a2f837ea2be74f702208f54ccec89 Mon Sep 17 00:00:00 2001 From: Anton Dyachuk Date: Thu, 3 Jan 2013 15:35:56 +0400 Subject: [PATCH 4/6] Ignore some XCode project specific files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 4ad9116..a250a7c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ build/* *.xcodeproj/*.pbxuser *.xcodeproj/*.perspectivev3 *.xcodeproj/TemplateIcon.icns +*.xcodeproj/project.xcworkspace +*.xcodeproj/xcuserdata From 9dede1b4a050ecb5a3be6f39db64335c849f03e8 Mon Sep 17 00:00:00 2001 From: Anton Dyachuk Date: Thu, 3 Jan 2013 15:37:35 +0400 Subject: [PATCH 5/6] Add txmt scheme to README --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9942176..0963307 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ EmacsURLHandler for OSX ======================= -This application enables your emacs to open files via hyperlinks starts with `emacs://` something like: +This application enables your emacs to open files via hyperlinks starts with `emacs://` or `txmt://` something like: emacs://open/?url=file:///etc/passwd&line=10&column=2 + txmt://open/?url=file:///etc/passwd&line=10&column=2 This URL format is same as TextMate's `txmt:` scheme described [here](http://manual.macromates.com/en/using_textmate_from_terminal#url_scheme_html) @@ -37,8 +38,9 @@ Test it Open terminal and type: open 'emacs://open/?url=file:///etc/hosts' + open 'txmt://open/?url=file:///etc/hosts' -or just click [this link](emacs://open/?url=file:///etc/hosts) +or just click [this link](emacs://open/?url=file:///etc/hosts) or [this](txmt://open/?url=file:///etc/hosts) Uninstalling From 280cdb2838a08c7bfe74ed5b10e3d430b13efbb7 Mon Sep 17 00:00:00 2001 From: Anton Dyachuk Date: Mon, 7 Jan 2013 18:26:32 +0400 Subject: [PATCH 6/6] Update downloads links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0963307..5aed80c 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,12 @@ Requirements Download -------- -[EmacsHandler-1.0.zip](http://cloud.github.com/downloads/typester/emacs-handler/EmacsHandler-1.0.zip) (Universal Binary) +[EmacsHandler-1.0.zip](http://zgroupsoft.com/EmacsHandler-1.0.zip) (Universal Binary) Installation ------------ -Download [latest release](http://cloud.github.com/downloads/typester/emacs-handler/EmacsHandler-1.0.zip). +Download [latest release](http://zgroupsoft.com/EmacsHandler-1.0.zip). Unzip it, and install it in your Applications directory.