From: "rgb" <rbielaws@i1.net>
Subject: Re: Is it possible to set a "goal column" for 'beginning-of-line'?
Date: 22 Nov 2005 10:29:30 -0800 [thread overview]
Message-ID: <1132684170.693714.45920@g49g2000cwa.googlegroups.com> (raw)
In-Reply-To: <mailman.16320.1132664052.20277.help-gnu-emacs@gnu.org>
Herbert Euler wrote:
> Hello everyone,
>
> The command 'beginning-of-line' moves point to column 0
> by default. Is it possible to set a "goal column," so that
> this command moves point to that column, e.g. column 7,
> rather than 0? The content before such column will become
> irreachable in this situation (but it might still be displayed).
>
> In another word, is there a vertical version of narrowing
> (but perhaps don't try to hide something)?
This would do what you want globally.
I tried it and it seems dangerous.
(defun avoid-columns-1-7 ()
(when (< (current-column) 7)
(move-to-column 7 t)))
(add-hook 'post-command-hook 'avoid-columns-1-7)
You probably want to limit it to a mode by using a more
restrictive `when' condition like this:
(and (string= mode-name "FOO") (< (current-column) 7))
Or maybe having it look at some variable that you can toggle.
next parent reply other threads:[~2005-11-22 18:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.16320.1132664052.20277.help-gnu-emacs@gnu.org>
2005-11-22 18:29 ` rgb [this message]
2005-11-22 20:35 ` Is it possible to set a "goal column" for 'beginning-of-line'? Stefan Monnier
2005-11-23 2:16 ` Herbert Euler
2005-11-23 2:32 ` Herbert Euler
[not found] <mailman.16440.1132735879.20277.help-gnu-emacs@gnu.org>
2005-12-01 15:49 ` Stefan Monnier
[not found] <mailman.16414.1132712222.20277.help-gnu-emacs@gnu.org>
2005-11-23 7:25 ` Stefan Monnier
2005-11-23 8:51 ` Herbert Euler
2005-11-22 12:50 Herbert Euler
2005-11-22 15:35 ` Henrik Enberg
2005-11-22 17:46 ` Henrik Enberg
2005-11-26 9:58 ` Herbert Euler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1132684170.693714.45920@g49g2000cwa.googlegroups.com \
--to=rbielaws@i1.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.