Nicolas Goaziou writes:
AFAICT, it still doesn't work. I get the exact same result as
detailed above.
That’s odd, I can’t reproduce your example anymore. Is your Emacs
session still the same one as earlier today? While implementing
the patch I had to C-0 M-x org-refile occasionally, becau
BTW this reminds me of some issues I ran into on master a while
back. When a refile target has a headline containing a slash,
there are some issues:
1. When an existing headline contains a slash, completing-read
will display the target as »A\/Slash«. However, when entering the
string manually
Hello Nicolas,
Nicolas Goaziou writes:
I still cannot make it work property.
With the following document:
--8<---cut
here---start->8---
* Foo
** Bar
* Foo2
--8<---cut
here---end--->8---
Trying to refile "Foo2" under
* org.el (org--refile-new-path): Add.
(org-refile): Use it.
(org-refile-new-child): Support creating new root nodes.
* test-org.el (test-org/org-refile): Add test.
While ‘org-refile’ currently supports creating new headlines when
refiling, only one single headline can be created this way. For
con
* org.el (org--refile-new-path): Add.
(org-refile): Use it.
(org-refile-new-child): Support creating new root nodes.
* test-org.el (test-org/org-refile): Add test.
While ‘org-refile’ currently supports creating new headlines when
refiling, only one single headline can be created this way. For
con
Sebastian Reuße writes:
+ (if (and (string-match "\\`\\(.*\\)/\\([^/]+\\)\\'" answ)
I realize this is overly restrictive if you don’t have
‘org-refile-use-outline-path’ set to ‘file’ and want to refile
under a newly created root headline. AFAICT this would also have
Hello Nicolas,
Nicolas Goaziou writes:
Compiling your patch generates the following warnings.
org.el:11417:1:Warning: Unused lexical variable ‘parent’
org.el:11417:1:Warning: Unused lexical variable ‘child’
org.el:11417:1:Warning: Unused lexical variable
‘parent-target’
Goo
* org.el (org--refile-new-path): Add.
(org-refile): Use it.
(org-refile-new-child): Make new nodes more compact.
* test-org.el (test-org/org-refile): Add test.
While ‘org-refile’ currently supports creating new headlines when
refiling, only one single headline can be created this way. For
conveni
* org.el (org--refile-new-path): Add.
(org-refile): Use it.
(org-refile-new-child): Make new nodes more compact.
* test-org.el (test-org/org-refile): Add test.
While ‘org-refile’ currently supports creating new headlines when
refiling, only one single headline can be created this way. For
conveni
Heikki Lehvaslaiho writes:
> (string-collate-lessp "ß" "ssa" "de_DE.utf-8") ; nil
> (string-lessp "ß" "ssa") ; nil
This shows us that your Emacs installation does not support alphabetic
sorting at all, regardless of case, and instead only sorts
lexicographically (i.e., re
Heikki Lehvaslaiho writes:
> x86_64-apple-darwin14.5.0
Looking at the C source of ‘string-collate-lessp’ (src/fns.c), it looks
like there exists a case where Emacs itself will fall back on
‘string-lessp’ even when ‘string-collate-lessp’ is invoked.
#else /* !__STDC_ISO_10646__, !WINDOWSN
Hello Nicolas, hello Heikki,
> Heikki Lehvaslaiho writes:
>> I can not see any change in function with the new code. Alphabetical
>> sorting is fixedly case sensitive.
Is your Emacs≤24? Emacs (surprisingly) only gained a facility for
alphabetic (locale-sensitive) sorting with ver. 25. Before th
Hello Nicolas,
Nicolas Goaziou writes:
> Sebastian Reuße writes:
>> I was also wondering if it might make sense to tweak
>> ‘org-complex-heading-regexp’ so that the respective capture group
>> captures an empty string. This could be achieved by making the title
* test-org.el (test-org/sort-entries): Test with empty headings.
---
testing/lisp/test-org.el | 10 ++
1 file changed, 10 insertions(+)
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 33769aafa..8c98fce4d 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test
So, I’ve noticed that when sorting a subtree (alphabetically or numerically),
‘org-sort-entries’ will raise an error arising from the call to
‘org-sort-remove-invisible’ (lines 8761 and 8766 in bc7b24d0d).
I’m following up with a test. The error is triggered by the capture group in
‘org-complex-he
* org.el (org-sort-entries): Guard against empty headings when sorting
alphabetically, numerically.
Due to how ‘org-complex-heading-regexp’ is defined, the title capture group
currently returns nil in empty headings, which we don’t want to pass on to
‘org-sort-remove-invisible’.
---
lisp/org.el |
Sorry, I committed this one without using the compat-shimmed version of
‘string-collate-lessp’. Amended.
Kind regards,
SR
--
Insane cobra split the wood
Trader of the lowland breed
Call a jittney, drive away
In the slipstream we will stay
* org.el (org-string<): Add.
(org-op-to-function): Use it.
(org-string> etc.): Use collated comparison.
Cf. commit 551d2f1fe.
---
lisp/org.el | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index ac1ad3c75..24923ad4f 100644
--- a/lisp/org.el
* test-org-list.el (test-org-list/sort): Take case-sensitive
vs. insensitive sorting into account.
---
testing/lisp/test-org-list.el | 36 ++--
1 file changed, 26 insertions(+), 10 deletions(-)
diff --git a/testing/lisp/test-org-list.el b/testing/lisp/test-org-list
* test-org-table.el (test-org-table/sort-lines): Fix and improve
testcase.
Sorting and reversing «a C b» should result in «C b a», not in «b a
C». This test did not fail previously only because
org-table-sort-lines had an issue whereby sorts were always
case-sensitive.
---
testing/lisp/test-org-
* org-table.el (org-table-sort-lines): Fix case sensitive sorting,
improve docstring.
* test-org-table.el (test-org-table/sort-lines): Enforce C locale when
testing alphabetic sorting.
‘sort-subr’ ignores ‘sort-fold-case’ when a predicate is provided. To
correctly handle case-sensitivity, we now b
* org.el (org-string<): Add.
(org-op-to-function): Use it.
(org-string> etc.): Use collated comparison.
Cf. commit 551d2f1fe.
---
lisp/org.el | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index ac1ad3c75..edae502a8 100644
--- a/lisp/org.el
* org-compat.el (org-string-collate-lessp): When shimming
string-collate-lessp, accept the same arguments as in the unshimmed
case.
---
lisp/org-compat.el | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 975752224..a2
* org-table.el (org-table-sort-lines): Use collated sorting.
* org-list.el (org-sort-list): Use collated sorting.
Cf. commit 551d2f1fe.
---
etc/ORG-NEWS | 6 ++
lisp/org-list.el | 5 +++--
lisp/org-table.el | 2 +-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/etc/ORG-
Nicolas Goaziou writes:
> Sebastian Reuße writes:
>> The test will error out if the data for the chosen locale isn’t
>> actually present on the system. I chose the «en_US» locale in the
>> hopes that this will frequently be installed. I’ll leave it up to you
>>
* org.el (org-sort-entries): Use collated sorting.
(org-tags-sort-function): Use collated sorting.
(org-string-collate-greaterp): Add helper-function to use as defcustom
option, since there is no ‘string-collate-greaterp’ in Emacs.
* org-compat.el (org-string-collate-lessp): Add proxy to fall-back
Nicolas Goaziou writes:
> Sebastian Reuße writes:
>
>> I also considered adding a regression test for non-ASCII chars to
>> «test-org/sort-entries», but for stable results, one would have to
>> enforce some canonical locale. Unfortunately, it’s not possible to
>>
* org.el (org-sort-entries): Use collated sorting.
(org-tags-sort-function): Use collated sorting.
(org-string-collate-greaterp): Add helper-function to use as defcustom
option, since there is no ‘string-collate-greaterp’ in Emacs.
* org-compat.el (org-string-collate-lessp): Add proxy to fall-back
Hello Nicolas,
Nicolas Goaziou writes:
> However, Org 9.X still supports Emacs 24, so we cannot use
> `string-collate-lessp without degrading gracefully to `string-lessp'
> in these Emacsen.
> We could add `org-string-collate-lessp' to "org-compat.el", which
> would be an alias for `string-coll
* org.el (org-sort-entries): Use collated sorting.
(org-tags-sort-function): Use collated sorting.
(org-string-collate-greaterp): Add helper-function to use as defcustom
option, since there is no ‘string-collate-greaterp’ in Emacs.
‘org-sort-entries’ and ‘org-tags-sort-function’ advertise alphabet
* org.el (org-sort-entries): Use collated sorting.
(org-tags-sort-function): Use collated sorting.
(org-string-collate-greaterp): Add helper-function to use as defcustom
option, since there is no ‘string-collate-greaterp’ in Emacs.
‘org-sort-entries’ and ‘org-tags-sort-function’ advertise alphabet
Hello Allen,
Allen Li writes:
> On Mon, May 15, 2017 at 5:54 AM, Sebastian Reuße wrote:
>> * org.el (org-refile-get-targets): Setting org-refile-use-outline-path
>> to `file' or `buffer-name' causes an additional target for the file’s
>> root node to be inserted
Nicolas Goaziou writes:
> Sebastian Reuße writes:
>> It didn’t feel right copy-pasting the tests wholesale, so I made a
>> helper-macro. I checked the ert output by forcing a failure and the
>> failure explanation looks as expected. Does this work for you?
> H
* testing/lisp/test-org.el: Add test.
---
testing/examples/refile/a.org | 6
testing/examples/refile/b.org | 6
testing/lisp/test-org.el | 71 +++
3 files changed, 83 insertions(+)
create mode 100644 testing/examples/refile/a.org
create mo
Hello Nicolas,
Nicolas Goaziou writes:
> Nitpick: Sections in test-org.el are sorted alphabetically. So the new
> "Refile" section could go between "Radio Targets" and "Sparse trees".
Thank you, I hadn’t noticed.
> Would it be possible to split this big test into smaller ones, with
> a descrip
* testing/lisp/test-org.el: Add test.
---
testing/examples/refile/a.org | 6 ++
testing/examples/refile/b.org | 6 ++
testing/lisp/test-org.el | 44 +++
3 files changed, 56 insertions(+)
create mode 100644 testing/examples/refile/a.org
creat
* org.el (org-refile-get-targets): Setting org-refile-use-outline-path
to `file' or `buffer-name' causes an additional target for the file’s
root node to be inserted. This functionality was absent when using
`full-file-path'. We now add this since it is convenient and makes the
behavior more consis
---
etc/ORG-NEWS | 5 +
1 file changed, 5 insertions(+)
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index b16b73ae1..2c00f767a 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -219,6 +219,11 @@ This allow to use a different title than entry title.
Using ~C-c C-a u~ prompts for a URL pointing to
Kyle Meyer writes:
> Based on the Org contributor page [*], it doesn't look like you've
> signed papers with the FSF, so the commit message should label this as
> a "TINYCHANGE". (I think this and the next patch would be small enough
> to mark as tiny changes.)
I have a copyright assignment wit
Kyle Meyer writes:
> Org's master branch currently supports Emacs >= 24.3, but string-join
> was added in the 24.5 release.
> I'm fine with the append -> cons conversion, but avoiding it would
> make for a cleaner diff that's more focused on the main purpose of
> this patch.
Thank you, Kyle. I
* org.el (org-refile-get-targets): Add case to optionally prefix
refile targets with the buffer name.
(org-refile-use-outline-path): Add new option setting and document.
Having an option to use the buffer name as a prefix is convenient,
since this will work hand in hand with uniquify to only show
* org.el (org-refile-get-targets): Only escape slashes in headline
part of refile target; leave any file-system path component (when
enabled) unescaped.
The reason to escape slashes in refile targets is to make it clear
when a slash was part of a headline vs. part of the outline path. It
makes se
* org.el (org-refile-get-targets): Add case to optionally prefix
refile targets with the buffer name.
(org-refile-use-outline-path): Add new option setting and document.
Having an option to use the buffer name as a prefix is convenient,
since this will work hand in hand with uniquify to only show
* org.el (org-refile-get-targets): Only escape slashes in headline
part of refile target; leave any file-system path component (when
enabled) unescaped.
The reason to escape slashes in refile targets is to make it clear
when a slash was part of a headline vs. part of the outline path. It
makes se
* org.el (org-refile-get-targets): Add case to optionally prefix
refile targets with the buffer name.
(org-refile-use-outline-path): Add new option setting and document.
Having an option to use the buffer name as a prefix is convenient,
since this will work hand in hand with uniquify to only show
* org.el (org-refile-get-targets): Only escape slashes in headline
part of refile target; leave any file-system path component (when
enabled) unescaped.
The reason to escape slashes in refile targets is to make it clear
when a slash was part of a headline vs. part of the outline path. It
makes se
* org.el (org-refile-get-targets): Add case to optionally prefix
refile targets with the buffer name.
(org-refile-use-outline-path): Add new option setting and document.
Having an option to use the buffer name as a prefix is convenient,
since this will work hand in hand with uniquify to only show
Apologies for the resubmission; forgot to stage a hunk in one of the
commits.
Kind regards,
Sebastian Reuße
* org.el (org-refile-get-targets): only escape slashes in headline
part of refile target; leave any file-system path component (when
enabled) unescaped.
The reason to escape slashes in refile targets is to make it clear
when a slash was part of a headline vs. part of the outline path. It
makes se
* org.el (org-refile-get-targets): Add case to optionally prefix
refile targets with the buffer name.
(org-refile-use-outline-path): Document new option.
Having an option to use the buffer name as a prefix is convenient,
since this will work hand in hand with uniquify to only show those
parts of t
* org.el (org-refile-get-targets): only escape slashes in headline
part of refile target; leave any file-system path component (when
enabled) unescaped.
The reason to escape slashes in refile targets is to make it clear
when a slash was part of a headline vs. part of the outline path. It
makes se
51 matches
Mail list logo