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 kEK4LRRYu18oAwAA0tVLHw (envelope-from ) for ; Mon, 23 Nov 2020 06:35:00 +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 +KEFKRRYu18xegAAB5/wlQ (envelope-from ) for ; Mon, 23 Nov 2020 06:35:00 +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 51FAF940485 for ; Mon, 23 Nov 2020 06:34:59 +0000 (UTC) Received: from localhost ([::1]:56576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kh5RA-0000mw-Sk for larch@yhetil.org; Mon, 23 Nov 2020 01:34:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kh5QW-0000mo-3k for emacs-orgmode@gnu.org; Mon, 23 Nov 2020 01:34:16 -0500 Received: from gauss.matem.unam.mx ([132.248.17.1]:47654) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kh5QO-0006x3-SL for emacs-orgmode@gnu.org; Mon, 23 Nov 2020 01:34:15 -0500 Received: from penguin (unknown [187.207.176.230]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: omar) by gauss.matem.unam.mx (Postfix) with ESMTP id BA2985423B for ; Mon, 23 Nov 2020 00:34:00 -0600 (CST) From: =?utf-8?Q?Omar_Antol=C3=ADn_Camarena?= To: emacs-orgmode@gnu.org Subject: Bug: org-catch-invisible-edits doesn't actually catch most deletions [9.4 (9.4-41-g9bb930-elpaplus @ /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20201116/)] Date: Mon, 23 Nov 2020 00:33:56 -0600 Message-ID: <87lfesinu3.fsf@matem.unam.mx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=132.248.17.1; envelope-from=omar@matem.unam.mx; helo=gauss.matem.unam.mx X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu 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.01 X-TUID: tQ7dvlwEX05g Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------ Setting org-catch-invisible-edits to 'error does catch org-delete-backward-= char (bound to by default), but it doesn't catch backward-kill-= word (), or kill-word with argument -1 (M-- M-d), or backward-= kill-sexp (ESC ). Steps to reproduce: 1. Create an org file with the following 3 lines: * Stop, hammer time! You can't touch this * Break it down! 2. Run emacs -Q and visit the file. 3. M-: (setq org-catch-invisible-edits 'error) 4. Make sure the first headline is folded and place point after the ellipsi= s. 5. Now you can try any of the commands mentioned in the first paragraph. The org-catch-invisible-edits will successfully block you from using , but any of the other command I mentioned will silently delete the wo= rd "this". Because of the variable's name, I would expect all these command= s to be blocked. Maybe technically this isn't a bug, since the docstring for org-catch-invis= ible-edits only says: "Check if in invisible region before inserting or del= eting a character." So you can argue it only promises to block deletion if = you attempt it one character at a time, and if you try to delete a word, th= e docstring doesn't promise to stop you. I'd suggest that naming the variable org-catch-invisible-edits strongly sug= gests it should catch all deletions in the invisible text and that the curr= ent behavior is misleading. Emacs : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24= .5, cairo version 1.16.0) of 2020-10-13, unofficial emacs-snapshot build: http://emacs.ganneff.de/, = git commit 8d241e8840fdb02dcfce52425626dd8f2125e51a Package: Org mode version 9.4 (9.4-41-g9bb930-elpaplus @ /home/omarantolin/= .emacs.d/elpa/org-plus-contrib-20201116/) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (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-metadown-hook '(org-babel-pop-to-session-maybe) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-refile-targets '((nil :maxlevel . 2) ("~/Notes/Notes.org" :maxlevel . = 2) ("~/Notes/Someday.org" :level . 0) ("~/Notes/Daily.org" :level . 3)) org-pretty-entities t org-capture-bookmark nil org-latex-default-packages-alist '(("AUTO" "inputenc" t ("pdflatex")) ("" "graphicx" t) ("" "grffile" t) ("" "longtable" nil) ("" "wrapfig" nil) ("" "rotating" nil) ("normalem" "ulem" = t) ("" "amsmath" t) ("" "amssymb" t) ("" "capt-of" nil) ("" "hyperref" nil)) org-special-ctrl-a/e t org-agenda-files '("~/Notes/Refile.org" "~/Notes/Daily.org" "~/Notes/Alumnos.org" "~/Notes/Someday.org") org-mode-hook '(#[0 "\301\211%10\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 loc= al] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-a= ll append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes ediff-with-org-show-all turn-on-org-cdlatex beginend-org-m= ode org-eldoc-load) org-outline-path-complete-in-steps nil org-archive-hook '(org-attach-archive-delete-maybe) org-confirm-elisp-link-function 'yes-or-no-p 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%1\236A\207" [:title] 3 "\n= \n(fn ENTRY)"] org-babel-pre-tangle-hook '(save-buffer) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-hide-leading-stars t org-hide-emphasis-markers t org-highlight-latex-and-related '(latex script entities) org-ellipsis "=E2=80=A6" org-agenda-loop-over-headlines-in-active-region nil org-src-lang-modes '(("latex-macros" . latex) ("inline-js" . javascript) ("redis" . redis) ("php" . php) ("arduino" . arduino) ("C" . c) ("C++" . c++) ("asymptote" . asy) ("bash" . sh) ("beamer" . latex) ("calc" . fundamenta= l) ("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-agenda-mode-hook '(beginend-org-agenda-mode) org-structure-template-alist '(("a" . "export ascii") ("c" . "center") ("C" . "comment") ("e" . "example") ("E" . "export") ("h" . "export html") ("l" . "export latex") ("q" . "quote") ("s" . "src") ("v" . "verse") ("thm" . "theorem") ("pf" . "proof") ("lem" . "lemma") ("cor" . "corollary") ("def" . "definition") ("rem" . "remark") ("exer" . "exercise") ("prop" . "propositio= n") ("el" . "src emacs-lisp")) 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" "|" "DONE" "NOPE") (type "WAIT")) org-support-shift-select t org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-refile-allow-creating-parent-nodes 'confirm org-refile-use-outline-path 'file org-export-before-parsing-hook '(org-attach-expand-links) 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-lin= k) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-lin= k) ("irc" :follow org-irc-visit :store org-irc-store-li= nk :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) ("cite" :follow org-bibtex-goto-citation :export nil) ("org-title" :store store-org-title-link) ("file+sys= ") ("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow #[514 "\301\300\302%4Q%2\"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("mailto" :follow #[514 "\301\300\302%4Q%2\"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("https" :follow #[514 "\301\300\302%4Q%2\"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("http" :follow #[514 "\301\300\302%4Q%2\"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("ftp" :follow #[514 "\301\300\302%4Q%2\"\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-capture-templates '(("s" "Someday" entry (file "Someday.org") "* %?\n") ("d" "Daily" entry (file+olp+datetree "Daily.org") "* TODO %?\n") ("r" "Refile" entry (file "Refile.org") "* %?\n") ("j" "Journal entry" plain (file+olp+datetree "Journal.org")) ("e" "Emacs templates") ("ei" "Idea" entry (file+olp "Editors/Emacs.org" "Ideas") "* %?\n") ("et" "Tip" entry (file+olp "Editors/Emacs.org" "Tips") "* %?\n") ("eq" "Question" entry (file+olp "Editors/Emacs.org" "Questions") "* %?\= n") ("ep" "Package" entry (file+olp "Editors/Emacs.org" "Packages") "* %?\n= ") ) org-link-elisp-confirm-function 'yes-or-no-p outline-mode-hook '(beginend-outline-mode) org-latex-packages-alist '(("AUTO" "babel" t ("pdflatex"))) org-confirm-babel-evaluate nil org-directory "~/Notes" org-preview-latex-image-directory "~/.cache/ltximg/" )