emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Indentation of org-mode code
@ 2011-04-20 14:20 Manuel Giraud
  2011-04-20 14:40 ` Bernt Hansen
  0 siblings, 1 reply; 4+ messages in thread
From: Manuel Giraud @ 2011-04-20 14:20 UTC (permalink / raw)
  To: emacs-orgmode


Hi,

What are the good settings to indent the org-mode code? I have searched
through the mailing list and worg but can't find an answer.

I'm asking because while working on org-html.el at one point I reindent
the whole buffer and end up with a mess (indenting with "emacs -Q" can't
fix this).

Best,
-- 
Manuel Giraud

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

* Re: Indentation of org-mode code
  2011-04-20 14:20 Indentation of org-mode code Manuel Giraud
@ 2011-04-20 14:40 ` Bernt Hansen
  2011-04-20 14:54   ` Manuel Giraud
  0 siblings, 1 reply; 4+ messages in thread
From: Bernt Hansen @ 2011-04-20 14:40 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: emacs-orgmode

Manuel Giraud <manuel.giraud@univ-nantes.fr> writes:

> Hi,
>
> What are the good settings to indent the org-mode code? I have searched
> through the mailing list and worg but can't find an answer.
>
> I'm asking because while working on org-html.el at one point I reindent
> the whole buffer and end up with a mess (indenting with "emacs -Q" can't
> fix this).

For indenting lisp code I highlight the region to indent and C-M-\
(which is M-x indent-region)

-Bernt

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

* Re: Indentation of org-mode code
  2011-04-20 14:40 ` Bernt Hansen
@ 2011-04-20 14:54   ` Manuel Giraud
  2011-04-20 15:45     ` Bernt Hansen
  0 siblings, 1 reply; 4+ messages in thread
From: Manuel Giraud @ 2011-04-20 14:54 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Bernt Hansen <bernt@norang.ca> writes:

> For indenting lisp code I highlight the region to indent and C-M-\
> (which is M-x indent-region)

Yes I know (and do). But if you try this on org-html.el, for example,
big chunks of code are indented differently than they are now. So I
thought that there was some convention for indenting org-mode code.

-- 
Manuel Giraud

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

* Re: Indentation of org-mode code
  2011-04-20 14:54   ` Manuel Giraud
@ 2011-04-20 15:45     ` Bernt Hansen
  0 siblings, 0 replies; 4+ messages in thread
From: Bernt Hansen @ 2011-04-20 15:45 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: emacs-orgmode

Manuel Giraud <manuel.giraud@univ-nantes.fr> writes:

> Bernt Hansen <bernt@norang.ca> writes:
>
>> For indenting lisp code I highlight the region to indent and C-M-\
>> (which is M-x indent-region)
>
> Yes I know (and do). But if you try this on org-html.el, for example,
> big chunks of code are indented differently than they are now. So I
> thought that there was some convention for indenting org-mode code.

Not that I'm aware of - but you should refrain from making unnecessary
whitespace changes to the code base even if the existing code is
incorrectly formatted.  Reformat the stuff you touch but don't make
copious whitespace changes - that just hides what you changed.

Regards,
Bernt

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

end of thread, other threads:[~2011-04-20 17:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-20 14:20 Indentation of org-mode code Manuel Giraud
2011-04-20 14:40 ` Bernt Hansen
2011-04-20 14:54   ` Manuel Giraud
2011-04-20 15:45     ` Bernt Hansen

Code repositories for project(s) associated with this public inbox

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

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