Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Transient mark mode

14 views
Skip to first unread message

Morten Leander Petersen

unread,
Oct 17, 2011, 5:38:00 AM10/17/11
to help-gn...@gnu.org
Hi.

I use a couple of modes which require transient mark mode to be enabled
(yasnippet for one). However, I don't like the highlighting of the
region. So is there a way to get rid of this highlighting without having
to disable transient mark mode?

Regards,
--
/Morten


Jambunathan K

unread,
Oct 17, 2011, 6:34:39 AM10/17/11
to Morten Leander Petersen, help-gn...@gnu.org
M-x customize-face RET region RET

Make sure that the highlighting is "subdued" so that it is "barely"
visible.


> Regards,

--

Alan Mackenzie

unread,
Oct 17, 2011, 9:21:09 AM10/17/11
to
No there is not, apart from nullifying the highlighting face, like
Jambunathan said.

Transient Mark Mode is a conflation of three disparate behaviours:
1/- Highlighting the region.
2/- Sort of "narrowing" to the region for certain commands.
3/- Disabling the mark and region's functionality except when it's
enabled.

3 is what the minor mode is named after, yet 3's behaviour is usually
nullified by setting the option `mark-active-even-if-inactive'. That is,
setting that option makes the region always usable. So naming 1 and 2
"transient-mark-mode" is pretty silly, now.

1 and 2 can not be separated from eachother. This is bad design, as there
are people who want 2 without 1.

> Regards,

--
Alan Mackenzie (Nuremberg, Germany).

des...@verizon.net

unread,
Oct 17, 2011, 10:05:42 AM10/17/11
to
In my case I just set the face background in my .emacs.
If your current background is black, grey12 works well:

(set-face-background 'region "grey12")



--
Dan Espen

Stefan Monnier

unread,
Oct 17, 2011, 10:15:35 AM10/17/11
to
> I use a couple of modes which require transient mark mode to be enabled
> (yasnippet for one).

That would be a bug in those packages.
Report it to their authors.


Stefan

Harry Putnam

unread,
Oct 17, 2011, 10:55:42 AM10/17/11
to help-gn...@gnu.org
Jambunathan K <kjambu...@gmail.com> writes:

> M-x customize-face RET region RET
>
> Make sure that the highlighting is "subdued" so that it is "barely"
> visible.

Where does one access a `subdued' property?


Deniz Dogan

unread,
Oct 17, 2011, 12:00:23 PM10/17/11
to help-gn...@gnu.org
On 2011-10-17 11:38, Morten Leander Petersen wrote:
> Hi.
>
> I use a couple of modes which require transient mark mode to be enabled
> (yasnippet for one). However, I don't like the highlighting of the
> region. So is there a way to get rid of this highlighting without having
> to disable transient mark mode?
>

Just remove the `background' property from the `region' face using
customize:

(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(region ((t nil))))

Harry Putnam

unread,
Oct 17, 2011, 2:08:22 PM10/17/11
to help-gn...@gnu.org
Well that removes it altogether. I took Jambunathan's term `barely'
to mean there was still something visible. Perhaps I misunderstood.


Morten Leander Petersen

unread,
Oct 18, 2011, 4:16:14 AM10/18/11
to help-gn...@gnu.org
Deniz Dogan <de...@dogan.se> writes:

> On 2011-10-17 11:38, Morten Leander Petersen wrote:
>> Hi.
>>
>> I use a couple of modes which require transient mark mode to be enabled
>> (yasnippet for one). However, I don't like the highlighting of the
>> region. So is there a way to get rid of this highlighting without having
>> to disable transient mark mode?
>>
>
> Just remove the `background' property from the `region' face using
> customize:
>
> (custom-set-faces
> ;; custom-set-faces was added by Custom.
> ;; If you edit it by hand, you could mess it up, so be careful.
> ;; Your init file should contain only one such instance.
> ;; If there is more than one, they won't work right.
> '(region ((t nil))))
>
>

For some reason this did not work for me. However if I did it manually
it worked, i.e. I put the following in my .emacs

(set-face-foreground 'region nil)
(set-face-background 'region nil)

and that did the trick.

Thank you for the help.
--
/Morten


0 new messages