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

org-set-tags only allows completing a single tag #3738

Closed
elubeck opened this issue Nov 9, 2015 · 7 comments
Closed

org-set-tags only allows completing a single tag #3738

elubeck opened this issue Nov 9, 2015 · 7 comments
Labels
- Forum - Enhancement ☺ Org stale marked as a stale issue/pr (usually by a bot)

Comments

@elubeck
Copy link

elubeck commented Nov 9, 2015

Hello,

Org-set-tags differs slightly from the expected behavior of being able to autocomplete multiple tags for a headline. After autocompleting a single tag the minibuffer exits. If multiple tags are in my history they can be completed, but novel combinations of multiple tags are not autocompleted.

Thanks

@tomjorquera
Copy link

Hi @elubeck ,

Sadly, this is a problem between org-mode and helm (see the discussion here).

A quick workaround is to disable helm completion for org-set-tags. It can be done by adding the following to your .spacemacs config:
(add-to-list 'helm-completing-read-handlers-alist '(org-set-tags)) (EDIT: wrong, see my next comment)
You will then have the "classic" completion for org tags, that works as expected.

Not sure if it would be relevant to add this to the org layer by default...

@tomjorquera
Copy link

tomjorquera commented Mar 18, 2016

I just noticed that directly adding (add-to-list 'helm-completing-read-handlers-alist '(org-set-tags)) to the spacemacs config does not actually work. Spacemacs complains on startup that the helm-completing-read-handlers-alist variable does not exists (not sure why as the helm loading is delayed).
EDIT: anyways, at this point the org-set-tags is not loaded (org-mode is lazily loaded), so it would have failed even in this case

Instead I added the following to my user config:

(add-hook 'org-mode-hook
            (lambda () (add-to-list 'helm-completing-read-handlers-alist '(org-set-tags))))

that correctly sets the variable when launching org-mode.


2020 EDIT: Note that org-set-tags has since been renamed to org-set-tags-command, so to fix the behavior the correct config is now

(add-hook 'org-mode-hook
            (lambda () (add-to-list 'helm-completing-read-handlers-alist '(org-set-tags-command))))

@olejorgenb
Copy link
Contributor

It doesn't seem to be possible to completely remove tags with the helm interface either. After testing the native function I'd vote to change the default to not use helm until the issues are fixed.

@edran
Copy link

edran commented Feb 11, 2019

I can still reproduce this behaviour in develop (95422ae).

As described in emacs-helm/helm#2063, it seems like the issue is on our side :(

@duianto
Copy link
Contributor

duianto commented Jun 15, 2020

It doesn't seem to be possible to completely remove tags with the helm interface either. After testing the native function I'd vote to change the default to not use helm until the issues are fixed.

When editing org tags (org-set-tags) with helm-mode enabled.

The tags can be removed by pressing C-RET or M-RET which calls helm-cr-empty-string.

The keys are visible on the mode line, when not using Spacemacs or any mode line packages

emacs_2020-06-15_16-29-04

In Spacemacs

The keys are not visible with the mode line themes:

emacs_2020-06-15_16-22-24

emacs_2020-06-15_16-01-24

But the keys are visible with the vanilla mode line theme:

emacs_2020-06-15_16-03-44

@iliakur
Copy link
Contributor

iliakur commented Nov 21, 2021

Thanks @duianto this resolved a long-standing inconvenience for me. Is there a way to include this keybinding in the spacemacs mode-line? I'd be willing to submit the relevant patch with a little guidance

Copy link

github-actions bot commented May 1, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Forum - Enhancement ☺ Org stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

7 participants