Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sp-rewrap-sexp doesn't understand triple-quoted strings #320

Closed
Wilfred opened this issue Apr 15, 2014 · 3 comments
Closed

sp-rewrap-sexp doesn't understand triple-quoted strings #320

Wilfred opened this issue Apr 15, 2014 · 3 comments

Comments

@Wilfred
Copy link
Collaborator

Wilfred commented Apr 15, 2014

Given the following buffer state, where | is point:

'''|foo'''

Typing M-x sp-rewrap-sexp RET " gives:

"''|foo''"

Expected result:

"""|foo"""
@Fuco1
Copy link
Owner

Fuco1 commented Sep 13, 2014

This should probably be implemented as a special Python support in a related file.

@Fuco1 Fuco1 closed this as completed Sep 13, 2014
@Fuco1 Fuco1 reopened this Sep 13, 2014
@Fuco1 Fuco1 modified the milestone: 1.7 Jan 14, 2015
@Fuco1 Fuco1 modified the milestones: 1.7, 1.8 Feb 17, 2015
@Fuco1
Copy link
Owner

Fuco1 commented Jul 6, 2016

I tried to make this work but it just doesn't fit in the rewrap thing. Even when I properly define tripple-quote pairs the rewrap thing doesn't consider pairs with shared prefixes and picks the shortest. One could add a special handler for python but it's not a priority for me.

I will add a hook for the rewrap function where people can add their code.

@Fuco1
Copy link
Owner

Fuco1 commented Jul 6, 2016

The hook action is rewrap-sexp.

@Fuco1 Fuco1 modified the milestones: Backlog, 1.8 Jul 6, 2016
@Fuco1 Fuco1 closed this as completed in 01ff95c May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants