From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steven Degutis Newsgroups: gmane.emacs.help Subject: Re: Can't insert curly brace for string interpolation in ruby-mode Date: Fri, 5 Apr 2013 20:45:58 -0500 Message-ID: References: <20130405235212.GA12605@hysteria.proulx.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b2ee64584390d04d9a75d21 X-Trace: ger.gmane.org 1365278529 28351 80.91.229.3 (6 Apr 2013 20:02:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Apr 2013 20:02:09 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Andrew Pennebaker Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 06 22:02:08 2013 Return-path: Envelope-to: geh-help-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 1UOZJ0-0007UX-Fu for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Apr 2013 22:01:42 +0200 Original-Received: from localhost ([::1]:39828 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOICz-0001iu-FZ for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Apr 2013 21:46:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOICh-0001im-Ip for help-gnu-emacs@gnu.org; Fri, 05 Apr 2013 21:46:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOICe-0002s7-2Q for help-gnu-emacs@gnu.org; Fri, 05 Apr 2013 21:46:03 -0400 Original-Received: from mail-da0-x236.google.com ([2607:f8b0:400e:c00::236]:52693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOICd-0002rz-NS for help-gnu-emacs@gnu.org; Fri, 05 Apr 2013 21:45:59 -0400 Original-Received: by mail-da0-f54.google.com with SMTP id p1so1811749dad.13 for ; Fri, 05 Apr 2013 18:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=lSPhtu+Rwteq8T2Nq5wNjQNmzYzcUAFzoaIhQQu3kL0=; b=ZNCY2N9R1mQSjR7OIIXHAYBKO+IhwjBJqwhW1mpDMgYFAHJJmiFJylvmos5evzQOFN PeBn686YkLkqKbh4B1WWXcwhorIMg6g5xnvOVJwkMlbUEHaz6ZKPSPTczRQUWAhPpF1r puMXRggBhiVzkF4bZjEjPatfdvOICSNVZCHSsylBZ4c/jRD8FTB/5lbPAXNHcgfvC9PO UV2yIAEPQKhBO7BE84XBuQ8N1TioukywYb59xS08XVMBWvBuWOUEGUXYmCmeE3qY3JZM Yj5VXzMJ60RnIPSdXfTxAeN0ln67BCpZURDkzcPUzqZauevOEfZfihOhJKK/dcTXzsjg fZMA== X-Received: by 10.68.223.138 with SMTP id qu10mr17486414pbc.89.1365212758553; Fri, 05 Apr 2013 18:45:58 -0700 (PDT) Original-Received: by 10.70.6.100 with HTTP; Fri, 5 Apr 2013 18:45:58 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c00::236 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90019 Archived-At: --047d7b2ee64584390d04d9a75d21 Content-Type: text/plain; charset=ISO-8859-1 No, `open` works fine for this. Look again at the man page. It doesn't expect a binary like you were passing it (Contents/MacOS/Emacs). Instead you just pass it the name of an app bundle. The command I sent to you in the last email works perfectly. -Steven On Fri, Apr 5, 2013 at 8:42 PM, Andrew Pennebaker < andrew.pennebaker@gmail.com> wrote: > Thank you. > > I did use the man page, and I did try --args, but open complained. Could > you suggest a better shell script? > On Apr 5, 2013 9:07 PM, "Steven Degutis" wrote: > >> First of all I highly recommend installing Cocoa Emacs from homebrew. >> Look here for how to install it properly: >> https://github.com/sdegutis/using-emacs#installing-emacs-properly >> >> Secondly, you pass args to open via --args (look at `man open`). So it >> would be `open -a emacs --args -Q` if you want to launch Cocoa Emacs with -Q >> >> -Steven >> >> >> On Fri, Apr 5, 2013 at 7:43 PM, Andrew Pennebaker < >> andrew.pennebaker@gmail.com> wrote: >> >>> Good idea! >>> >>> Unfortunately I haven't been able to emacs -Q in Mac due to my poor >>> setup. I can't even pass the option! >>> >>> Could someone suggest a better way to do this? >>> >>> $ which emacs >>> /usr/bin/emacs >>> >>> $ cat `which emacs` >>> #!/bin/sh >>> open -a /Applications/Emacs.app/Contents/MacOS/Emacs "$@" >>> >>> My goal is to be able to launch "emacs " from Terminal.app, >>> such that Emacs doesn't steal control over the terminal while it runs. >>> Ordinarly, one would use "emacs &", but I like to close the >>> terminal, and I don't want Emacs to die with it. So I use "open -a..." >>> >>> The problem with this arrangement is that this doesn't allow command >>> line options to be sent to Emacs. "open" provides --args, but I haven't >>> been able to use it properly. >>> >>> >>> On Fri, Apr 5, 2013 at 7:52 PM, Bob Proulx wrote: >>> >>>> Andrew Pennebaker wrote: >>>> > Ruby uses the syntax "... #{expression}..." for string interpolation. >>>> But >>>> > when I press left curly brace, Emacs says "Symbol's value as variable >>>> is >>>> > void: last-command-char". >>>> >>>> This works fine for me in emacs 24.2.1. And with 23.4.1 too. What >>>> version are you using? >>>> >>>> > I C-h k {, and saw that { and } are bound to ruby-electric-brace. >>>> >>>> Same here. >>>> >>>> > This function appears to be malfunctioning. >>>> >>>> You didn't say so the obligatory response is, "Have you tried it with >>>> -Q?" >>>> >>>> emacs -Q >>>> >>>> Works for me. >>>> >>>> Bob >>>> >>>> >>> >>> >>> -- >>> Cheers, >>> >>> Andrew Pennebaker >>> www.yellosoft.us >>> >> >> --047d7b2ee64584390d04d9a75d21 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
No, `open` works fine for this. Look again at the man page= . It doesn't expect a binary like you were passing it=A0(Contents/MacOS= /Emacs). Instead you just pass it the name of an app bundle. The command I = sent to you in the last email works perfectly.

-Steven


On Fri, Apr 5, 2013 at 8:42 PM, Andrew Pennebaker <andrew.pennebaker@gmail.com> wrote:

Thank you.

I did use the man page, and I did try --args, but open compl= ained. Could you suggest a better shell script?

On Apr 5, 2013 9:07 PM, "Steven Degutis&quo= t; <sbdegutis@g= mail.com> wrote:
First of all I highly recommend installing Cocoa Emacs fro= m homebrew. Look here for how to install it properly:=A0https://github.com/sdegutis/using-emacs#installing-emacs-properly
Secondly, you pass args to open via --args (look at `man ope= n`). So it would be `open -a emacs --args -Q` if you want to launch Cocoa E= macs with -Q

-Steven


On Fri, Apr 5= , 2013 at 7:43 PM, Andrew Pennebaker <andrew.pennebaker@gmail.co= m> wrote:
Good idea!

Unfortunately I haven't been able to emacs -Q in Mac due to my poor = setup. I can't even pass the option!

Could someone suggest a better way to do this?

$ which emacs
/usr/bin/emacs
<= br>
$ cat `which emacs`
#!/bin/sh
open -a /Ap= plications/Emacs.app/Contents/MacOS/Emacs "$@"

My goal is to be able to launch "emacs <dir/fil= e>" from Terminal.app, such that Emacs doesn't steal control ov= er the terminal while it runs. Ordinarly, one would use "emacs <dir= /file> &", but I like to close the terminal, and I don't wa= nt Emacs to die with it. So I use "open -a..."

The problem with this arrangement is that this doesn= 9;t allow command line options to be sent to Emacs. "open" provid= es --args, but I haven't been able to use it properly.


On Fri, Apr 5, 2013 at 7:52 PM, Bob Proulx <<= a href=3D"mailto:bob@proulx.com" target=3D"_blank">bob@proulx.com> wrote:
Andrew Pennebaker wrote:
> Ruby uses the syntax "... #{expression}..." for string inter= polation. But
> when I press left curly brace, Emacs says "Symbol's value as = variable is
> void: last-command-char".

This works fine for me in emacs 24.2.1. =A0And with 23.4.1 too. =A0Wh= at
version are you using?

> I C-h k {, and saw that { and } are bound to ruby-electric-brace.

Same here.

> This function appears to be malfunctioning.

You didn't say so the obligatory response is, "Have you trie= d it with -Q?"

=A0 emacs -Q

Works for me.

Bob




--
Cheers,

Andrew Pennebaker<= /div>


--047d7b2ee64584390d04d9a75d21--