Skip to content

Instantly share code, notes, and snippets.

@piotr-yuxuan
Last active May 16, 2018 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piotr-yuxuan/6ea1ba250c6e8ecf68b10cf1bf8fd80a to your computer and use it in GitHub Desktop.
Save piotr-yuxuan/6ea1ba250c6e8ecf68b10cf1bf8fd80a to your computer and use it in GitHub Desktop.
I can't display a list of headlines which match some tag in org-mode πŸ˜•
#+TAGS: SOME(s) ONE(o) TWO(t)
#+STARTUP: hidestars

- 'M-x org-agenda'
- I type 'm' Match a TASKS/PROPS/TODO query
- I type 'SOME' and press enter
- No headings get displayed in the result buffer.

The result buffer contains:

#+BEGIN_QUOTE 
Headlines with TAGS match: SOME
Press β€˜C-u r’ to search again with new search string
#+END_QUOTE

My Emacs version is:

#+BEGIN_SRC QUOTE
$ emacs --version
GNU Emacs 26.0.50
#+END_SRC

My init.el is minimal:

#+NAME: init.el
#+BEGIN_SRC elisp
;;; init -- Configuration of my Emacs
;;; Commentary: Generated from init.org
;;; Code:

;; https://melpa.org/#/getting-started
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
                    (not (gnutls-available-p))))
       (proto (if no-ssl "http" "https")))
  ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
  (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
  ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
  (when (< emacs-major-version 24)
    ;; For important compatibility libraries like cl-lib
    (add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))
(package-initialize)

;; https://orgmode.org/elpa.html
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)

;; Here is which installed packages I have in Packages list.
;;  org                20180514      installed             Outline-based notes management and organizer
;;  org-plus-contrib   20180514      installed             Outline-based notes management and organizer

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(package-selected-packages (quote (org-plus-contrib))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

(provide 'init)
;;; init.el ends here
#+END_SRC

* First title
** First first sub-title                                               :SOME:
*** First first first sub-title
*** Second first first sub-title                                   :TWO:SOME:
*** Third first first sub-title                                    :SOME:ONE:
*** Fourth first first sub-title
** Second first subtitle
*** First second first sub-title
*** Second second first sub-title                                       :TWO:
*** TODO Third second first sub-title
*** Fourth second first sub-title
* Second title
** First second sub-title
*** First first second sub-title
*** Second second second sub-title                                      :TWO:
*** Third first second sub-title
*** Fourth first second sub-title
** Second second sub-title [50%]

- [X] e 

- [ ] e

* Third title
** First third sub-title                                               :SOME:
** Second third sub-title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment