* how to disable smart-tab only on org headline?
@ 2016-04-07 14:12 Xebar Saram
2016-04-07 14:59 ` Adam Porter
0 siblings, 1 reply; 5+ messages in thread
From: Xebar Saram @ 2016-04-07 14:12 UTC (permalink / raw)
To: org mode
[-- Attachment #1: Type: text/plain, Size: 677 bytes --]
Hi guys
i found this nifty little package called smart tab that makes using tab in
emacs easier:
https://github.com/genehack/smart-tab/tree/master
the only issue is that when on org headlines instead of
expanding/collapsing it tries to auto add more stars which shifts the whole
structure
i was wondering if there is a way (perhaps a hook) to let emacs know your
on a orgmode headline and then disable smart tab for the fraction of the
time your on the headline? perhaps there is aother better option that im
just no thinking of
i will warn in advance i cant code to save my life ;-) so any lisp examples
on how to achieve this would be greatly appreciated!
thx alot!
Z
[-- Attachment #2: Type: text/html, Size: 1305 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to disable smart-tab only on org headline?
2016-04-07 14:12 how to disable smart-tab only on org headline? Xebar Saram
@ 2016-04-07 14:59 ` Adam Porter
2016-04-07 15:12 ` Adam Porter
0 siblings, 1 reply; 5+ messages in thread
From: Adam Porter @ 2016-04-07 14:59 UTC (permalink / raw)
To: emacs-orgmode
Hi,
It looks like it may be a simple fix to make smart-tab call org-cycle in
org-mode. I forked the repo and made the change:
https://github.com/alphapapa/smart-tab/tree/org-mode
Note, I have not tested it, but I think it should work. Let me know what
you find out.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to disable smart-tab only on org headline?
2016-04-07 14:59 ` Adam Porter
@ 2016-04-07 15:12 ` Adam Porter
2016-04-09 15:21 ` Xebar Saram
0 siblings, 1 reply; 5+ messages in thread
From: Adam Porter @ 2016-04-07 15:12 UTC (permalink / raw)
To: emacs-orgmode
Upon closer inspection I see that smart-tab-mode refuses to activate in
org-mode, so the behavior you're seeing probably is not caused by smart-tab.
For me, if the point is on an Org heading without text, like (point marked
by "|"):
* |
lorem ipsum
and I press TAB, Org indents the heading, cycling through the levels. If
there is any text after the * on the heading line, it cycles its visibility
instead.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to disable smart-tab only on org headline?
2016-04-07 15:12 ` Adam Porter
@ 2016-04-09 15:21 ` Xebar Saram
2016-04-09 18:22 ` Adam Porter
0 siblings, 1 reply; 5+ messages in thread
From: Xebar Saram @ 2016-04-09 15:21 UTC (permalink / raw)
To: Adam Porter; +Cc: org mode
[-- Attachment #1: Type: text/plain, Size: 867 bytes --]
Hi again Adam
im pretty sure smart tab activates when im in org, when i issue C-h k i get
this
It is bound to TAB, <tab>, <menu-bar> <YASnippet> <Expand trigger>.
(yas-expand &optional FIELD)
Expand a snippet before point. If no snippet
expansion is possible, call command `smart-tab'.
and i also see smart tab in the mod line/
any clue?
thx
Z
On Thu, Apr 7, 2016 at 6:12 PM, Adam Porter <adam@alphapapa.net> wrote:
> Upon closer inspection I see that smart-tab-mode refuses to activate in
> org-mode, so the behavior you're seeing probably is not caused by
> smart-tab.
>
> For me, if the point is on an Org heading without text, like (point marked
> by "|"):
>
> * |
> lorem ipsum
>
> and I press TAB, Org indents the heading, cycling through the levels. If
> there is any text after the * on the heading line, it cycles its visibility
> instead.
>
>
>
[-- Attachment #2: Type: text/html, Size: 1477 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to disable smart-tab only on org headline?
2016-04-09 15:21 ` Xebar Saram
@ 2016-04-09 18:22 ` Adam Porter
0 siblings, 0 replies; 5+ messages in thread
From: Adam Porter @ 2016-04-09 18:22 UTC (permalink / raw)
To: emacs-orgmode
Xebar Saram <zeltakc <at> gmail.com> writes:
> im pretty sure smart tab activates when im in org, when i issue C-h k i
get this
>
>
> It is bound to TAB, <tab>, <menu-bar> <YASnippet> <Expand trigger>.
>
> (yas-expand &optional FIELD)
>
> Expand a snippet before point. If no snippet
> expansion is possible, call command `smart-tab'.
>
>
> and i also see smart tab in the mod line/
>
> any clue?
Hi Z,
Well, here's what I see in =smart-tab.el=:
#+BEGIN_SRC elisp
(defcustom smart-tab-disabled-major-modes '(org-mode term-mode eshell-mode
w3m-mode magit-mode)
...)
...
(define-minor-mode smart-tab-mode
...
(when (or (minibufferp)
buffer-read-only
(member major-mode smart-tab-disabled-major-modes))
(smart-tab-mode-off)))
#+END_SRC
And when I try to use it in an Org buffer, it says "Smart-Tab mode disabled."
Maybe you have an old version that doesn't do this?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-04-09 18:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-07 14:12 how to disable smart-tab only on org headline? Xebar Saram
2016-04-07 14:59 ` Adam Porter
2016-04-07 15:12 ` Adam Porter
2016-04-09 15:21 ` Xebar Saram
2016-04-09 18:22 ` Adam Porter
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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).