Open Poquaruse opened 8 years ago
It's because SP tries to reindent the region but bibtex's indentation is wonky... There's a patch for this waiting to be merged so you can disable this for bibtex then.
Thanks for letting me know. I'm looking forward to be able to turn reindenting off. :-)
I think this issue is affecting me in other whitespace sensitive languages (haskell, Agda, python). Is there a workaround for disabling reindenting on slurp/barf?
There are two settings sp-no-reindent-after-kill-modes
and sp-no-reindent-after-kill-indent-line-functions
that you can use to customize this.
I thought we already fixed this for haskell out of the box, but it seems we didn't. Patches welcome if you come up with the solution.
Does that also apply when calling slur/barf (in strict mode)? Because it seems to still reindent the line even when I add agda-mode
to the sp-no-reindent-after-kill-modes
list.
It doesn't but it probably should or we should have a setting for that.
I have a plan to add a lot more "actions" (i.e. "feature switches) to the interactive commands and these could be toggled individually. It will be part of the "2.0" permissions system. Unfortunately there is no ETA at all.
Does it make sense to check sp-no-reindent-after-kill-modes
on slurp/barf until there is a more finegrained notion in the mean time? Or is there a function I can monkeypatch as a workaround to disable reindenting at all?
@ajrouvoet Yea I was just thinking about monkeypatching. There is sp--indent-region
you could probably advice to do nothing when in haskell mode.
Okay, I'm very new to elisp, so I'll have to dig a bit to see how and whether it works.
In bibtex-mode:
1) type: "asdf asdf asdf() asdf" 2) do backward slurp with point in () 3) end up with "asdf asdf ([WAY TOO MUCH WHITESPACE HERE]asdf) asdf" 4) similar problem with forward slurp...
Best regards