emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: stardiviner <numbchild@gmail.com>
To: Nicholas Savage <nick@nicksavage.ca>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: org-cycle stops working on Org files with empty lines at end of buffer [9.4 (9.4-elpaplus @ /home/brentg/.emacs.d/elpa/org-plus-contrib-20200914/)]
Date: Wed, 23 Sep 2020 09:19:14 +0800	[thread overview]
Message-ID: <5f6aa2e2.1c69fb81.9bff7.9127@mx.google.com> (raw)
In-Reply-To: <50f165b2-bdaf-4861-aab5-122cfef7d67c@www.fastmail.com>


I can reproduce this problem too.

I'm on Emacs 28.0.50 with Org Mode master branch latest commit "aea1109ef".

I also did a bisect debug. Found the function ~org-cycle-show-empty-lines~ in hook
~org-cycle-hook~ caused this problem.

Nicholas Savage <nick@nicksavage.ca> writes:

> I can reproduce this. I'm on the most recent master with Emacs 28.0.50. Once the last line is deleted, org-cycle won't show the "**" line and the minibuffer continues to say "FOLDING" instead of cycling through the various states.
>
> On Sat, Sep 19, 2020, at 12:10, B Goodr wrote:
>> Hi,
>> 
>> Still loving Org mode!!  Keep up the good work.
>> 
>> Here is a bug, though:
>> 
>> Steps to reproduce:
>> 
>> Store the following into some .org file (in between the "cut-here" lines):
>> 
>> ---cut-here---cut-here---cut-here---cut-here---cut-here---cut-here---
>> * TODO aaa bbb ccc
>> 
>> ** TODO aaa bbb ccc
>> 
>> delete-this-line-to-see-the-problem
>> ---cut-here---cut-here---cut-here---cut-here---cut-here---cut-here---
>> 
>> Move point at first asterisk (beginning of buffer).
>> 
>> Type TAB key (bound to org-cycle) multiple times and notice it cycles
>> the headings through the various levels of exposure.
>> 
>> Now go to the end of the buffer, and delete the one line there
>> containing "delete-this-line-to-see-the-problem", but retain the two
>> empty lines at the end.
>> 
>> Repeat the above steps with the TAB key at the top of the buffer, and
>> notice it stops working.
>> 
>> On the mailing list, I see some recent changes that might or might not
>> have broken this. I've not upgraded Org mode in a while:
>> 
>> https://lists.gnu.org/archive/html/emacs-orgmode/2020-09/msg00520.html
>> 
>> Thanks!
>> -bgoodr
>> 
>> 
>> 
>> Emacs  : GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.14)
>>  of 2020-03-26, modified by Debian
>> Package: Org mode version 9.4 (9.4-elpaplus @ /home/brentg/.emacs.d/elpa/org-plus-contrib-20200914/)
>> 
>> current state:
>> ==============
>> (setq
>>  org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
>>  org-link-shell-confirm-function 'yes-or-no-p
>>  org-babel-after-execute-hook '(bg-org-babel-after-execute-hook)
>>  org-metadown-hook '(org-babel-pop-to-session-maybe)
>>  org-export-with-sub-superscripts nil
>>  org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
>>  org-refile-targets '((nil :maxlevel . 9) (org-agenda-files :maxlevel . 9))
>>  org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function
>>  org-odt-format-headline-function 'org-odt-format-headline-default-function
>>  org-agenda-files "/home/brentg/Plans/Home/org-agenda-files-list-file.txt"
>>  org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
>>  org-plantuml-jar-path "/home/brentg/plantuml/plantuml.jar"
>>  org-startup-folded nil
>>  org-id-link-to-org-use-id t
>>  org-mode-hook '(org-tempo-setup org-clock-load bg-org-mode-hook #[0 "\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2]
>> #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-all append local] 5]
>> #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes org-eldoc-load)
>>  org-clock-persist t
>>  org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
>>  org-archive-hook '(org-attach-archive-delete-maybe)
>>  org-confirm-elisp-link-function 'bg-org-confirm-elisp-link
>>  org-agenda-before-write-hook '(org-agenda-add-entry-text)
>>  org-metaup-hook '(org-babel-load-in-session-maybe)
>>  org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"]
>>  org-adapt-indentation nil
>>  org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
>>  org-babel-pre-tangle-hook '(save-buffer)
>>  org-file-apps '((auto-mode . emacs) (directory . emacs) ("\\.mm\\'" . default) ("\\.x?html?\\'" lambda (file link) (browse-url-of-file (expand-file-name file))) ("\\.pdf\\'" . default))
>>  org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
>>  org-babel-load-languages '((emacs-lisp . t) (python . t) (shell . t) (sqlite . t) (dot . t) (plantuml . t))
>>  org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"]
>>  org-agenda-loop-over-headlines-in-active-region nil
>>  org-src-lang-modes '(("arduino" . arduino) ("redis" . redis) ("php" . php) ("C" . c) ("C++" . c++) ("asymptote" . asy) ("bash" . sh) ("beamer" . latex) ("calc" . fundamental) ("cpp" . c++) ("ditaa" . artist)
>>      ("dot" . fundamental) ("elisp" . emacs-lisp) ("ocaml" . tuareg) ("screen" . shell-script) ("shell" . sh) ("sqlite" . sql))
>>  org-occur-hook '(org-first-headline-recenter)
>>  org-html-head-include-default-style nil
>>  org-html-htmlize-output-type 'css
>>  org-export-headline-levels 100
>>  org-edit-src-auto-save-idle-delay 5
>>  org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
>>  org-todo-keywords '((sequence "TODO(t)" "|" "DONE(d)" "SHELVED(s)" "DELEGATED(e)"))
>>  org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate)
>>  org-clock-persist-file "/home/brentg/Plans/Home/org-clock-save.el"
>>  org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
>>  org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el") ("elisp" . "el"))
>>  org-return-follows-link t
>>  org-refile-use-outline-path 'file
>>  org-clock-in-hook '(bg-org-clock-in-hook)
>>  org-export-before-parsing-hook '(org-attach-expand-links)
>>  org-id-locations-file "/home/brentg/Plans/Home/.org-id-locations"
>>  org-confirm-shell-link-function 'yes-or-no-p
>>  org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("id" :follow org-id-open) ("eww" :follow org-eww-open :store org-eww-store-link)
>>       ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link)
>>       ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export) ("info" :follow org-info-open :export org-info-export :store org-info-store-link)
>>       ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link)
>>       ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link)
>>       ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell)
>>       ("news" :follow #[514 "\301\300\302 Q \"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"])
>>       ("mailto" :follow #[514 "\301\300\302 Q \"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"])
>>       ("https" :follow #[514 "\301\300\302 Q \"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"])
>>       ("http" :follow #[514 "\301\300\302 Q \"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"])
>>       ("ftp" :follow #[514 "\301\300\302 Q \"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("help" :follow org-link--open-help) ("file" :complete org-link-complete-file)
>>       ("elisp" :follow org-link--open-elisp) ("doi" :follow org-link--open-doi))
>>  org-latex-format-headline-function 'org-latex-format-headline-default-function
>>  org-link-elisp-confirm-function 'bg-org-confirm-elisp-link
>>  org-clock-idle-time 10
>>  org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function
>>  org-tab-before-tab-emulation-hook '(org-tempo-complete-tag)
>>  org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
>>  org-html-format-headline-function 'org-html-format-headline-default-function
>>  org-confirm-babel-evaluate 'bg-org-confirm-babel-evaluate
>>  org-directory "/home/brentg/Plans/Home"
>>  org-publish-project-alist '(("my-emacs-lisp-org" :base-directory "~/emacs_lisp/" :publishing-directory "~/public_html/emacs_lisp" :recursive t :table-of-contents t :base-extension "org" :publishing-function
>>      org-html-publish-to-html :style-include-default nil :section-numbers t :with-sub-superscript nil :html-head "<link rel=\"stylesheet\" href=\"org.css\" type=\"text/css\" />"
>>      :author-info nil :creator-info nil)
>>     ("my-emacs-lisp-extra" :base-directory "~/emacs_lisp/" :publishing-directory "~/public_html/emacs_lisp" :base-extension "css\\|pdf\\|png\\|jpg\\|gif" :publishing-function
>>      org-publish-attachment :recursive t :author nil)
>>     ("my-emacs-lisp" :components ("my-emacs-lisp-org" "my-emacs-lisp-extra")))
>>  org-default-notes-file "/home/brentg/Plans/Home/notes.org"
>>  )


-- 
[ stardiviner ]
       I try to make every word tell the meaning that I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


  reply	other threads:[~2020-09-23  1:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-19 16:10 Bug: org-cycle stops working on Org files with empty lines at end of buffer [9.4 (9.4-elpaplus @ /home/brentg/.emacs.d/elpa/org-plus-contrib-20200914/)] B Goodr
2020-09-19 18:09 ` Nicholas Savage
2020-09-23  1:19   ` stardiviner [this message]
2020-09-23 12:19     ` Bastien
2020-09-23 14:07       ` stardiviner
2020-09-23 15:07         ` Ihor Radchenko
2020-10-18  7:20         ` stardiviner
2020-09-23 14:13       ` [PATCH] " Ihor Radchenko
2020-09-28  5:08         ` Kyle Meyer
2020-09-28  5:34           ` Ihor Radchenko
2020-10-03  7:34           ` stardiviner
2020-10-03  8:48             ` Bastien
2020-10-03 11:04               ` stardiviner
2020-10-27  4:11                 ` Kyle Meyer
2020-09-23 12:18   ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f6aa2e2.1c69fb81.9bff7.9127@mx.google.com \
    --to=numbchild@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nick@nicksavage.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).