GNU bug report logs -
#23177
Inserting $ with delete-selection-mode set
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23177 in the body.
You can then email your comments to 23177 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#23177
; Package
auctex
.
(Thu, 31 Mar 2016 21:44:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Roger Lipsett <roger.lipsett <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Thu, 31 Mar 2016 21:44:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tex.el, at line 6315, contains the code
;; delsel.el, `delete-selection-mode'
(put 'TeX-newline 'delete-selection t)
(put 'TeX-insert-quote 'delete-selection t)
(put 'TeX-insert-backslash 'delete-selection t)
Should this also include a line for 'TeX-insert-dollar?
The problem I'm seeing is that if I'm in TeX (or LaTeX) mode, running
with delete-selection-mode t, and type a $ when a region is selected,
the selected region is not killed.
Roger Lipsett
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#23177
; Package
auctex
.
(Thu, 31 Mar 2016 21:59:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 23177 <at> debbugs.gnu.org (full text, mbox):
close 23177
tags 23177 notabug
thanks
Hi Roger,
2016-03-31 23:37 GMT+02:00 Roger Lipsett <roger.lipsett <at> gmail.com>:
>
> tex.el, at line 6315, contains the code
>
> ;; delsel.el, `delete-selection-mode'
> (put 'TeX-newline 'delete-selection t)
> (put 'TeX-insert-quote 'delete-selection t)
> (put 'TeX-insert-backslash 'delete-selection t)
>
> Should this also include a line for 'TeX-insert-dollar?
No. That line was there until a few years ago but was removed on
purpose in order to provide a new feature:
http://git.savannah.gnu.org/cgit/auctex.git/commit/tex.el?id=d59628f1ee02abccc179c463214baddb5a17bf71
> The problem I'm seeing is that if I'm in TeX (or LaTeX) mode, running with delete-selection-mode t, and type a $ when a region is selected, the selected region is not killed.
If `TeX-electric-math' is non-nil, when you press `$' with an active
region, it will wrap the selection with opening and closing inline
equation symbols. This is a feature AUCTeX provides, like for
parentheses in most other programming languages. If you want to lose
this feature and be able to delete the region when inserting a dollar,
then these lines in your init file
(setq TeX-electric-math nil)
(put 'TeX-insert-dollar 'delete-selection t)
should do the trick. Note that `TeX-electric-math' defaults to nil,
the first line shouldn't be actually needed.
Bye,
Mosè
bug closed, send any further explanations to
23177 <at> debbugs.gnu.org and Roger Lipsett <roger.lipsett <at> gmail.com>
Request was from
Mosè Giordano <mose <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 31 Mar 2016 21:59:02 GMT)
Full text and
rfc822 format available.
Added tag(s) notabug.
Request was from
Mosè Giordano <mose <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 31 Mar 2016 21:59:02 GMT)
Full text and
rfc822 format available.
Did not alter fixed versions and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 31 Mar 2016 22:17:01 GMT)
Full text and
rfc822 format available.
Added tag(s) fixed.
Request was from
mose <at> gnu.org (Mosè Giordano)
to
control <at> debbugs.gnu.org
.
(Thu, 31 Mar 2016 22:17:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
23177 <at> debbugs.gnu.org and Roger Lipsett <roger.lipsett <at> gmail.com>
Request was from
mose <at> gnu.org (Mosè Giordano)
to
control <at> debbugs.gnu.org
.
(Thu, 31 Mar 2016 22:17:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#23177
; Package
auctex
.
(Thu, 31 Mar 2016 22:22:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 23177 <at> debbugs.gnu.org (full text, mbox):
I just added the line
(put 'TeX-insert-dollar 'delete-selection (lambda () (null
TeX-electric-math)))
to git version of AUCTeX
(http://git.savannah.gnu.org/gitweb/?p=auctex.git;a=commitdiff;h=da88a3eca3107372131aa26930e548c039fe1b51).
Now `delete-selection' behavior is dynamically determined by
`TeX-electric-math' and should always do the-right-thing™. Thanks for
the suggestion.
Bye,
Mosè
2016-03-31 23:57 GMT+02:00 Mosè Giordano <mose <at> gnu.org>:
> close 23177
> tags 23177 notabug
> thanks
>
>
> Hi Roger,
>
> 2016-03-31 23:37 GMT+02:00 Roger Lipsett <roger.lipsett <at> gmail.com>:
>>
>> tex.el, at line 6315, contains the code
>>
>> ;; delsel.el, `delete-selection-mode'
>> (put 'TeX-newline 'delete-selection t)
>> (put 'TeX-insert-quote 'delete-selection t)
>> (put 'TeX-insert-backslash 'delete-selection t)
>>
>> Should this also include a line for 'TeX-insert-dollar?
>
> No. That line was there until a few years ago but was removed on
> purpose in order to provide a new feature:
> http://git.savannah.gnu.org/cgit/auctex.git/commit/tex.el?id=d59628f1ee02abccc179c463214baddb5a17bf71
>
>> The problem I'm seeing is that if I'm in TeX (or LaTeX) mode, running with delete-selection-mode t, and type a $ when a region is selected, the selected region is not killed.
>
> If `TeX-electric-math' is non-nil, when you press `$' with an active
> region, it will wrap the selection with opening and closing inline
> equation symbols. This is a feature AUCTeX provides, like for
> parentheses in most other programming languages. If you want to lose
> this feature and be able to delete the region when inserting a dollar,
> then these lines in your init file
>
> (setq TeX-electric-math nil)
> (put 'TeX-insert-dollar 'delete-selection t)
>
> should do the trick. Note that `TeX-electric-math' defaults to nil,
> the first line shouldn't be actually needed.
>
> Bye,
> Mosè
Removed tag(s) notabug.
Request was from
Mosè Giordano <mose <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 01 Apr 2016 09:05:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 29 Apr 2016 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 111 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.