* bug#37183: 26.2 Never for Tab-Always-Indent
@ 2019-08-25 19:13 Charles Jackson via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-10 0:24 ` Lars Ingebrigtsen
0 siblings, 1 reply; 7+ messages in thread
From: Charles Jackson via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2019-08-25 19:13 UTC (permalink / raw)
To: 37183
[-- Attachment #1: Type: text/plain, Size: 134 bytes --]
The `tab-always-indent' variable should have a 'never' option that will make TAB just insert a tab character without indenting at all.
[-- Attachment #2: Type: text/html, Size: 150 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#37183: 26.2 Never for Tab-Always-Indent
2019-08-25 19:13 bug#37183: 26.2 Never for Tab-Always-Indent Charles Jackson via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2019-10-10 0:24 ` Lars Ingebrigtsen
2020-09-05 1:02 ` Stefan Kangas
0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-10 0:24 UTC (permalink / raw)
To: Charles Jackson; +Cc: 37183
Charles Jackson <charles.b.jackson@protonmail.com> writes:
> The `tab-always-indent' variable should have a 'never' option that
> will make TAB just insert a tab character without indenting at all.
I think that might make sense... On the other hand, you can just
globally set the TAB key to insert a TAB character, so I'm not quite
sure whether it's very useful.
Does anybody have an opinion here?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#37183: 26.2 Never for Tab-Always-Indent
2019-10-10 0:24 ` Lars Ingebrigtsen
@ 2020-09-05 1:02 ` Stefan Kangas
2020-09-05 12:48 ` Lars Ingebrigtsen
2020-09-05 12:54 ` Lars Ingebrigtsen
0 siblings, 2 replies; 7+ messages in thread
From: Stefan Kangas @ 2020-09-05 1:02 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Charles Jackson, 37183
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Charles Jackson <charles.b.jackson@protonmail.com> writes:
>
>> The `tab-always-indent' variable should have a 'never' option that
>> will make TAB just insert a tab character without indenting at all.
>
> I think that might make sense... On the other hand, you can just
> globally set the TAB key to insert a TAB character, so I'm not quite
> sure whether it's very useful.
>
> Does anybody have an opinion here?
(How would you set it globally? If you use `global-set-key' any local
bindings would shadow it, right?)
FWIW, I think the option makes sense, with or without the ability to set
it in another way. It's a logical addition and could make things easier
for users.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#37183: 26.2 Never for Tab-Always-Indent
2020-09-05 1:02 ` Stefan Kangas
@ 2020-09-05 12:48 ` Lars Ingebrigtsen
2020-09-05 14:22 ` Stefan Kangas
2020-09-05 12:54 ` Lars Ingebrigtsen
1 sibling, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-05 12:48 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Charles Jackson, 37183
Stefan Kangas <stefan@marxist.se> writes:
>> I think that might make sense... On the other hand, you can just
>> globally set the TAB key to insert a TAB character, so I'm not quite
>> sure whether it's very useful.
>>
>> Does anybody have an opinion here?
>
> (How would you set it globally? If you use `global-set-key' any local
> bindings would shadow it, right?)
I was thinking about setting TAB in `overriding-terminal-local-map'...
(I've never used that map myself, though, so I may be misunderstanding
how that variable works.)
> FWIW, I think the option makes sense, with or without the ability to set
> it in another way. It's a logical addition and could make things easier
> for users.
Yeah, it is pretty logical addition. The main problem with doing
something like this is that there's a bunch of other similar variables,
like c-tab-always-indent/snmp-tab-always-indent/opascal-tab-always-indents
(and seemingly an infinite number for some reason), and for consistency,
we'd have to allow `never' for all of these (and change all the usage
sites).
I'm not sure that's worth it if there is a simple way of binding TAB.
We could just mention that in the doc string of `tab-always-indent'.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#37183: 26.2 Never for Tab-Always-Indent
2020-09-05 12:48 ` Lars Ingebrigtsen
@ 2020-09-05 14:22 ` Stefan Kangas
2020-09-05 14:41 ` Lars Ingebrigtsen
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Kangas @ 2020-09-05 14:22 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Charles Jackson, 37183
Lars Ingebrigtsen <larsi@gnus.org> writes:
> I'm not sure that's worth it if there is a simple way of binding TAB.
> We could just mention that in the doc string of `tab-always-indent'.
True. I think adding it to the doc string makes a great deal of sense.
We should also consider that this will likely only ever be used by a
small minority of users.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#37183: 26.2 Never for Tab-Always-Indent
2020-09-05 14:22 ` Stefan Kangas
@ 2020-09-05 14:41 ` Lars Ingebrigtsen
0 siblings, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-05 14:41 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Charles Jackson, 37183
Stefan Kangas <stefan@marxist.se> writes:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> I'm not sure that's worth it if there is a simple way of binding TAB.
>> We could just mention that in the doc string of `tab-always-indent'.
>
> True. I think adding it to the doc string makes a great deal of sense.
>
> We should also consider that this will likely only ever be used by a
> small minority of users.
Yup. I've now amended the doc string and I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#37183: 26.2 Never for Tab-Always-Indent
2020-09-05 1:02 ` Stefan Kangas
2020-09-05 12:48 ` Lars Ingebrigtsen
@ 2020-09-05 12:54 ` Lars Ingebrigtsen
1 sibling, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-05 12:54 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Charles Jackson, 37183
I just tried it, and it seems to work:
(setq overriding-terminal-local-map
(let ((map (make-sparse-keymap)))
(define-key map [?\t] 'self-insert-command)
map))
By the way, that reminds me how annoying it is that we don't have a
"non-imperative" version to define keymaps.
(setq overriding-terminal-local-map
(make-sparse-keymap
'(([?\t] 'self-insert-command
("a" 'some-command)))))
(or a variation thereof) would seem more natural.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-09-05 14:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-25 19:13 bug#37183: 26.2 Never for Tab-Always-Indent Charles Jackson via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-10 0:24 ` Lars Ingebrigtsen
2020-09-05 1:02 ` Stefan Kangas
2020-09-05 12:48 ` Lars Ingebrigtsen
2020-09-05 14:22 ` Stefan Kangas
2020-09-05 14:41 ` Lars Ingebrigtsen
2020-09-05 12:54 ` Lars Ingebrigtsen
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.