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

IDLE option to strip trailing whitespace automatically on save #77227

Open
rhettinger opened this issue Mar 11, 2018 · 3 comments
Open

IDLE option to strip trailing whitespace automatically on save #77227

rhettinger opened this issue Mar 11, 2018 · 3 comments
Assignees
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes topic-IDLE type-feature A feature request or enhancement

Comments

@rhettinger
Copy link
Contributor

BPO 33046
Nosy @rhettinger, @terryjreedy, @ZackerySpytz
PRs
  • gh-77227: An IDLE option to strip trailing whitespace on save #17201
  • Dependencies
  • bpo-38862: IDLE: Include end newlines in whitespace fix.
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/terryjreedy'
    closed_at = None
    created_at = <Date 2018-03-11.05:14:08.186>
    labels = ['3.8', 'expert-IDLE', 'type-feature', '3.7', '3.9']
    title = 'IDLE option to strip trailing whitespace automatically on save'
    updated_at = <Date 2019-11-20.06:16:52.281>
    user = 'https://github.com/rhettinger'

    bugs.python.org fields:

    activity = <Date 2019-11-20.06:16:52.281>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = False
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2018-03-11.05:14:08.186>
    creator = 'rhettinger'
    dependencies = ['38862']
    files = []
    hgrepos = []
    issue_num = 33046
    keywords = ['patch']
    message_count = 3.0
    messages = ['313580', '356793', '357032']
    nosy_count = 3.0
    nosy_names = ['rhettinger', 'terry.reedy', 'ZackerySpytz']
    pr_nums = ['17201']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue33046'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @rhettinger
    Copy link
    Contributor Author

    Add option to IDLE preferences in the general section to automatically run Strip Trailing Whitespace before saving.

    People who use Strip Trailing Whitespace generally do so just before saving and they do it over and over again as they develop and check in code. It would be nice to have this done automatically. In general, trailing whitespace is almost never desireable.

    @rhettinger rhettinger added the 3.8 only security fixes label Mar 11, 2018
    @rhettinger rhettinger added topic-IDLE type-feature A feature request or enhancement labels Mar 11, 2018
    @ZackerySpytz
    Copy link
    Mannequin

    ZackerySpytz mannequin commented Nov 17, 2019

    I have created a pull request to implement this feature. There was also some relevant discussion in bpo-23667.

    @terryjreedy
    Copy link
    Member

    I want to add EOF newline stripping before making this automatic. Otherwise, the new feature will give people a false sense that it is all taken care of. I opened bpo-38862 and hope to do it tomorrow.

    I may then merge Zackary's PR with any still edits of existing code, and make fixing the General tab and its Help page a new PR.

    I am thinking to make the per file option toggle, under Options, analogous to Add/Hide Linenumbers, be 'Fix/Leave Whitespace' + 'on Save' if it does not make box too wide.

    @terryjreedy terryjreedy added 3.7 (EOL) end of life 3.9 only security fixes labels Nov 20, 2019
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes topic-IDLE type-feature A feature request or enhancement
    Projects
    Status: In Progress
    Development

    No branches or pull requests

    2 participants