all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Formatting Code
@ 2003-01-29  8:28 Glenn Hancock
  2003-01-30  0:17 ` Matt
  2003-01-30  8:20 ` Kai Großjohann
  0 siblings, 2 replies; 8+ messages in thread
From: Glenn Hancock @ 2003-01-29  8:28 UTC (permalink / raw)


I have been trying to figure out how  to get emacs to format my code the way 
I want it and now have it so screwed up it doesn't act right at all.  How 
do I reset it back to defaults to start over?

Is this typical of using Emacs?  I want to program not spend all day 
learning an IDE.  Anyone have any tips to get me going quicker?

Thanks,


Glenn.

P.S.  I have already read the entire tutorial but it doesn't cover 
formatting code issues...

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

* Re: Formatting Code
  2003-01-29  8:28 Formatting Code Glenn Hancock
@ 2003-01-30  0:17 ` Matt
  2003-01-30  0:51   ` gebser
  2003-01-30  8:20 ` Kai Großjohann
  1 sibling, 1 reply; 8+ messages in thread
From: Matt @ 2003-01-30  0:17 UTC (permalink / raw)


Glenn Hancock <ghancock@localhost.localdomain> writes:

> I have been trying to figure out how  to get emacs to format my code the way 
> I want it and now have it so screwed up it doesn't act right at all.  How 
> do I reset it back to defaults to start over?

You can set everything back to defaults by wiping out your .emacs
file. If you were using customize, you can click `Erase Customization'.

> Is this typical of using Emacs?  I want to program not spend all day 
> learning an IDE.  Anyone have any tips to get me going quicker?

What type of code are you writing? Are you using a certain major mode?
If not, you should. Have you tried customizing the settings for that
particular mode? - i.e., for Perl mode try M-x customize-group RET
perl RET

If you want quick, my advice is just get used to it the way it is.

> Thanks,
> 
> 
> Glenn.
> 
> P.S.  I have already read the entire tutorial but it doesn't cover 
> formatting code issues...
> 

There's also a Manual. I'm fairly new to emacs, but the time I've
invested learning it has been well worth the effort.

Matt
-- 
Remove the X's to reply directly.

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

* Re: Formatting Code
  2003-01-30  0:17 ` Matt
@ 2003-01-30  0:51   ` gebser
  2003-01-31  8:07     ` Lee Sau Dan
  0 siblings, 1 reply; 8+ messages in thread
From: gebser @ 2003-01-30  0:51 UTC (permalink / raw)
  Cc: help-gnu-emacs


Another track:

Matt at 00:17 (UTC-0000) on Thu, 30 Jan 2003 said:

= Glenn Hancock <ghancock@localhost.localdomain> writes:
= 
= > I have been trying to figure out how  to get emacs to format my code the way 
= > I want it and now have it so screwed up it doesn't act right at all.  How 
= > do I reset it back to defaults to start over?
= 
= You can set everything back to defaults by wiping out your .emacs
= file. If you were using customize, you can click `Erase Customization'.

You could also rename your .emacs and .emacs~ files so as to get them 
back later if needed.

= 
= > Is this typical of using Emacs?  I want to program not spend all day 
= > learning an IDE.  Anyone have any tips to get me going quicker?
= 
= What type of code are you writing? Are you using a certain major mode?
= If not, you should. Have you tried customizing the settings for that
= particular mode? - i.e., for Perl mode try M-x customize-group RET
= perl RET

It's fairly easy to edit a lot of the formatting done by elisp.  I've
done a lot in about a half hour and know very little about elisp.  You 
can ask anyone here about that.  :)


= 
= If you want quick, my advice is just get used to it the way it is.

If it's about customizing key combos (aka chords... whatever), I'd 
agree.  But it's much more important to have your documents formatted 
the way you want.  That's what an editor's for.  It'd be a major pain in 
the patoot to have to go back and reformat them later when you finally 
figure out how.

Glenn, you should give us more specifics about what kind of file you're 
editing (shell or perl script, C code, html, etc.) and what style of 
formatting you want.  Your question is a little vague.  Vague questions 
get vague answers (at best).


hth,
ken


= 
= > Thanks,
= > 
= > 
= > Glenn.
= > 
= > P.S.  I have already read the entire tutorial but it doesn't cover 
= > formatting code issues...
= > 
= 
= There's also a Manual. I'm fairly new to emacs, but the time I've
= invested learning it has been well worth the effort.
= 
= Matt
= 

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

* Re: Formatting Code
  2003-01-29  8:28 Formatting Code Glenn Hancock
  2003-01-30  0:17 ` Matt
@ 2003-01-30  8:20 ` Kai Großjohann
  1 sibling, 0 replies; 8+ messages in thread
From: Kai Großjohann @ 2003-01-30  8:20 UTC (permalink / raw)


Glenn Hancock <ghancock@localhost.localdomain> writes:

> P.S.  I have already read the entire tutorial but it doesn't cover 
> formatting code issues...

Emacs comes with *extensive* documentation.  The trick is finding the
right spot to read...

In your case, customizing indentation for C-like modes is discussed
in the CC mode info file which can be accessed like this:

C-h i d         enter home page of doc browser
m CC mode RET   select CC mode info file
-- 
Ambibibentists unite!

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

* Re: Formatting Code
  2003-01-30  0:51   ` gebser
@ 2003-01-31  8:07     ` Lee Sau Dan
  2003-01-31 11:06       ` gebser
       [not found]       ` <mailman.1235.1044011258.21513.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Lee Sau Dan @ 2003-01-31  8:07 UTC (permalink / raw)


>>>>> "gebser" == gebser  <gebser@ameritech.net> writes:

    gebser> You could also rename your .emacs and .emacs~ files so as
    gebser> to get them back later if needed.

Why not learn  to use RCS, if you're going  to develop some non-trival
programs anyway?


-- 
Lee Sau Dan                     李守敦(Big5)                    ~{@nJX6X~}(HZ) 

E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee

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

* Re: Formatting Code
  2003-01-31  8:07     ` Lee Sau Dan
@ 2003-01-31 11:06       ` gebser
       [not found]       ` <mailman.1235.1044011258.21513.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: gebser @ 2003-01-31 11:06 UTC (permalink / raw)
  Cc: help-gnu-emacs


Lee Sau Dan at 09:07 (UTC+0100) on 31 Jan 2003 said:

= >>>>> "gebser" == gebser  <gebser@ameritech.net> writes:
= 
=     gebser> You could also rename your .emacs and .emacs~ files so as
=     gebser> to get them back later if needed.
= 
= Why not learn  to use RCS, if you're going  to develop some non-trival
= programs anyway?

That's not a terrible idea, generally speaking.  But in this instance
the person with the problem (not me btw)  doesn't need another task to
learn and do.  He's just trying to get his documents to format correctly
as he edits them.  Just running a couple "cp" commands doesn't bring 
about scope creep.

ken

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

* Re: Formatting Code
       [not found]       ` <mailman.1235.1044011258.21513.help-gnu-emacs@gnu.org>
@ 2003-02-03  7:49         ` Lee Sau Dan
  2003-02-03 12:47           ` Kai Großjohann
  0 siblings, 1 reply; 8+ messages in thread
From: Lee Sau Dan @ 2003-02-03  7:49 UTC (permalink / raw)


>>>>> "gebser" == gebser  <gebser@ameritech.net> writes:

    gebser> That's not a terrible idea, generally speaking.  But in
    gebser> this instance the person with the problem (not me btw)
    gebser> doesn't need another task to learn and do.  He's just
    gebser> trying to get his documents to format correctly as he
    gebser> edits them.

But that's quite easy when you have Emacs as the frontend.  C-x v i to
start  version on  the file  in the  current buffer.   Then, C-x  q to
lock/unlock  (actually  checkout/checkin)  the  file.   That's  how  I
started to  use RCS.   No complications of  invoking 'ci' and  'co' by
hand.  :)





-- 
Lee Sau Dan                     李守敦(Big5)                    ~{@nJX6X~}(HZ) 

E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee

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

* Re: Formatting Code
  2003-02-03  7:49         ` Lee Sau Dan
@ 2003-02-03 12:47           ` Kai Großjohann
  0 siblings, 0 replies; 8+ messages in thread
From: Kai Großjohann @ 2003-02-03 12:47 UTC (permalink / raw)


Lee Sau Dan <danlee@informatik.uni-freiburg.de> writes:

> But that's quite easy when you have Emacs as the frontend.  C-x v i to
> start  version on  the file  in the  current buffer.   Then, C-x  q to
> lock/unlock  (actually  checkout/checkin)  the  file.

Actually, just C-x v v is enough -- only one key combo to remember.
That's pretty close to DWIM, I'd think.
-- 
A turnip curses Elvis

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

end of thread, other threads:[~2003-02-03 12:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-29  8:28 Formatting Code Glenn Hancock
2003-01-30  0:17 ` Matt
2003-01-30  0:51   ` gebser
2003-01-31  8:07     ` Lee Sau Dan
2003-01-31 11:06       ` gebser
     [not found]       ` <mailman.1235.1044011258.21513.help-gnu-emacs@gnu.org>
2003-02-03  7:49         ` Lee Sau Dan
2003-02-03 12:47           ` Kai Großjohann
2003-01-30  8:20 ` Kai Großjohann

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.