Skip to content

trailing whitespace almost always added by company-capf of file names in ess-r-mode #1310

Description

@rdiaz02

In R code buffers (ess-r-mode), when completing filenames, almost always a trailing whitespace is added to the end of the filename, and this is undesirable. The backend being used is company-capf (see output from company-diag, below).

Interestingly, this same backend does not add the trailing whitespace on iESS buffers (note: I had to add company-capf to the backends in the iESS buffer, as it is not used by default, and without it, there is no filename completion).

I reported this in company's discussion (company-mode/company-mode#1511) and @dgutov found that by setting comint-completion-addsuffix to nil this could be avoided.

Thus

(add-hook 'ess-r-mode-hook (lambda()
				 (setq-local comint-completion-addsuffix nil)))

works. However, it would probably be a good idea to have this work out-of-the-box without requiring to modify a var via a hook?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions