From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8LqoOGk9W18cLQAA0tVLHw (envelope-from ) for ; Fri, 11 Sep 2020 09:03:37 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CFHdMmk9W195SQAAB5/wlQ (envelope-from ) for ; Fri, 11 Sep 2020 09:03:37 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 56E609403D2 for ; Fri, 11 Sep 2020 09:03:37 +0000 (UTC) Received: from localhost ([::1]:47538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGexz-0002F5-Ql for larch@yhetil.org; Fri, 11 Sep 2020 05:03:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39794) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGexa-0002Cr-4f for emacs-orgmode@gnu.org; Fri, 11 Sep 2020 05:03:10 -0400 Received: from static.214.254.202.116.clients.your-server.de ([116.202.254.214]:57960 helo=ciao.gmane.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGexY-0005Z0-4y for emacs-orgmode@gnu.org; Fri, 11 Sep 2020 05:03:09 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1kGexW-000ADZ-4o for emacs-orgmode@gnu.org; Fri, 11 Sep 2020 11:03:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Sharon Kimble Subject: Re: setting up 'imenu' Date: Fri, 11 Sep 2020 10:02:25 +0100 Message-ID: <87wo104rfi.fsf@skimble.plus.com> References: <87v9gmdixl.fsf@skimble.plus.com> <87o8mdsuwg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.50 (gnu/linux) Cancel-Lock: sha1:jVU3d4s37E0vcQMqIGDDuMUus60= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/11 04:59:52 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 1.99 X-TUID: pHOyPKJRPgFw =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Jeremie Juste writes: > Hello Sharon, Hi Jeremie. =20=20 > Unfortunately I cannot reproduce your issue. I created a list of 56 sub h= eading and I > can view the heading Still a sample 0 until Still a sample 56. > > > ** TODO * etc and onwards > ** TODO * and another one > ** Still a sample 0 > ** Still a sample 1 > ** Still a sample 2 > ** Still a sample 3 > ** Still a sample 4 > > It might be because I am using [1] this modification from emacswiki > https://www.emacswiki.org/emacs/ImenuMode. This is my imenu setup from my config file - =2D --8<---------------clip one---------------start------------->8--- ** Imenu #+BEGIN_SRC emacs-lisp (require 'imenu+) (global-set-key (kbd "C-x 2") 'imenu-add-to-menubar) #+END_SRC [2020-09-10 Thu 18:29] Make sure auto automatically rescan for imenu changes #+BEGIN_SRC emacs-lisp (set-default 'imenu-auto-rescan t) #+END_SRC [2015-12-19 Sat 04:55] [2017-01-16 Mon 23:39] #+BEGIN_SRC emacs-lisp ;; Jump to a definition in the current file. (This is awesome.) ;; (global-set-key (kbd "M-i") 'prelude-ido-goto-symbol) ;; (require 'imenu) ;; (set-default 'imenu-auto-rescan t) ;; (defun prelude-ido-goto-symbol (&optional symbol-list) ;; "Refresh imenu and jump to a place in the buffer using Ido." ;; (interactive) ;; (unless (featurep 'imenu) ;; (require 'imenu nil t)) ;; (cond ;; ((not symbol-list) ;; (let ((ido-mode ido-mode) ;; (ido-enable-flex-matching ;; (if (boundp 'ido-enable-flex-matching) ;; ido-enable-flex-matching t)) ;; name-and-pos symbol-names position) ;; (unless ido-mode ;; (ido-mode 1) ;; (setq ido-enable-flex-matching t)) ;; (while (progn ;; (imenu--cleanup) ;; (setq imenu--index-alist nil) ;; (prelude-ido-goto-symbol (imenu--make-index-alist)) ;; (setq selected-symbol ;; (ido-completing-read "Symbol " symbol-names)) ;; (string=3D (car imenu--rescan-item) selected-symbol))) ;; (unless (and (boundp 'mark-active) mark-active) ;; (push-mark nil t nil)) ;; (setq position (cdr (assoc selected-symbol name-and-pos))) ;; (cond ;; ((overlayp position) ;; (goto-char (overlay-start position))) ;; (t ;; (goto-char position))))) ;; ((listp symbol-list) ;; (dolist (symbol symbol-list) ;; (let (name position) ;; (cond ;; ((and (listp symbol) (imenu--subalist-p symbol)) ;; (prelude-ido-goto-symbol symbol)) ;; ((listp symbol) ;; (setq name (car symbol)) ;; (setq position (cdr symbol))) ;; ((stringp symbol) ;; (setq name symbol) ;; (setq position ;; (get-text-property 1 'org-imenu-marker symbol)))) ;; (unless (or (null position) (null name) ;; (string=3D (car imenu--rescan-item) name)) ;; (add-to-list 'symbol-names name) ;; (add-to-list 'name-and-pos (cons name position)))))))) #+END_SRC [2014-11-16 Sun 16:09] [2017-01-16 Mon 23:49] [2020-09-10 Thu 18:35] #+begin_src emacs-lisp (require 'popup-imenu) #+end_src [2015-12-29 Tue 13:37] [2017-01-17 Tue 10:39] **** imenu #+BEGIN_SRC emacs-lisp ;; setting up 'imenu' ;; (local-set-key "\C-x\C-a" 'show-all) (add-hook 'org-mode-hook (lambda () (imenu-add-to-menubar "Imenu"))) (setq org-imenu-depth 6) (add-hook 'rst-mode-hook (lambda () (imenu-add-to-menubar "Imenu"))) (setq adoc-imenu-depth 6) (add-hook 'markdown-mode-hook (lambda () (imenu-add-to-menubar "Imenu"))) (setq adoc-imenu-depth 6) (add-hook 'LaTeX-mode-hook (lambda () (imenu-add-to-menubar "Imenu"))) (setq latex-imenu-depth 6) #+END_SRC [2015-04-08 Wed 23:54] [2017-01-17 Tue 11:04] **** FIXIT imenu-anywhere #+BEGIN_SRC emacs-lisp (require 'imenu-anywhere) (global-set-key (kbd "C-+") 'imenu-anywhere) #+END_SRC [2014-11-14 Fri 11:15] [2015-05-23 Sat 02:34] [2017-01-17 Tue 11:05] fails with - helm-build-sync-source is void [2020-09-10 Thu 18:37] **** dired-imenu #+begin_src emacs-lisp ;;(require 'dired-imenu) #+end_src [2015-05-04 Mon 13:54] [2017-01-17 Tue 13:24] [2020-09-10 Thu 18:38] **** FIXIT imenu-list #+BEGIN_SRC emacs-lisp (require 'imenu-list) (global-set-key (kbd "M-g 1") #'imenu-list-smart-toggle) (setq imenu-list-focus-after-activation t) (setq imenu-list-auto-resize t) #+END_SRC [2017-08-10 Thu 12:07] https://github.com/bmag/imenu-list #+BEGIN_SRC emacs-lisp (defun ido-goto-symbol (&optional symbol-list) "Refresh imenu and jump to a place in the buffer using Ido." (interactive) (unless (featurep 'imenu) (require 'imenu nil t)) (cond ((not symbol-list) (let ((ido-mode ido-mode) (ido-enable-flex-matching (if (boundp 'ido-enable-flex-matching) ido-enable-flex-matching t)) name-and-pos symbol-names position) (unless ido-mode (ido-mode 1) (setq ido-enable-flex-matching t)) (while (progn (imenu--cleanup) (setq imenu--index-alist nil) (ido-goto-symbol (imenu--make-index-alist)) (setq selected-symbol (ido-completing-read "Symbol? " symbol-names)) (string=3D (car imenu--rescan-item) selected-symbol))) (unless (and (boundp 'mark-active) mark-active) (push-mark nil t nil)) (setq position (cdr (assoc selected-symbol name-and-pos))) (cond ((overlayp position) (goto-char (overlay-start position))) (t (goto-char position))))) ((listp symbol-list) (dolist (symbol symbol-list) (let (name position) (cond ((and (listp symbol) (imenu--subalist-p symbol)) (ido-goto-symbol symbol)) ((listp symbol) (setq name (car symbol)) (setq position (cdr symbol))) ((stringp symbol) (setq name symbol) (setq position (get-text-property 1 'org-imenu-marker symbol)))) (unless (or (null position) (null name) (string=3D (car imenu--rescan-item) name)) (add-to-list 'symbol-names name) (add-to-list 'name-and-pos (cons name position)))))))) (global-set-key (kbd "C-c i") 'ido-goto-symbol) ; or any key you see fit #+END_SRC https://www.emacswiki.org/emacs/ImenuMode [2020-09-10 Thu 18:27] =2D --8<---------------cut here---------------end--------------->8--- And this is whats showing for imenu in my 'custom.el' - =2D --8<---------------custom.el---------------start------------->8--- '(imenu-auto-rescan t) '(imenu-auto-rescan-maxout 600000000) '(imenu-list-auto-resize t) '(imenu-list-focus-after-activation t) '(imenu-list-position 'left) '(imenu-list-size 35) '(imenu-max-item-length nil) '(imenu-max-items 15) '(imenu-sort-function 'imenu--sort-by-name) =2D --8<---------------cut here---------------end--------------->8--- And with that setup my imenu is still failing, but I can't work out why or where its wrong! And I've discovered that the 'level 2 headings' extend to the bottom of the screen and to the screen top as well, minus the status bar! But its just not folding, which is what I'm trying to achieve. =20=20 > > I another workflow comes to my mind when reading yours. > Instead of using "TODO * ..." I would use the TODO keywords and tell org-= mode to > list all the todos. The reason why I use 'TODO * foo ...' is because when I look at the relevant section in the imenu the articles that have a TODO item outstanding show up with a '* ' before the heading proper. When the article is written and exported into latex and then a pdf, I remove the TODO item and its relevant '* '. > > For instance with the command M-x org-show-todo-tree. > > A another way of working might be the following. > > --- file - writings.org > > #+TODO: TODO(t) TOWRITE(w) | DONE(d) > > * TOWRITE This is article 1 > * TOWRITE This is article 2 > * DONE This is article 2 > > #+begin_src elisp > (org-agenda-file-to-front) > #+end_src > > --- EOF > > Add the file to the agenda ( by default C-[ ), or execute the lisp chunk > in the file writings.org. Then you can M-x org-todo-list. To view all > your todo|towrite|done articles. Sorry, but I just feel that your system is over-complicated as compared to my simplistic way! =20=20 > > Hope this help, > Jeremie > Thanks Sharon. =2D --=20 Debian 10.5, fluxbox 1.3.7, emacs 27.1.50, org 9.3.7 =2D----BEGIN PGP SIGNATURE----- iQJPBAEBCgA5FiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAl9bPTAbHGJvdWRpY2Nh c0Bza2ltYmxlLnBsdXMuY29tAAoJEDaBgBkK+INb3JMP/18+Q5wwR4GWuikT5b9G FXstCkQSEIGGJX6vwoEbhcc0uJIy+41FnLDzDp3Tu4TsJaHE4DkROmEbokFwtfYo Fe+BfaVIfvE69RCmBZoVodEIj9CTxL9yq/9Y+foUYCHb8clWSj+Po9bGc1Bszgfm 36z4XUya3RigGo0IZs10na6wY2Mi+JpKXv3HR1aakZVvR1AjTfEdj1d3fmRsgwTs tpPDOCDzWRwsCNjS9ujUt5EhftRaxGy43pV2aUtWZaN3UHJi4iov4GbjSui8hITQ E7NoZSiDlIq46xoC+69Yi4wK9OVdX9CSN45oqB23ARXdW4jqsYou5ksNbh2I7RFt 5YlMgEYiFSbjo5tL8GARU2oryZt/hbw3yq6fBpwdncJDwXJLDdP9z/hzHWnu+2JO 2b6ATFlfmFccJdPKvTUlpAHFHV0xAJOGWIGuXQ7lZS8MW7BEodoBNdQxiBRledXL ejhL6MWV3xqs5vweRCgRGLFoO9B9NwCWWdeesjHqghw+0byxtheWp0hQfyShH5za /8myqtVu+n3E3Ip5qrtvfhvxBBPVOkXQZjRzeQ9c2i1bzW+FbpyMCRS6E86jHr1b Ros5Z1hcuNfrL+1NXpqWmPcnJUIhbPaoazvBgLDBa5BCIfuPPWHbFIh2LyB0xlk5 vkyAr1kYTOcnlLuxBIRGg3zN =3DREaL =2D----END PGP SIGNATURE-----