unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* url links to open from emacs
@ 2006-08-24 22:32 Gary Wessle
  2006-08-24 23:17 ` David Hansen
  2006-08-25  5:41 ` Tim X
  0 siblings, 2 replies; 7+ messages in thread
From: Gary Wessle @ 2006-08-24 22:32 UTC (permalink / raw)


hi

while I am in guns/emacs, I move the point to the url and <ret> opens
it in a browser. but it does not work under emacs,only when I am in
guns.

how can I get it to work under emacs.

thanks

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

* Re: url links to open from emacs
  2006-08-24 22:32 url links to open from emacs Gary Wessle
@ 2006-08-24 23:17 ` David Hansen
  2006-08-25  5:41 ` Tim X
  1 sibling, 0 replies; 7+ messages in thread
From: David Hansen @ 2006-08-24 23:17 UTC (permalink / raw)


On Fri, 25 Aug 2006 08:32:53 +1000 Gary Wessle wrote:

> hi
>
> while I am in guns/emacs, I move the point to the url and <ret> opens
> it in a browser. but it does not work under emacs,only when I am in
> guns.
>
> how can I get it to work under emacs.

M-x browse-url RET (defaults to the URL at point).

David

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

* Re: url links to open from emacs
  2006-08-24 22:32 url links to open from emacs Gary Wessle
  2006-08-24 23:17 ` David Hansen
@ 2006-08-25  5:41 ` Tim X
  2006-08-25 10:24   ` Code alignment Ewen Cartwright
  1 sibling, 1 reply; 7+ messages in thread
From: Tim X @ 2006-08-25  5:41 UTC (permalink / raw)


Gary Wessle <phddas@yahoo.com> writes:

> hi
>
> while I am in guns/emacs, I move the point to the url and <ret> opens
> it in a browser. but it does not work under emacs,only when I am in
> guns.
>
> how can I get it to work under emacs.
>

I use the browse-url package. Here is my config

(global-set-key "\C-c\C-z." 'browse-url-at-point)
(global-set-key "\C-c\C-zb" 'browse-url-of-buffer)
(global-set-key "\C-c\C-zr" 'browse-url-of-region)
(global-set-key "\C-c\C-zu" 'browse-url)
(global-set-key "\C-c\C-zv" 'browse-url-of-file)

(add-hook 'dired-mode-hook
		  (lambda ()
			(local-set-key "\C-c\C-zf" 'browse-url-of-dired-file)))

(provide 'tc-browse-url)

I also customize the default browser settings so that it uses my
preferred browser. Use M-x customize-group <ret> browse-url <ret>

HTH

Tim


-- 
tcross (at) rapttech dot com dot au

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

* Code alignment
  2006-08-25  5:41 ` Tim X
@ 2006-08-25 10:24   ` Ewen Cartwright
  2006-08-25 12:26     ` Peter Dyballa
  2006-08-25 14:05     ` Jim Ottaway
  0 siblings, 2 replies; 7+ messages in thread
From: Ewen Cartwright @ 2006-08-25 10:24 UTC (permalink / raw)


Hi all,

I'm a long-time vim user who is converting to emacs. One thing I miss
from vim is a generic code alignment tool (like Align.vim, if anyone's
familiar with it) for formatting code like:

  <cfset var intSupplierID = 0>
  <cfset var structSupplierInfo = 0>
  <cfset var intAbID = getAbID(arguments.intStockID)>

as:

  <cfset var intSupplierID      = 0>
  <cfset var structSupplierInfo = 0>
  <cfset var intAbID            = getAbID(arguments.intStockID)>

As you may be able to tell, this is ColdFusion code, so natty C or
Java-specific code-formatting tools won't help much -- I guess I'll need
something completely language-agnostic as I doubt anyone has written
anything specific to ColdFusion.

If anyone knows of anything I could use in emacs to do this I'd be very
grateful!

Cheers,

/ewen

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

* Re: Code alignment
  2006-08-25 10:24   ` Code alignment Ewen Cartwright
@ 2006-08-25 12:26     ` Peter Dyballa
  2006-08-25 14:05     ` Jim Ottaway
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Dyballa @ 2006-08-25 12:26 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 25.08.2006 um 12:24 schrieb Ewen Cartwright:

> formatting code like:
>
>   <cfset var intSupplierID = 0>
>   <cfset var structSupplierInfo = 0>
>   <cfset var intAbID = getAbID(arguments.intStockID)>
>
> as:
>
>   <cfset var intSupplierID      = 0>
>   <cfset var structSupplierInfo = 0>
>   <cfset var intAbID            = getAbID(arguments.intStockID)>

One simple way to achieve 'right side alignment' works by positioning  
the equals sign in some column and continue to write. In the next  
line press TAB and the cursor should advance to the next column of  
the line above. I've used it in text-mode, but I cannot exactly  
remember whether it worked in programming modes. In some (shell for  
example) a TAB is mis-interpreted as positioning the left most word ...

This "fails" a bit when the line above has some words spread all over  
it, but in the end a few TABs lead to the look you wish to have.

--
Greetings

   Pete

"Programming today is a race between software engineers striving to  
build bigger and better idiot-proof programs, and the Universe trying  
to produce bigger and better idiots. So far, the Universe is winning."
                                                -- Rich Cook

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

* Re: Code alignment
  2006-08-25 10:24   ` Code alignment Ewen Cartwright
  2006-08-25 12:26     ` Peter Dyballa
@ 2006-08-25 14:05     ` Jim Ottaway
  2006-08-25 14:28       ` Ewen Cartwright
  1 sibling, 1 reply; 7+ messages in thread
From: Jim Ottaway @ 2006-08-25 14:05 UTC (permalink / raw)


"Ewen Cartwright" <ewen.cartwright@abcam.com> writes:

> Hi all,
>
> I'm a long-time vim user who is converting to emacs. One thing I miss
> from vim is a generic code alignment tool (like Align.vim, if anyone's
> familiar with it) for formatting code like:
>
>   <cfset var intSupplierID = 0>
>   <cfset var structSupplierInfo = 0>
>   <cfset var intAbID = getAbID(arguments.intStockID)>
>
> as:
>
>   <cfset var intSupplierID      = 0>
>   <cfset var structSupplierInfo = 0>
>   <cfset var intAbID            = getAbID(arguments.intStockID)>
>
> As you may be able to tell, this is ColdFusion code, so natty C or
> Java-specific code-formatting tools won't help much -- I guess I'll need
> something completely language-agnostic as I doubt anyone has written
> anything specific to ColdFusion.
>
> If anyone knows of anything I could use in emacs to do this I'd be very
> grateful!

You could try creating a ColdFusion mode and using M-x align.

I tried this:

(define-derived-mode cf-mode java-mode "CF") 
(push 'cf-mode align-c++-modes)

and I got the alignment you want by marking the text and doing M-x
align. 

I know nothing at all about ColdFusion, so I don't know if java-mode is
the right thing from which to derive a ColdFusion mode.  All that really
matters, however, is that you have a mode name that you can add to
align-c++-modes. 

Regards,

-- 
Jim Ottaway

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

* RE: Code alignment
  2006-08-25 14:05     ` Jim Ottaway
@ 2006-08-25 14:28       ` Ewen Cartwright
  0 siblings, 0 replies; 7+ messages in thread
From: Ewen Cartwright @ 2006-08-25 14:28 UTC (permalink / raw)
  Cc: help-gnu-emacs

Great -- that's exactly what I was after -- thanks! 

-----Original Message-----
From: help-gnu-emacs-bounces+ejc=abcam.com@gnu.org
[mailto:help-gnu-emacs-bounces+ejc=abcam.com@gnu.org] On Behalf Of Jim
Ottaway
Sent: 25 August 2006 15:06
To: help-gnu-emacs@gnu.org
Subject: Re: Code alignment

"Ewen Cartwright" <ewen.cartwright@abcam.com> writes:

> Hi all,
>
> I'm a long-time vim user who is converting to emacs. One thing I miss 
> from vim is a generic code alignment tool (like Align.vim, if anyone's

> familiar with it) for formatting code like:
>
>   <cfset var intSupplierID = 0>
>   <cfset var structSupplierInfo = 0>
>   <cfset var intAbID = getAbID(arguments.intStockID)>
>
> as:
>
>   <cfset var intSupplierID      = 0>
>   <cfset var structSupplierInfo = 0>
>   <cfset var intAbID            = getAbID(arguments.intStockID)>
>
> As you may be able to tell, this is ColdFusion code, so natty C or 
> Java-specific code-formatting tools won't help much -- I guess I'll 
> need something completely language-agnostic as I doubt anyone has 
> written anything specific to ColdFusion.
>
> If anyone knows of anything I could use in emacs to do this I'd be 
> very grateful!

You could try creating a ColdFusion mode and using M-x align.

I tried this:

(define-derived-mode cf-mode java-mode "CF") (push 'cf-mode
align-c++-modes)

and I got the alignment you want by marking the text and doing M-x
align. 

I know nothing at all about ColdFusion, so I don't know if java-mode is
the right thing from which to derive a ColdFusion mode.  All that really
matters, however, is that you have a mode name that you can add to
align-c++-modes. 

Regards,

--
Jim Ottaway



_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

end of thread, other threads:[~2006-08-25 14:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-24 22:32 url links to open from emacs Gary Wessle
2006-08-24 23:17 ` David Hansen
2006-08-25  5:41 ` Tim X
2006-08-25 10:24   ` Code alignment Ewen Cartwright
2006-08-25 12:26     ` Peter Dyballa
2006-08-25 14:05     ` Jim Ottaway
2006-08-25 14:28       ` Ewen Cartwright

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).