From: Andrea Rossetti <andrea.rossetti@gmail.com> To: Bastien <bzg@gnu.org> Cc: emacs-orgmode@gnu.org, Carsten Dominik <carsten.dominik@gmail.com> Subject: Re: problems while editing in org-columns mode Date: Sat, 31 May 2014 16:35:51 +0200 [thread overview] Message-ID: <84wqd26mns.fsf@gmail.com> (raw) In-Reply-To: <87y4xjviqu.fsf@bzg.ath.cx> (Bastien's message of "Fri, 30 May 2014 09:16:41 +0200") [-- Attachment #1: Type: text/plain, Size: 1171 bytes --] Bastien <bzg@gnu.org> writes: > Let me know if it works for you, Hi! I tried a recent git snapshot (Fri May 30 19:28:04 2014 +0200) and performed some manual tests (1 to 5, see below). - in org-columns mode ("C-c C-x C-c"): - 1) PASS: org-columns-edit-value ("e") updates correctly the empty/whitespace string - in normal org-mode (i.e. not org-columns mode): - 2) PASS: org-set-property ("C-c C-x p") and org-set-property-and-value ("C-c C-x P") update correctly the empty/whitespace string - 3) FAIL: when using org-set-property or org-set-property-and-value interactively, tab autocompletion for the "Property: " prompt can't find the name of property X if the old value of X was an empty/whitespace string - 4) FAIL: org-delete-property ("M-x org-delete-property") commands skips/ignores a property name if the value is empty/whitespace string I think that commit 822dcfc881a5df3249fcecf4b7bc71ee9c321b92 addressed the tests 1) and 2) and they pass, so I'd say the commit is OK. The tests 3) and 4) pass if I use the following (naive, demonstrative-only, just-to-give-the-idea) patch: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: naive-patch-for-org-delete-property.diff --] [-- Type: text/x-patch, Size: 890 bytes --] diff --git a/lisp/org.el b/lisp/org.el index d645897..a772743 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -15530,7 +15530,7 @@ things up because then unnecessary parsing is avoided." (setq range (org-get-property-block beg end)) (when range (goto-char (car range)) - (while (re-search-forward org-property-re + (while (re-search-forward (org-re-property ".*?" 'literal t) (cdr range) t) (setq key (org-match-string-no-properties 2) value (org-trim (or (org-match-string-no-properties 3) ""))) @@ -15619,7 +15619,7 @@ If yes, return this value. If not, return the current value of the variable." (if (and range (goto-char (car range)) (re-search-forward - (org-re-property property) + (org-re-property property nil t) (cdr range) t)) (progn (delete-region (match-beginning 0) (1+ (point-at-eol))) [-- Attachment #3: Type: text/plain, Size: 549 bytes --] For curiosity I also tested a wrong-syntax input: - 5) if the user edits manually the :PROPERTIES: block and adds an empty-valued property (example: :prop1:) and he forgets to add at least one whitespace character after :prop1: then the tests 1)-2)-3)-4) fail I'd say: 5) is acceptable behaviour, but special care must be taken by users that hand-edit empty-valued properties, as it's easy to miss a whitespace while typing. > and thanks for reporting this, Thanks to you for your work on this one. Cheers, Andrea
next prev parent reply other threads:[~2014-05-31 14:36 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-11-22 19:30 andrea.rossetti 2013-11-26 12:19 ` Carsten Dominik 2014-04-24 13:12 ` Andrea Rossetti 2014-05-30 7:16 ` Bastien 2014-05-31 14:35 ` Andrea Rossetti [this message] 2014-06-02 17:38 ` 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=84wqd26mns.fsf@gmail.com \ --to=andrea.rossetti@gmail.com \ --cc=bzg@gnu.org \ --cc=carsten.dominik@gmail.com \ --cc=emacs-orgmode@gnu.org \ --subject='Re: problems while editing in org-columns mode' \ /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
Code repositories for project(s) associated with this 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).