unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Line indents to middle when editing init.el: what the heck is happening?
@ 2016-01-26 12:36 Tom Browder
  2016-01-27  2:05 ` Alexis
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Browder @ 2016-01-26 12:36 UTC (permalink / raw)
  To: help-gnu-emacs

I am in the process of getting a usable Emacs init.el file going after many
years of using XEmacs.

I am using list-packages for package installation and have installed
perl6-mode and friends. I have managed to get Perl 6 indentation
spacing the way I want it, and text buffers behave okay for now (but I will
have question later).

However, when editing init.el and I hit a carriage return, on the new line
the caret jumps to the middle of the window on the same line!

Any ideas or advice?

Thanks.

Best,

-Tom


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

* Re: Line indents to middle when editing init.el: what the heck is happening?
  2016-01-26 12:36 Line indents to middle when editing init.el: what the heck is happening? Tom Browder
@ 2016-01-27  2:05 ` Alexis
  2016-01-27  2:45   ` Tom Browder
  0 siblings, 1 reply; 5+ messages in thread
From: Alexis @ 2016-01-27  2:05 UTC (permalink / raw)
  To: Tom Browder; +Cc: help-gnu-emacs


Tom Browder <tom.browder@gmail.com> writes:

> However, when editing init.el and I hit a carriage return, on 
> the new line the caret jumps to the middle of the window on the 
> same line!
>
> Any ideas or advice?

Does this happen from emacs -Q? And could you provide some sample 
text demonstrating the context in which this behaviour occurs? Off 
the top of my head, it reminds me of the standard behaviour when 
one is using a single ';' to indicate ELisp comments.


Alexis.



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

* Re: Line indents to middle when editing init.el: what the heck is happening?
  2016-01-27  2:05 ` Alexis
@ 2016-01-27  2:45   ` Tom Browder
  2016-01-30  4:43     ` Alexis
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Browder @ 2016-01-27  2:45 UTC (permalink / raw)
  To: Alexis; +Cc: help-gnu-emacs@gnu.org

On Tuesday, January 26, 2016, Alexis <flexibeast@gmail.com> wrote:
>
> Tom Browder <tom.browder@gmail.com> writes:
>
>> However, when editing init.el and I hit a carriage return, on the new
>> line the caret jumps to the middle of the window on the same line!
>> Any ideas or advice?
>
> Does this happen from emacs -Q? And could you provide some sample text
> demonstrating the context in which this behaviour occurs? Off the top of my
> head, it reminds me of the standard behaviour when one is using a single
> ';' to indicate ELisp

comments.


Ah, I am using a single semicolon!  I have never heard of that behavior
before, and I don't remember seeing that in XEmacs (but I started with an
extensive init.el from one of the daddy rabbits which may be the reason).

I'll see if a double-semicolon changes the behavior. BTW, do you know how
to change that behavior?

Thanks, Alexis.

Cheers!

-Tom


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

* Re: Line indents to middle when editing init.el: what the heck is happening?
  2016-01-27  2:45   ` Tom Browder
@ 2016-01-30  4:43     ` Alexis
  2016-01-31 21:12       ` Tom Browder
  0 siblings, 1 reply; 5+ messages in thread
From: Alexis @ 2016-01-30  4:43 UTC (permalink / raw)
  To: Tom Browder; +Cc: help-gnu-emacs@gnu.org


Tom Browder <tom.browder@gmail.com> writes:

> Ah, I am using a single semicolon!  I have never heard of that 
> behavior before, and I don't remember seeing that in XEmacs (but 
> I started with an extensive init.el from one of the daddy 
> rabbits which may be the reason).

It's part of the GNU Emacs coding conventions / recommendations; 
cf.  this section of GNU Emacs Lisp Reference Manual:

https://www.gnu.org/software/emacs/manual/html_node/elisp/Comment-Tips.html#Comment-Tips

> I'll see if a double-semicolon changes the behavior. BTW, do you 
> know how to change that behavior?

Well, in terms of which column a single-semicolon comment will be 
aligned to, you can set the value of the variable 
`comment-column`.

Afaik, to change how single-semicolon comments behave overall, 
you'd need to modify the variable `comment-indent-function` to 
point to a function that behaves the way you want (e.g. a modified 
version of the function `comment-indent-default`).

> Thanks, Alexis.

You're welcome. :-)


Alexis.



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

* Re: Line indents to middle when editing init.el: what the heck is happening?
  2016-01-30  4:43     ` Alexis
@ 2016-01-31 21:12       ` Tom Browder
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Browder @ 2016-01-31 21:12 UTC (permalink / raw)
  To: Alexis; +Cc: help-gnu-emacs@gnu.org

On Fri, Jan 29, 2016 at 10:43 PM, Alexis <flexibeast@gmail.com> wrote:
> It's part of the GNU Emacs coding conventions / recommendations; cf.  this
> section of GNU Emacs Lisp Reference Manual:
>
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Comment-Tips.html#Comment-Tips

Great link, Alexis.  Changing my comments to leading double-semis
cured the problem.  I'm going to follow the recommended convention as
best I can.

Thanks a heap!

Cheers!

-Tom



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

end of thread, other threads:[~2016-01-31 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-26 12:36 Line indents to middle when editing init.el: what the heck is happening? Tom Browder
2016-01-27  2:05 ` Alexis
2016-01-27  2:45   ` Tom Browder
2016-01-30  4:43     ` Alexis
2016-01-31 21:12       ` Tom Browder

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