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

Unwind with company-abort in counsel-company #1793

Merged
merged 1 commit into from Oct 30, 2018
Merged

Conversation

mnick
Copy link
Contributor

@mnick mnick commented Oct 28, 2018

Currently, the company tooltip popup appears after aborting counsel-company with C-g or ESC (see also #1650). This is a simple patch that fixes this by adding company-abort to the unwind of counsel-company.

@abo-abo abo-abo merged commit bd980d8 into abo-abo:master Oct 30, 2018
1 check passed
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Oct 30, 2018

Thanks.

tarsius
Copy link
Contributor

@tarsius tarsius commented on bd980d8 Nov 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mnick Could you please declare this function like the other company-* functions are already.

@abo-abo On the subject of the compiler complaining; there are a few instances of this warning:

Warning: ‘org-get-tags-string’ is an obsolete function (as
    of Org 9.2); use ‘org-make-tag-string’ instead.

You could use a function like this to address this:

(defun counsel--org-make-tag-string ()
  (if (fboundp #'org-make-tag-string) ; >= Org 9.2
      (org-make-tag-string (org-get-tags nil t))
    (with-no-warnings
      (org-get-tags-string))))

abo-abo
Copy link
Owner

@abo-abo abo-abo commented on bd980d8 Nov 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tarsius Thanks, please review d76968a.

tarsius
Copy link
Contributor

@tarsius tarsius commented on bd980d8 Nov 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is wrong:

-(split-string (org-get-tags-string) ":" t)
+(org-get-tags)

it should be

-(split-string (org-get-tags-string) ":" t)
+(org-get-tags nil t)

Otherwise you switch from returning the tags of this heading to returning those plus the ones that it inherits.

abo-abo
Copy link
Owner

@abo-abo abo-abo commented on bd980d8 Nov 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise you switch from returning the tags of this heading to returning those plus the ones that it inherits.

I have an Org version that's a bit outdated. Here's the definition that I have right now:

(defun org-get-tags ()
  "Get the list of tags specified in the current headline."
  (org-split-string (org-get-tags-string) ":"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants