* how to export checkboxes to odt?
@ 2021-09-28 16:46 Uwe Brauer
2021-09-28 20:21 ` [SOLVED] (was: how to export checkboxes to odt?) Uwe Brauer
2021-09-28 20:47 ` how to export checkboxes to odt? Juan Manuel Macías
0 siblings, 2 replies; 44+ messages in thread
From: Uwe Brauer @ 2021-09-28 16:46 UTC (permalink / raw)
To: emacs-orgmode
Hi
Any idea how to export checkboxes to odt?
I mean not just simply having [ ] in the odt document but having them translated as actual boxes.
Thanks and regards
Uwe Brauer
^ permalink raw reply [flat|nested] 44+ messages in thread
* [SOLVED] (was: how to export checkboxes to odt?)
2021-09-28 16:46 how to export checkboxes to odt? Uwe Brauer
@ 2021-09-28 20:21 ` Uwe Brauer
2021-09-29 4:07 ` Timothy
2021-09-28 20:47 ` how to export checkboxes to odt? Juan Manuel Macías
1 sibling, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2021-09-28 20:21 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 260 bytes --]
>>> "UB" == Uwe Brauer <oub@mat.ucm.es> writes:
> Hi
> Any idea how to export checkboxes to odt?
> I mean not just simply having [ ] in the odt document but having them translated as actual boxes.
Either using latex $\boxtimes$
or UTF8 ☒
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED] (was: how to export checkboxes to odt?)
2021-09-28 20:21 ` [SOLVED] (was: how to export checkboxes to odt?) Uwe Brauer
@ 2021-09-29 4:07 ` Timothy
2021-09-29 6:30 ` [SOLVED] Uwe Brauer
2021-09-29 11:02 ` [SOLVED] (was: how to export checkboxes to odt?) Max Nikulin
0 siblings, 2 replies; 44+ messages in thread
From: Timothy @ 2021-09-29 4:07 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 288 bytes --]
Hello,
>> Any idea how to export checkboxes to odt?
>> I mean not just simply having [ ] in the odt document but having them translated as actual boxes.
>
> Either using latex ⊠
> or UTF8 ☒
I’m wondering, would this be worth adding to ox-odt?
All the best,
Timothy
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2021-09-29 4:07 ` Timothy
@ 2021-09-29 6:30 ` Uwe Brauer
2021-09-29 11:02 ` [SOLVED] (was: how to export checkboxes to odt?) Max Nikulin
1 sibling, 0 replies; 44+ messages in thread
From: Uwe Brauer @ 2021-09-29 6:30 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 447 bytes --]
>>> "T" == Timothy <tecosaur@gmail.com> writes:
> Hello,
>>> Any idea how to export checkboxes to odt?
>>> I mean not just simply having [ ] in the odt document but having them translated as actual boxes.
>>
>> Either using latex ⊠
>> or UTF8 ☒
> I’m wondering, would this be worth adding to ox-odt?
I think Juan's solution would be nice, however it does not work for me write now, so I have to see what is wrong with it.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED] (was: how to export checkboxes to odt?)
2021-09-29 4:07 ` Timothy
2021-09-29 6:30 ` [SOLVED] Uwe Brauer
@ 2021-09-29 11:02 ` Max Nikulin
2021-09-30 15:39 ` [checkbox in tables] (was: [SOLVED]) Uwe Brauer
1 sibling, 1 reply; 44+ messages in thread
From: Max Nikulin @ 2021-09-29 11:02 UTC (permalink / raw)
To: emacs-orgmode
On 29/09/2021 11:07, Timothy wrote:
>
>>> Any idea how to export checkboxes to odt?
>>> I mean not just simply having [ ] in the odt document but having them translated as actual boxes.
>>
>> Either using latex ⊠
>> or UTF8 ☒
>
> I’m wondering, would this be worth adding to ox-odt?
LibreOffice has some object called "checkbox" that could be inserted
using "Form Controls" toolbar. I have never used this feature, so unsure
whether it is a proper representation for Org checkboxes.
^ permalink raw reply [flat|nested] 44+ messages in thread
* [checkbox in tables] (was: [SOLVED])
2021-09-29 11:02 ` [SOLVED] (was: how to export checkboxes to odt?) Max Nikulin
@ 2021-09-30 15:39 ` Uwe Brauer
0 siblings, 0 replies; 44+ messages in thread
From: Uwe Brauer @ 2021-09-30 15:39 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 748 bytes --]
>>> "MN" == Max Nikulin <manikulin@gmail.com> writes:
> On 29/09/2021 11:07, Timothy wrote:
>>
>>> Any idea how to export checkboxes to odt?
>>> I mean not just simply having [ ] in the odt document but having them translated as actual boxes.
>>>
>>> Either using latex ⊠
>>> or UTF8 ☒
>> I’m wondering, would this be worth adding to ox-odt?
> LibreOffice has some object called "checkbox" that could be inserted
> using "Form Controls" toolbar. I have never used this feature, so
> unsure whether it is a proper representation for Org checkboxes.
I should add, that I need to generate an odt document, in which checkboxes are placed in tables, a feature that is not supported by org mode as of today, unfortunately.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: how to export checkboxes to odt?
2021-09-28 16:46 how to export checkboxes to odt? Uwe Brauer
2021-09-28 20:21 ` [SOLVED] (was: how to export checkboxes to odt?) Uwe Brauer
@ 2021-09-28 20:47 ` Juan Manuel Macías
2021-09-29 6:29 ` Uwe Brauer
1 sibling, 1 reply; 44+ messages in thread
From: Juan Manuel Macías @ 2021-09-28 20:47 UTC (permalink / raw)
To: Uwe Brauer; +Cc: orgmode
Hi Uwe,
Uwe Brauer writes:
> Any idea how to export checkboxes to odt?
>
> I mean not just simply having [ ] in the odt document but having them translated as actual boxes.
You can try:
(defun my/org-odt--checkbox (item)
"Return check-box string associated to ITEM."
(let ((checkbox (org-element-property :checkbox item)))
(if (not checkbox) ""
(format "<text:span text:style-name=\"%s\">%s</text:span>"
"OrgCode" (cl-case checkbox
(on "\u2611 ") ; CHECK MARK
(off "\u2610 ")
(trans "[-] ")))))) ;; I don't know which character to choose here...
(advice-add 'org-odt--checkbox :override #'my/org-odt--checkbox)
Best regards,
Juan Manuel
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: how to export checkboxes to odt?
2021-09-28 20:47 ` how to export checkboxes to odt? Juan Manuel Macías
@ 2021-09-29 6:29 ` Uwe Brauer
2021-09-29 7:02 ` [misunderstanding] (was: how to export checkboxes to odt?) Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2021-09-29 6:29 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1383 bytes --]
>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:
Hi Juan,
> Hi Uwe,
> Uwe Brauer writes:
>> Any idea how to export checkboxes to odt?
>>
>> I mean not just simply having [ ] in the odt document but having them translated as actual boxes.
> You can try:
> (defun my/org-odt--checkbox (item)
> "Return check-box string associated to ITEM."
> (let ((checkbox (org-element-property :checkbox item)))
> (if (not checkbox) ""
> (format "<text:span text:style-name=\"%s\">%s</text:span>"
> "OrgCode" (cl-case checkbox
> (on "\u2611 ") ; CHECK MARK
> (off "\u2610 ")
> (trans "[-] ")))))) ;; I don't know which character to choose here...
> (advice-add 'org-odt--checkbox :override #'my/org-odt--checkbox)
Thanks very much, I saw it too late to respond yesterday. A couple of remarks
1. (on "\u2611 ") ; CHECK MARK: I rather prefer 2612 but this is a
question of taste
2. It seems not to work, I loaded the function and Executed the
advice, but
When I tried to export this minimal example
* Check the conversion of checkboxes
1. Latex $\boxtimes$
2. UTF8 ☒, ▢ □
3. Org [ ] and [X]
4. Org [] [-]
I obtained a odt file in which 3 and 4 were *not* converted to UTF8. I
attach the file. What do I miss?
Regards
Uwe
[-- Attachment #1.2: checkbox.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 12057 bytes --]
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* count all spelling typos in a given buffer.
@ 2023-11-29 13:36 Uwe Brauer
2023-11-29 20:54 ` Emanuel Berg
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2023-11-29 13:36 UTC (permalink / raw)
To: emacs-devel
Hi
I asked this already on the emacs help list, but maybe somebody here,
knows about the following feature, namely:
Count all the typos, ispell (flyspell) finds in given buffer.
I see two possibilities to make this work
1. run flyspell-region or flyspell-buffer and simply (?) Count the
highlighted expressions.
2. run a complete ispell session, accept some changes, reject
others, add new words (mostly names ispell does not know about)
to your private dictionary. Once that is finished, the number of
corrections+entry in the personal dictionary are counted and
displayed.
Anybody knows about something like this, or is somebody working on it?
Might be very useful for teachers or lectures for correcting submitted works.
Regards
Uwe Brauer
--
I strongly condemn Hamas heinous atrocities on Israel, especially the despicable pogroms.
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military.
I support the EU and NATO membership of Ukraine.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: count all spelling typos in a given buffer.
2023-11-29 13:36 count all spelling typos in a given buffer Uwe Brauer
@ 2023-11-29 20:54 ` Emanuel Berg
2023-11-30 9:49 ` [SOLVED] (was: count all spelling typos in a given buffer.) Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Emanuel Berg @ 2023-11-29 20:54 UTC (permalink / raw)
To: emacs-devel
Uwe Brauer wrote:
> I asked this already on the emacs help list, but maybe
> somebody here, knows about the following feature, namely:
> Count all the typos, ispell (flyspell) finds in
> given buffer.
I posted this solution on gnu.emacs.help several days ago but
it hasn't appeared, anyway here you go.
;;; -*- lexical-binding: t -*-
;;
;; this file:
;; https://dataswamp.org/~incal/emacs-init/spell.el
(require 'cl-lib)
(defun ispell-count (&optional beg end)
(interactive
(if (use-region-p)
(list (region-beginning) (region-end)) ))
(or beg (setq beg (point-min)))
(or end (setq end (point-max)))
(save-mark-and-excursion
(goto-char beg)
(forward-word)
(backward-word)
(cl-loop
with words = 0
with errors = 0
while (< (point) end)
do (let ((word (thing-at-point 'word t)))
(unless (ispell-lookup-words word)
(cl-incf errors) )
(cl-incf words)
(forward-to-word) )
finally (message "%s words checked, %s errors" words errors) )))
;; this is a region wiht two
;; worsd spelled incorrectly
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 44+ messages in thread
* [SOLVED] (was: count all spelling typos in a given buffer.)
2023-11-29 20:54 ` Emanuel Berg
@ 2023-11-30 9:49 ` Uwe Brauer
2023-12-01 5:59 ` Emanuel Berg
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2023-11-30 9:49 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 775 bytes --]
>>> "EB" == Emanuel Berg <incal@dataswamp.org> writes:
> Uwe Brauer wrote:
>> I asked this already on the emacs help list, but maybe
>> somebody here, knows about the following feature, namely:
>> Count all the typos, ispell (flyspell) finds in
>> given buffer.
> I posted this solution on gnu.emacs.help several days ago but
> it hasn't appeared, anyway here you go.
> ;; this is a region wiht two
> ;; worsd spelled incorrectly
Thanks with the latest misc.el from master, it works, great
--
I strongly condemn Hamas heinous atrocities on Israel, especially the despicable pogroms.
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military.
I support the EU and NATO membership of Ukraine.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED] (was: count all spelling typos in a given buffer.)
2023-11-30 9:49 ` [SOLVED] (was: count all spelling typos in a given buffer.) Uwe Brauer
@ 2023-12-01 5:59 ` Emanuel Berg
2023-12-01 6:56 ` [SOLVED] Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Emanuel Berg @ 2023-12-01 5:59 UTC (permalink / raw)
To: emacs-devel
Uwe Brauer wrote:
>>> I asked this already on the emacs help list, but maybe
>>> somebody here, knows about the following feature, namely:
>>> Count all the typos, ispell (flyspell) finds in
>>> given buffer.
>>
>> I posted this solution on gnu.emacs.help several days ago
>> but it hasn't appeared, anyway here you go.
>
>> ;; this is a region wiht two
>> ;; worsd spelled incorrectly
>
> Thanks with the latest misc.el from master, it works, great
Right, I know what caused that, I had my own misc.el not
knowing there was such a file in Emacs already. Glad you got
it to work anyway and I renamed that file, so it improved my
Elisp as well, sweet.
If one is interested in "spell stats" one could do a more
integrated solution so it would report after each normal spell
run with ispell.
But I don't know how much that would be used, really, so maybe
that little Elisp is enough to just test and play with once in
a while. Or why did you want this to begin with? I guess there
are more people like me who just love to count things.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2023-12-01 5:59 ` Emanuel Berg
@ 2023-12-01 6:56 ` Uwe Brauer
0 siblings, 0 replies; 44+ messages in thread
From: Uwe Brauer @ 2023-12-01 6:56 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1755 bytes --]
>>> "EB" == Emanuel Berg <incal@dataswamp.org> writes:
> Uwe Brauer wrote:
>>> I asked this already on the emacs help list, but maybe
>>> somebody here, knows about the following feature, namely:
>>> Count all the typos, ispell (flyspell) finds in
>>> given buffer.
>>>
>>> I posted this solution on gnu.emacs.help several days ago
>>> but it hasn't appeared, anyway here you go.
>>
>>> ;; this is a region wiht two
>>> ;; worsd spelled incorrectly
>>
>> Thanks with the latest misc.el from master, it works, great
> Right, I know what caused that, I had my own misc.el not
> knowing there was such a file in Emacs already. Glad you got
> it to work anyway and I renamed that file, so it improved my
> Elisp as well, sweet.
> If one is interested in "spell stats" one could do a more
> integrated solution so it would report after each normal spell
> run with ispell.
I think right now the best strategy is:
1. first run ispell/aspell to check for names and expression he does
not know and which should be inserted in your personal dictionary.
2. Only then use the counting function.
> But I don't know how much that would be used, really, so maybe
> that little Elisp is enough to just test and play with once in
> a while. Or why did you want this to begin with? I guess there
> are more people like me who just love to count things.
I think I will ask also in the org mailing list, maybe someone there is
interested.
--
I strongly condemn Hamas heinous atrocities on Israel, especially the despicable pogroms.
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military.
I support the EU and NATO membership of Ukraine.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* add-log-time-format with time?
@ 2022-10-02 20:18 Uwe Brauer
2022-10-03 6:49 ` [SOLVED] (was: add-log-time-format with time?) Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2022-10-02 20:18 UTC (permalink / raw)
To: help-gnu-emacs
Hi
According to
(defcustom add-log-time-format 'add-log-iso8601-time-string
"*Function that defines the time format.
For example, `add-log-iso8601-time-string', which gives the
date in international ISO 8601 format,
and `current-time-string' are two valid values."
:type '(radio (const :tag "International ISO 8601 format"
add-log-iso8601-time-string)
(const :tag "Old format, as returned by `current-time-string'"
current-time-string)
(function :tag "Other"))
:group 'change-log)
The possible entries in a ChangeLog are
,----
|
| Sun Oct 2 21:56:09 2022 Uwe Brauer <oub@mat.ucm.es>
|
| * new.org (Third section): 4
`----
Or
,----
| 2022-10-02 Uwe Brauer <oub@mat.ucm.es>
|
| * first.org (this is new file): 4 a new file
`----
How could I achieve
,----
| 2022-10-02 21:56:09 Uwe Brauer <oub@mat.ucm.es>
|
| * first.org (this is new file): 4 a new file
`----
I tried
(defun my-changelog-date-format ()
"A simple hack to obtain `2022-10-02 22:10'."
(interactive)
(insert (format-time-string "%Y-%m-%d %H:%M")))
Choice:
( ) International ISO 8601 format
( ) Old format, as returned by ‘current-time-string’
(*) Other: my-changelog-date-format
State : SAVED and set.
Function that defines the time format. Hide
For example, ‘add-log-iso8601-time-string’, which gives the
date in international ISO 8601 format,
and ‘current-time-string’ are two valid values.
But it did not work.
Any ideas
Uwe Brauer
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
^ permalink raw reply [flat|nested] 44+ messages in thread
* problems with better-registers: turn-off-all-minor modes or remove all text-properties
@ 2022-07-23 16:45 Uwe Brauer
2022-07-24 0:09 ` Michael Heerdegen
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2022-07-23 16:45 UTC (permalink / raw)
To: help-gnu-emacs
Hi
better-registers found in https://github.com/emacsmirror/emacswiki.org/blob/master/better-registers.el
is unfortunately no longer maintained. It allows, among other things, to
save registers in a file for future sessions.
While there is no problem in saving some text of a buffer in fundamental
mode to a specific resister.
However for example message mode, that has in my case quite a bit of
minor modes turn on, results in a saving of the sort.
,----
|
| (set-register 49 #("
| Test again
| and again
| --
| I strongly condemn Putin's war of aggression against the Ukraine. I
| support to deliver weapons to Ukraine's military. I support the ban of
| Russia from SWIFT. I support the EU membership of the Ukraine. " 0 1
| (fontified t) 1 11 (fontified t) 11 22 (fontified t) 22 23 (fontified t)
| 23 25 (fontified t rear-nonsticky t field signature pabbrev-added t) 25
| 26 (fontified t rear-nonsticky t field signature) 26 27 (fontified t) 27
| 28 (fontified t pabbrev-added t) 28 29 (fontified t) 29 37 (fontified t
| pabbrev-added t) 37 38 (fontified t) 38 45 (fontified t pabbrev-added t)
| 45 46 (fontified t) 46 53 (fontified t pabbrev-added t) 53 54 (fontified
| t) 54 57 (fontified t pabbrev-added t) 57 58 (fontified t) 58 60
| (fontified t pabbrev-added t) 60 61 (fontified t) 61 71 (fontified t
| pabbrev-added t) 71 72 (fontified t) 72 79 (fontified t pabbrev-added t)
| 79 80 (fontified t) 80 83 (fontified t pabbrev-added t) 83 84 (fontified
| t) 84 91 (fontified t pabbrev-added t) 91 93 (fontified t) 93 94
| (fontified t pabbrev-added t) 94 95 (fontified t) 95 102 (fontified t
| pabbrev-added t) 102 103 (fontified t) 103 105 (fontified t
| pabbrev-added t) 105 106 (fontified t) 106 113 (fontified t
| pabbrev-added t) 113 114 (fontified t) 114 121 (fontified t
| pabbrev-added t) 121 122 (fontified t) 122 124 (fontified t
| pabbrev-added t) 124 125 (fontified t) 125 134 (fontified t
| pabbrev-added t) 134 135 (fontified t) 135 143 (fontified t
| pabbrev-added t) 143 146 (fontified t) 146 147 (fontified t
| pabbrev-added t) 147 148 (fontified t) 148 155 (fontified t
| pabbrev-added t) 155 156 (fontified t) 156 159 (fontified t
| pabbrev-added t) 159 160 (fontified t) 160 163 (fontified t
| pabbrev-added t) 163 164 (fontified t) 164 166 (fontified t
| pabbrev-added t) 166 167 (fontified t) 167 173 (fontified t
| pabbrev-added t) 173 174 (fontified t) 174 178 (fontified t
| pabbrev-added t) 178 179 (fontified t) 179 184 (fontified t
| pabbrev-added t) 184 186 (fontified t) 186 187 (fontified t
| pabbrev-added t) 187 188 (fontified t) 188 195 (fontified t
| pabbrev-added t) 195 196 (fontified t) 196 199 (fontified t
| pabbrev-added t) 199 200 (fontified t) 200 202 (fontified t
| pabbrev-added t) 202 203 (fontified t) 203 213 (fontified t
| pabbrev-added t) 213 214 (fontified t) 214 216 (fontified t
| pabbrev-added t) 216 217 (fontified t) 217 220 (fontified t
| pabbrev-added t) 220 221 (fontified t) 221 228 (fontified t
| pabbrev-added t) 228 231 (fontified t)))
`----
Which in turn causes problems when loading a file with such saved resisters.
Two workaround occured to me, but both did not work
1. Turn off all minor mode (which might be the culprit of all the
face stuff that is added) by using
(defun disable-all-minor-modes ()
(interactive)
(mapc
(lambda (mode-symbol)
(when (functionp mode-symbol)
;; some symbols are functions which aren't normal mode functions
(ignore-errors
(funcall mode-symbol -1))))
minor-mode-list))
Found in
https://emacs.stackexchange.com/questions/42239/how-to-disable-all-the-minor-modes-when-a-specific-major-mode-is-enabled-with
2. Or delete all the text-properties, by something like this
(let ((inhibit-read-only t))
(set-text-properties (point-min) (point-max) nil))
It did not work neither.
Any idea?
Thanks and regards
Uwe Brauer
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: problems with better-registers: turn-off-all-minor modes or remove all text-properties
2022-07-23 16:45 problems with better-registers: turn-off-all-minor modes or remove all text-properties Uwe Brauer
@ 2022-07-24 0:09 ` Michael Heerdegen
2022-07-24 3:59 ` Michael Heerdegen
0 siblings, 1 reply; 44+ messages in thread
From: Michael Heerdegen @ 2022-07-24 0:09 UTC (permalink / raw)
To: help-gnu-emacs
Uwe Brauer <oub@mat.ucm.es> writes:
> Which in turn causes problems when loading a file with such saved
> resisters.
Could you please be more specific - what's the problem? As Stefan said,
text properties are normally not a problem in this case.
Michael.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: problems with better-registers: turn-off-all-minor modes or remove all text-properties
2022-07-24 0:09 ` Michael Heerdegen
@ 2022-07-24 3:59 ` Michael Heerdegen
2022-07-24 5:39 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Michael Heerdegen @ 2022-07-24 3:59 UTC (permalink / raw)
To: help-gnu-emacs
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Could you please be more specific - what's the problem? As Stefan said,
> text properties are normally not a problem in this case.
Ok, after reading again what you had posted in emacs-dev, I saw your
string contained unreadable properties. Your string contained a button,
for example.
What I would do is to advice `set-register' to strip unreadable
properties from any stringp value. Or just strip text properties if you
don't want them anyway. That's better than trying to work around that
problem.
Michael.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: problems with better-registers: turn-off-all-minor modes or remove all text-properties
2022-07-24 3:59 ` Michael Heerdegen
@ 2022-07-24 5:39 ` Uwe Brauer
2022-07-24 19:51 ` [SOLVED] (was: problems with better-registers: turn-off-all-minor modes or remove all text-properties) Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2022-07-24 5:39 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1554 bytes --]
>>> "MH" == Michael Heerdegen <michael_heerdegen@web.de> writes:
> Michael Heerdegen <michael_heerdegen@web.de> writes:
>> Could you please be more specific - what's the problem? As Stefan said,
>> text properties are normally not a problem in this case.
> Ok, after reading again what you had posted in emacs-dev, I saw your
> string contained unreadable properties. Your string contained a button,
> for example.
> What I would do is to advice `set-register' to strip unreadable
> properties from any stringp value. Or just strip text properties if you
> don't want them anyway. That's better than trying to work around that
> problem.
Thanks, that did not occur to me. I tried to advice since a while since
it makes debugging difficult.
In any case, maybe because I have not used it for a while, my attempts
failed:
(defadvice set-property (before removeproperties activate)
"Remove all text properties before setting the property"
(let ((inhibit-read-only t))
(set-text-properties (point-min) (point-max) nil)))
(defadvice set-property (after removeproperties activate)
"Remove all text properties before setting the property"
(let ((inhibit-read-only t))
(set-text-properties (point-min) (point-max) nil)))
None of them worked
Any ideas?
thanks
Uwe Brauer
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* [SOLVED] (was: problems with better-registers: turn-off-all-minor modes or remove all text-properties)
2022-07-24 5:39 ` Uwe Brauer
@ 2022-07-24 19:51 ` Uwe Brauer
2022-07-24 22:36 ` [SOLVED] Michael Heerdegen
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2022-07-24 19:51 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 878 bytes --]
> Thanks, that did not occur to me. I tried to advice since a while since
> it makes debugging difficult.
> In any case, maybe because I have not used it for a while, my attempts
> failed:
> (defadvice set-property (before removeproperties activate)
> "Remove all text properties before setting the property"
> (let ((inhibit-read-only t))
> (set-text-properties (point-min) (point-max) nil)))
> (defadvice set-property (after removeproperties activate)
> "Remove all text properties before setting the property"
> (let ((inhibit-read-only t))
> (set-text-properties (point-min) (point-max) nil)))
> None of them worked
The magic seems to be
(defadvice copy-to-register (before removeproperties activate)
"Remove all text properties before setting the property"
(let ((inhibit-read-only t))
(set-text-properties (point-min) (point-max) nil)))
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2022-07-24 19:51 ` [SOLVED] (was: problems with better-registers: turn-off-all-minor modes or remove all text-properties) Uwe Brauer
@ 2022-07-24 22:36 ` Michael Heerdegen
2022-07-25 5:37 ` [SOLVED] Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Michael Heerdegen @ 2022-07-24 22:36 UTC (permalink / raw)
To: help-gnu-emacs
Uwe Brauer <oub@mat.ucm.es> writes:
> Thanks, that did not occur to me. I tried to advice since a while
> since it makes debugging difficult.
Not much, IME.
> (defadvice copy-to-register (before removeproperties activate)
> "Remove all text properties before setting the property"
> (let ((inhibit-read-only t))
> (set-text-properties (point-min) (point-max) nil)))
It would be better and cleaner to change the value that is saved in the
register instead of modifying the buffer.
Michael.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2022-07-24 22:36 ` [SOLVED] Michael Heerdegen
@ 2022-07-25 5:37 ` Uwe Brauer
2022-07-25 5:49 ` [SOLVED] Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2022-07-25 5:37 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 970 bytes --]
>>> "MH" == Michael Heerdegen <michael_heerdegen@web.de> writes:
> Uwe Brauer <oub@mat.ucm.es> writes:
>> Thanks, that did not occur to me. I tried to advice since a while
>> since it makes debugging difficult.
> Not much, IME.
>> (defadvice copy-to-register (before removeproperties activate)
>> "Remove all text properties before setting the property"
>> (let ((inhibit-read-only t))
>> (set-text-properties (point-min) (point-max) nil)))
> It would be better and cleaner to change the value that is saved in the
> register instead of modifying the buffer.
Well I tried that, but I couldn't. As I said modify set-register did not
work for me.
I am not happy about my solution and would appreciate any suggestion.
Uwe
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2022-07-25 5:37 ` [SOLVED] Uwe Brauer
@ 2022-07-25 5:49 ` Uwe Brauer
2022-07-25 17:09 ` [SOLVED] Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2022-07-25 5:49 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]
>>> "UB" == Uwe Brauer <oub@mat.ucm.es> writes:
>>> "MH" == Michael Heerdegen <michael_heerdegen@web.de> writes:
>> Uwe Brauer <oub@mat.ucm.es> writes:
>>> Thanks, that did not occur to me. I tried to advice since a while
>>> since it makes debugging difficult.
>> Not much, IME.
>>> (defadvice copy-to-register (before removeproperties activate)
>>> "Remove all text properties before setting the property"
>>> (let ((inhibit-read-only t))
>>> (set-text-properties (point-min) (point-max) nil)))
>> It would be better and cleaner to change the value that is saved in the
>> register instead of modifying the buffer.
I just realized that I did not read your message carefully enough.
It seems you suggest
(defadvice copy-to-register (before removeproperties activate)
"Remove all text properties before setting the property"
(let ((inhibit-read-only t))
(set-text-properties (region-beginning) (region-end) nil)))
Which is what I intended but copied the code incorrectly.
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2022-07-25 5:49 ` [SOLVED] Uwe Brauer
@ 2022-07-25 17:09 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-07-25 19:49 ` [SOLVED] Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-07-25 17:09 UTC (permalink / raw)
To: help-gnu-emacs
> It seems you suggest
>
> (defadvice copy-to-register (before removeproperties activate)
> "Remove all text properties before setting the property"
> (let ((inhibit-read-only t))
> (set-text-properties (region-beginning) (region-end) nil)))
No, that still modifies the buffer. He suggests you apply
`set-text-properties` to the extracted string.
Stefan
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2022-07-25 17:09 ` [SOLVED] Stefan Monnier via Users list for the GNU Emacs text editor
@ 2022-07-25 19:49 ` Uwe Brauer
2022-07-25 22:37 ` [SOLVED] Michael Heerdegen
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2022-07-25 19:49 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 973 bytes --]
>>> "SMvUlftGEte" == Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:
>> It seems you suggest
>>
>> (defadvice copy-to-register (before removeproperties activate)
>> "Remove all text properties before setting the property"
>> (let ((inhibit-read-only t))
>> (set-text-properties (region-beginning) (region-end) nil)))
> No, that still modifies the buffer. He suggests you apply
> `set-text-properties` to the extracted string.
Well I tried
(defadvice set-property (before removeproperties activate)
"Remove all text properties before setting the property"
(let ((inhibit-read-only t))
(set-text-properties (region-beginning) (region-end) nil)))
But it did not work
Uwe
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2022-07-25 19:49 ` [SOLVED] Uwe Brauer
@ 2022-07-25 22:37 ` Michael Heerdegen
2022-07-26 4:57 ` [SOLVED] Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Michael Heerdegen @ 2022-07-25 22:37 UTC (permalink / raw)
To: help-gnu-emacs
Uwe Brauer <oub@mat.ucm.es> writes:
> Well I tried
>
> (defadvice set-property (before removeproperties activate)
> "Remove all text properties before setting the property"
> (let ((inhibit-read-only t))
> (set-text-properties (region-beginning) (region-end) nil)))
>
> But it did not work
Wouldn't it be appropriate to refresh your knowledge about advices?
Michael.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2022-07-25 22:37 ` [SOLVED] Michael Heerdegen
@ 2022-07-26 4:57 ` Uwe Brauer
2022-07-26 13:01 ` [SOLVED] Thorsten Bonow
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2022-07-26 4:57 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 3123 bytes --]
>>> "MH" == Michael Heerdegen <michael_heerdegen@web.de> writes:
> Uwe Brauer <oub@mat.ucm.es> writes:
>> Well I tried
>>
>> (defadvice set-property (before removeproperties activate)
>> "Remove all text properties before setting the property"
>> (let ((inhibit-read-only t))
>> (set-text-properties (region-beginning) (region-end) nil)))
>>
>> But it did not work
> Wouldn't it be appropriate to refresh your knowledge about advices?
Well I tried this as well, and tried out the new advice-add
functionality.
Here is what I tried
(defun my-remove-all-text-properties-region ()
(interactive) ;; that is not important
(let ((inhibit-read-only t))
(set-text-properties (region-beginning) (region-end) nil)))
Then
(advice-add 'set-property :before #'my-remove-all-text-properties-region)
or
(advice-add 'set-property :around #'my-remove-all-text-properties-region)
Result: no effect
I tried
(advice-add 'copy-to-register :before #'my-remove-all-text-properties-region)
or
(advice-add 'copy-to-register :around #'my-remove-all-text-properties-region)
Results in an error:
,----
| Debugger entered--Lisp error: (wrong-number-of-arguments
| #f(compiled-function () (interactive nil) #<bytecode
| 0x1f6825029d2a6658>) 1)
| my-remove-all-text-properties-region(#f(compiled-function (register
| start end &optional delete-flag region) "Copy region into register
| REGISTER.\nWith prefix arg, delete as well.\nCalled from program,
| takes five args: REGISTER, START, END, DELETE-FLAG,\nand REGION. START
| and END are buffer positions indicating what to copy.\nThe optional
| argument REGION if non-nil, indicates that we're not just\ncopying
| some text between START and END, but we're copying the
| region.\n\nInteractively, reads the register using
| `register-read-with-preview'." (interactive #f(compiled-function ()
| #<bytecode -0x19b31a6142e6ce87>)) #<bytecode 0x18af6be063d3e91b>))
| apply(my-remove-all-text-properties-region #f(compiled-function
| (register start end &optional delete-flag region) "Copy region into
| register REGISTER.\nWith prefix arg, delete as well.\nCalled from
| program, takes five args: REGISTER, START, END, DELETE-FLAG,\nand
| REGION. START and END are buffer positions indicating what to
| copy.\nThe optional argument REGION if non-nil, indicates that we're
| not just\ncopying some text between START and END, but we're copying
| the region.\n\nInteractively, reads the register using
| `register-read-with-preview'." (interactive #f(compiled-function ()
| #<bytecode -0x19b31a6142e6ce87>)) #<bytecode 0x18af6be063d3e91b>) nil)
| copy-to-register() funcall-interactively(copy-to-register)
| call-interactively(copy-to-register nil nil)
| command-execute(copy-to-register)
`----
At this point I give up
Uwe
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2022-07-26 4:57 ` [SOLVED] Uwe Brauer
@ 2022-07-26 13:01 ` Thorsten Bonow
2022-07-26 15:02 ` [SOLVED] Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Thorsten Bonow @ 2022-07-26 13:01 UTC (permalink / raw)
To: help-gnu-emacs
>>>>> Uwe Brauer <oub@mat.ucm.es> writes:
[...]
> At this point I give up
> Uwe
Don't loose heart...
(defun copy-to-register--no-properties (orig-fun &rest args)
"Remove properties of region when calling `copy-to-register'."
(let ((filter-buffer-substring-function (lambda (beg end
&optional delete)
(if delete
(delete-and-extract-region
beg end)
(buffer-substring-no-properties
beg end)))))
(apply orig-fun args)))
(advice-add 'copy-to-register :around
#'copy-to-register--no-properties)
Works for me, but the way I understand the manual, instead of
advising a function, better-registers.el should just modify
`filter-buffer-substring-function' for its needs.
Hope this helps.
Toto
--
Sent from my GNU Emacs running on GNU/Linux
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2022-07-26 13:01 ` [SOLVED] Thorsten Bonow
@ 2022-07-26 15:02 ` Uwe Brauer
2022-07-26 16:23 ` [SOLVED] Yuri Khan
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2022-07-26 15:02 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]
>>> "TB" == Thorsten Bonow <thorsten.bonow@post.rwth-aachen.de> writes:
Hello Thorsten
>>>>>> Uwe Brauer <oub@mat.ucm.es> writes:
> [...] > At this point I give up > Uwe Don't loose heart...
Ok I will not (and it seems I can count on «with a little help of my
friends 😉)
> (defun copy-to-register--no-properties (orig-fun &rest args) "Remove
> properties of region when calling `copy-to-register'." (let
> ((filter-buffer-substring-function (lambda (beg end &optional
> delete) (if delete
> (delete-and-extract-region
> beg end)
> (buffer-substring-no-properties
> beg end))))) (apply orig-fun args))) (advice-add 'copy-to-register
> :around #'copy-to-register--no-properties) Works for me, but the way I
> understand the manual, instead of advising a function,
> better-registers.el should just modify
> `filter-buffer-substring-function' for its needs.
> Hope this helps.
It does very much so, that solution would not have occurred to me. So thanks for
the code.
BTW, I found it strange that «vanilla» Emacs does not provide saving
registers, but then this is a question of demand, and it seems only a
few users use that functionality.
Uwe
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2022-07-26 15:02 ` [SOLVED] Uwe Brauer
@ 2022-07-26 16:23 ` Yuri Khan
2022-07-26 23:28 ` [SOLVED] Michael Heerdegen
2022-07-27 10:50 ` [SOLVED] Uwe Brauer
0 siblings, 2 replies; 44+ messages in thread
From: Yuri Khan @ 2022-07-26 16:23 UTC (permalink / raw)
To: help-gnu-emacs
On Tue, 26 Jul 2022 at 22:08, Uwe Brauer <oub@mat.ucm.es> wrote:
> BTW, I found it strange that «vanilla» Emacs does not provide saving
> registers, but then this is a question of demand, and it seems only a
> few users use that functionality.
I don’t remember who said it doesn’t but do we consider desktop.el
“vanilla” or some other flavor? My .emacs.desktop has a ‘(setq
register-alist '…)’ and it persists across Emacs sessions. (I have not
encountered unreadable properties in there, or maybe I did but did not
make the connection.)
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2022-07-26 16:23 ` [SOLVED] Yuri Khan
@ 2022-07-26 23:28 ` Michael Heerdegen
2022-07-27 10:50 ` [SOLVED] Uwe Brauer
1 sibling, 0 replies; 44+ messages in thread
From: Michael Heerdegen @ 2022-07-26 23:28 UTC (permalink / raw)
To: help-gnu-emacs
Yuri Khan <yuri.v.khan@gmail.com> writes:
> I don’t remember who said it doesn’t but do we consider desktop.el
> “vanilla” or some other flavor? My .emacs.desktop has a ‘(setq
> register-alist '…)’ and it persists across Emacs sessions. (I have not
> encountered unreadable properties in there, or maybe I did but did not
> make the connection.)
Seems it is silently stripping (all) properties when such a problem
appears - see `desktop--v2s'.
Michael.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2022-07-26 16:23 ` [SOLVED] Yuri Khan
2022-07-26 23:28 ` [SOLVED] Michael Heerdegen
@ 2022-07-27 10:50 ` Uwe Brauer
2022-07-27 15:04 ` [SOLVED] Yuri Khan
1 sibling, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2022-07-27 10:50 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]
>>> "YK" == Yuri Khan <yuri.v.khan@gmail.com> writes:
> On Tue, 26 Jul 2022 at 22:08, Uwe Brauer <oub@mat.ucm.es> wrote:
>> BTW, I found it strange that «vanilla» Emacs does not provide saving
>> registers, but then this is a question of demand, and it seems only a
>> few users use that functionality.
> I don’t remember who said it doesn’t but do we consider desktop.el
> “vanilla” or some other flavor?
Since desktop is part of Emacs it is vanilla.
> My .emacs.desktop has a ‘(setq
> register-alist '…)’ and it persists across Emacs sessions. (I have not
> encountered unreadable properties in there, or maybe I did but did not
> make the connection.)
Aha, thanks I did not know that, I really never used desktop that much,
but can you use list-register and then edit the registers?
Ok I realized that list-register is not part of emacs vanilla neither.
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2022-07-27 10:50 ` [SOLVED] Uwe Brauer
@ 2022-07-27 15:04 ` Yuri Khan
2022-07-28 14:46 ` [SOLVED$ Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Yuri Khan @ 2022-07-27 15:04 UTC (permalink / raw)
To: help-gnu-emacs
On Wed, 27 Jul 2022 at 17:51, Uwe Brauer <oub@mat.ucm.es> wrote:
> Since desktop is part of Emacs it is vanilla.
[…]
> Aha, thanks I did not know that, I really never used desktop that much,
> but can you use list-register and then edit the registers?
> Ok I realized that list-register is not part of emacs vanilla neither.
Is it not? Works for me and I do not remember doing anything for it to
work, and it lives in /usr/share/emacs/29.0.50/lisp/register.el.gz, so
I guess it’s also vanilla by your definition.
I cannot edit registers directly, but I can insert the text from a
register into a buffer, edit the text there, and copy it back to the
register, and it will be persisted the next time I restart Emacs.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED$
2022-07-27 15:04 ` [SOLVED] Yuri Khan
@ 2022-07-28 14:46 ` Uwe Brauer
0 siblings, 0 replies; 44+ messages in thread
From: Uwe Brauer @ 2022-07-28 14:46 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]
>>> "YK" == Yuri Khan <yuri.v.khan@gmail.com> writes:
> On Wed, 27 Jul 2022 at 17:51, Uwe Brauer <oub@mat.ucm.es> wrote:
>> Since desktop is part of Emacs it is vanilla.
> […$
>> Aha, thanks I did not know that, I really never used desktop that much,
>> but can you use list-register and then edit the registers?
>> Ok I realized that list-register is not part of emacs vanilla neither.
> Is it not? Works for me and I do not remember doing anything for it to
> work, and it lives in /usr/share/emacs/29.0.50/lisp/register.el.gz, so
> I guess it’s also vanilla by your definition.
> I cannot edit registers directly, but I can insert the text from a
> register into a buffer, edit the text there, and copy it back to the
> register, and it will be persisted the next time I restart Emacs.
May I suggest then list-register (found in the package system):
it lists registers and allows to edit them,
There is also register-list
(remember Monty Python:
«The People's Front of Judea» vs «Judean People's Front» )
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* [BUG] org-persist [9.5 (release_9.5-194-gdb302d @ /home/oub/emacs/site-lisp/packages/org/)]
@ 2021-12-28 13:41 Uwe Brauer
2021-12-28 13:53 ` [SOLVED] (was: [BUG] org-persist [9.5 (release_9.5-194-gdb302d @ /home/oub/emacs/site-lisp/packages/org/)]) Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2021-12-28 13:41 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 85 bytes --]
In connection with my earlier bug report, here is the backtrace when starting emacs
[-- Attachment #2: startup-error.txt --]
[-- Type: text/plain, Size: 10676 bytes --]
Debugger entered--Lisp error: (void-function org-file-name-concat)
org-file-name-concat("/home/oub/.cache" "org-persist/")
byte-code("\301\302\303 \304\1!\203\16\0\10\202\17\0\211\262\1\305\"!\207" [user-emacs-directory expand-file-name org-file-name-concat xdg-cache-home seq-empty-p "org-persist/"] 5)
(defvar org-persist-directory (byte-code "\301\302\303 \304\1!\203\16\0\10\202\17\0\211\262\1\305\"!\207" [user-emacs-directory expand-file-name org-file-name-concat xdg-cache-home seq-empty-p "org-persist/"] 5) ("/home/oub/emacs/site-lisp/packages/org/org-persist..." . 175))
require(org-persist)
byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\210\300\312!\210\300\313!\210\300\314!\207" [require avl-tree ring cl-lib ol org org-persist org-compat org-entities org-footnote org-list org-macs org-table] 2)
require(org-element)
byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\207" [require cl-lib ob-exp oc oc-basic ol org-element org-macro tabulated-list] 2)
require(ox)
byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\306\307\310\311\312\313\314\315\316&\10\207" [require cl-lib format-spec ox ox-publish table org-export-define-backend html ((bold . org-html-bold) (center-block . org-html-center-block) (clock . org-html-clock) (code . org-html-code) (drawer . org-html-drawer) (dynamic-block . org-html-dynamic-block) (entity . org-html-entity) (example-block . org-html-example-block) (export-block . org-html-export-block) (export-snippet . org-html-export-snippet) (fixed-width . org-html-fixed-width) (footnote-reference . org-html-footnote-reference) (headline . org-html-headline) (horizontal-rule . org-html-horizontal-rule) (inline-src-block . org-html-inline-src-block) (inlinetask . org-html-inlinetask) (inner-template . org-html-inner-template) (italic . org-html-italic) (item . org-html-item) (keyword . org-html-keyword) (latex-environment . org-html-latex-environment) (latex-fragment . org-html-latex-fragment) (line-break . org-html-line-break) (link . org-html-link) (node-property . org-html-node-property) (paragraph . org-html-paragraph) (plain-list . org-html-plain-list) (plain-text . org-html-plain-text) (planning . org-html-planning) (property-drawer . org-html-property-drawer) (quote-block . org-html-quote-block) (radio-target . org-html-radio-target) (section . org-html-section) (special-block . org-html-special-block) (src-block . org-html-src-block) (statistics-cookie . org-html-statistics-cookie) (strike-through . org-html-strike-through) (subscript . org-html-subscript) (superscript . org-html-superscript) (table . org-html-table) (table-cell . org-html-table-cell) (table-row . org-html-table-row) (target . org-html-target) (template . org-html-template) ...) :filters-alist ((:filter-options . org-html-infojs-install-script) (:filter-parse-tree . org-html-image-link-filter) (:filter-final-output . org-html-final-function)) :menu-entry (104 "Export to HTML" ((72 "As HTML buffer" org-html-export-as-html) (104 "As HTML file" org-html-export-to-html) (111 "As HTML file and open" (lambda (a s v b) (if a ... ...))))) :options-alist ((:html-doctype "HTML_DOCTYPE" nil org-html-doctype) (:html-container "HTML_CONTAINER" nil org-html-container-element) (:html-content-class "HTML_CONTENT_CLASS" nil org-html-content-class) (:description "DESCRIPTION" nil nil newline) (:keywords "KEYWORDS" nil nil space) (:html-html5-fancy nil "html5-fancy" org-html-html5-fancy) (:html-link-use-abs-url nil "html-link-use-abs-url" org-html-link-use-abs-url) (:html-link-home "HTML_LINK_HOME" nil org-html-link-home) (:html-link-up "HTML_LINK_UP" nil org-html-link-up) (:html-mathjax "HTML_MATHJAX" nil "" space) (:html-equation-reference-format "HTML_EQUATION_REFERENCE_FORMAT" nil org-html-equation-reference-format t) (:html-postamble nil "html-postamble" org-html-postamble) (:html-preamble nil "html-preamble" org-html-preamble) (:html-head "HTML_HEAD" nil org-html-head newline) (:html-head-extra "HTML_HEAD_EXTRA" nil org-html-head-extra newline) (:subtitle "SUBTITLE" nil nil parse) (:html-head-include-default-style nil "html-style" org-html-head-include-default-style) (:html-head-include-scripts nil "html-scripts" org-html-head-include-scripts) (:html-allow-name-attribute-in-anchors nil nil org-html-allow-name-attribute-in-anchors) (:html-divs nil nil org-html-divs) (:html-checkbox-type nil nil org-html-checkbox-type) (:html-extension nil nil org-html-extension) (:html-footnote-format nil nil org-html-footnote-format) (:html-footnote-separator nil nil org-html-footnote-separator) (:html-footnotes-section nil nil org-html-footnotes-section) (:html-format-drawer-function nil nil org-html-format-drawer-function) (:html-format-headline-function nil nil org-html-format-headline-function) (:html-format-inlinetask-function nil nil org-html-format-inlinetask-function) (:html-home/up-format nil nil org-html-home/up-format) (:html-indent nil nil org-html-indent) (:html-infojs-options nil nil org-html-infojs-options) (:html-infojs-template nil nil org-html-infojs-template) (:html-inline-image-rules nil nil org-html-inline-image-rules) (:html-link-org-files-as-html nil nil org-html-link-org-files-as-html) (:html-mathjax-options nil nil org-html-mathjax-options) (:html-mathjax-template nil nil org-html-mathjax-template) (:html-metadata-timestamp-format nil nil org-html-metadata-timestamp-format) (:html-postamble-format nil nil org-html-postamble-format) (:html-preamble-format nil nil org-html-preamble-format) (:html-prefer-user-labels nil nil org-html-prefer-user-labels) (:html-self-link-headlines nil nil org-html-self-link-headlines) (:html-table-align-individual-fields nil nil org-html-table-align-individual-fields) (:html-table-caption-above nil nil org-html-table-caption-above) (:html-table-data-tags nil nil org-html-table-data-tags) ...)] 9)
require(ox-html)
byte-code("\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\311\312\313\314\315\316\317&\13\210\320\321\322\323\324DD\325\312\305\326\327&\7\210\320\330\322\323\331DD\332..." [require cl-lib ox-html ox-publish custom-declare-group org-export-md nil "Options specific to Markdown export back-end." :tag "Org Markdown" :group org-export :version "24.4" :package-version (Org . "8.0") custom-declare-variable org-md-headline-style funcall function #f(compiled-function () #<bytecode 0x1f400b723399>) "Style used to format headlines.\nThis variable can ..." :type (choice (const :tag "Use \"atx\" style" atx) (const :tag "Use \"Setext\" style" setext)) org-md-footnotes-section #f(compiled-function () #<bytecode 0x1f40006223633>) "Format string for the footnotes section.\nThe first..." string "26.1" (Org . "9.0") org-md-footnote-format #f(compiled-function () #<bytecode -0x377aad65da8591f>) "Format string for the footnote reference.\nThe %s w..." (Org . "9.0") org-export-define-derived-backend md html :filters-alist ((:filter-parse-tree . org-md-separate-elements)) :menu-entry (109 "Export to Markdown" ((77 "To temporary buffer" (lambda (a s v b) (org-md-export-as-markdown a s v))) (109 "To file" (lambda (a s v b) (org-md-export-to-markdown a s v))) (111 "To file and open" (lambda (a s v b) (if a (org-md-export-to-markdown t s v) (org-open-file ...)))))) :translate-alist ((bold . org-md-bold) (center-block . org-md--convert-to-html) (code . org-md-verbatim) (drawer . org-md--identity) (dynamic-block . org-md--identity) (example-block . org-md-example-block) (export-block . org-md-export-block) (fixed-width . org-md-example-block) (headline . org-md-headline) (horizontal-rule . org-md-horizontal-rule) (inline-src-block . org-md-verbatim) (inlinetask . org-md--convert-to-html) (inner-template . org-md-inner-template) (italic . org-md-italic) (item . org-md-item) (keyword . org-md-keyword) (latex-environment . org-md-latex-environment) (latex-fragment . org-md-latex-fragment) (line-break . org-md-line-break) (link . org-md-link) (node-property . org-md-node-property) (paragraph . org-md-paragraph) (plain-list . org-md-plain-list) (plain-text . org-md-plain-text) (property-drawer . org-md-property-drawer) (quote-block . org-md-quote-block) (section . org-md-section) (special-block . org-md--convert-to-html) (src-block . org-md-example-block) (table . org-md--convert-to-html) (template . org-md-template) (verbatim . org-md-verbatim)) :options-alist ((:md-footnote-format nil nil org-md-footnote-format) (:md-footnotes-section nil nil org-md-footnotes-section) (:md-headline-style nil nil org-md-headline-style))] 12)
require(ox-md)
byte-code("\300\301!\210\302\303\304\305\306\307\310\311\312\313\314\315&\13\210\316\317\320\321\310\303\322\323&\7\210\316\324\325\326\310\303\322\327&\7\210\316\330\331\332\310\303\322\327&..." [require ox-md custom-declare-group org-export-pandoc nil "Options specific to Pandoc export back-end." :tag "Org Pandoc" :group org-export :version "24.4" :package-version (Org . "8.0") custom-declare-variable org-pandoc-process-after-export t "Run pandoc to process the file after exporting it?" :type (choice (const :tag "Yes" t) (const :tag "No" nil)) org-pandoc-command "pandoc" "Command to run pandoc." string org-pandoc-extra-options "" "Extra pandoc options to use every time.\nFor exampl..." org-pandoc-output-format 'epub "Default output format for pandoc conversion." symbol org-pandoc-output-standalone "Should output be a single standalone file or not?" boolean org-pandoc-epub-rights "Copyright/license statement to include in EPUB met..." org-pandoc-epub-stylesheet "Stylesheet to apply to EPUB files."] 12)
require(ox-pandoc)
eval-buffer(#<buffer *load*-315843> nil "/home/oub/emacs/init/emacs_init.el" nil t) ; Reading at buffer position 22629
load-with-code-conversion("/home/oub/emacs/init/emacs_init.el" "/home/oub/emacs/init/emacs_init.el" nil nil)
load("/home/oub/emacs/init/emacs_init.el" nil nil t)
load-file("~/emacs/init/emacs_init.el")
(cond ((and (not running-xemacs) (> emacs-major-version 19)) (package-initialize) (load-file "~/emacs/init/emacs_init.el") (setq custom-file "/home/oub/emacs/init/custom-init.el") (load-file "/home/oub/emacs/init/custom-init.el")))
eval-buffer(#<buffer *load*> nil "/home/oub/.emacs" nil t) ; Reading at buffer position 905
load-with-code-conversion("/home/oub/.emacs" "/home/oub/.emacs" nil nil)
load("/home/oub/.emacs" nil nil t)
load-file("~/.emacs")
funcall-interactively(load-file "~/.emacs")
call-interactively(load-file nil nil)
command-execute(load-file)
[-- Attachment #3: Type: text/plain, Size: 391 bytes --]
Emacs : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.14.6, Xaw3d scroll bars)
of 2021-11-08
Package: Org mode version 9.5 (release_9.5-194-gdb302d @ /home/oub/emacs/site-lisp/packages/org/)
current state:
==============
State could not be dumped due to the following error:
(void-variable org-descriptive-links)
You should still send this bug report.
^ permalink raw reply [flat|nested] 44+ messages in thread
* [SOLVED] (was: [BUG] org-persist [9.5 (release_9.5-194-gdb302d @ /home/oub/emacs/site-lisp/packages/org/)])
2021-12-28 13:41 [BUG] org-persist [9.5 (release_9.5-194-gdb302d @ /home/oub/emacs/site-lisp/packages/org/)] Uwe Brauer
@ 2021-12-28 13:53 ` Uwe Brauer
2021-12-28 14:49 ` Ihor Radchenko
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2021-12-28 13:53 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 424 bytes --]
>>> "UB" == Uwe Brauer <oub@mat.ucm.es> writes:
> In connection with my earlier bug report, here is the backtrace when starting emacs
> Debugger entered--Lisp error: (void-function org-file-name-concat)
> (void-variable org-descriptive-links)
> You should still send this bug report.
I found the culprit, the recently installed org-real pkg.
I uninstalled it and everything was back to normally.
Regards
Uwe Brauer
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED] (was: [BUG] org-persist [9.5 (release_9.5-194-gdb302d @ /home/oub/emacs/site-lisp/packages/org/)])
2021-12-28 13:53 ` [SOLVED] (was: [BUG] org-persist [9.5 (release_9.5-194-gdb302d @ /home/oub/emacs/site-lisp/packages/org/)]) Uwe Brauer
@ 2021-12-28 14:49 ` Ihor Radchenko
2021-12-28 17:28 ` [SOLVED] Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Ihor Radchenko @ 2021-12-28 14:49 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
> I found the culprit, the recently installed org-real pkg.
>
> I uninstalled it and everything was back to normally.
Hmm. I suspect that org-real might not be the problem by itself. Rather
you may load it too early and pull-in built-in org.
Best,
Ihor
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2021-12-28 14:49 ` Ihor Radchenko
@ 2021-12-28 17:28 ` Uwe Brauer
2021-12-29 5:11 ` [SOLVED] Ihor Radchenko
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2021-12-28 17:28 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 426 bytes --]
>>> "IR" == Ihor Radchenko <yantar92@gmail.com> writes:
> Uwe Brauer <oub@mat.ucm.es> writes:
>> I found the culprit, the recently installed org-real pkg.
>>
>> I uninstalled it and everything was back to normally.
> Hmm. I suspect that org-real might not be the problem by itself. Rather
> you may load it too early and pull-in built-in org.
Well I don't load anything, that is all done by the package system.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2021-12-28 17:28 ` [SOLVED] Uwe Brauer
@ 2021-12-29 5:11 ` Ihor Radchenko
2021-12-29 8:06 ` [SOLVED] Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Ihor Radchenko @ 2021-12-29 5:11 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
>> Hmm. I suspect that org-real might not be the problem by itself. Rather
>> you may load it too early and pull-in built-in org.
>
> Well I don't load anything, that is all done by the package system.
I was just guessing. But do you really have init.el with no requires?
Best,
Ihor
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2021-12-29 5:11 ` [SOLVED] Ihor Radchenko
@ 2021-12-29 8:06 ` Uwe Brauer
2021-12-29 8:18 ` [SOLVED] Ihor Radchenko
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2021-12-29 8:06 UTC (permalink / raw)
To: emacs-orgmode
>>> "IR" == Ihor Radchenko <yantar92@gmail.com> writes:
> Uwe Brauer <oub@mat.ucm.es> writes:
>>> Hmm. I suspect that org-real might not be the problem by itself.
>>> Rather you may load it too early and pull-in built-in org.
>>
>> Well I don't load anything, that is all done by the package system.
> I was just guessing. But do you really have init.el with no requires?
I have a lot of requires in my init file, but non for org-real besides I
have installed a lot of org addons from MELPA and none have caused me
any problem.
So if I understand you correctly. I do load my org package too late for
org-real?
Regards
Uwe
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2021-12-29 8:06 ` [SOLVED] Uwe Brauer
@ 2021-12-29 8:18 ` Ihor Radchenko
0 siblings, 0 replies; 44+ messages in thread
From: Ihor Radchenko @ 2021-12-29 8:18 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
> So if I understand you correctly. I do load my org package too late for
> org-real?
I think so. My speculation:
If the newest Org is not yet in load-path when you load org-real,
org-real's (require 'org) will pull-in built-in version of org-compat.
Later, when load-path points to the newest version of Org, you load
org-persist (org-persist does not exist in built-in version of Org),
which relies on org-file-name-concat to be defined in the newest version
of org-compat. However, built-in version of org-compat is already loaded
by emacs and (require 'org-compat) inside org-persist does not trigger
loading. Hence, you are getting
> Debugger entered--Lisp error: (void-function org-file-name-concat)
Best,
Ihor
^ permalink raw reply [flat|nested] 44+ messages in thread
* how to randomize (scample) regions in a an (org) buffer
@ 2021-10-06 15:53 Uwe Brauer
2021-10-06 16:35 ` [SOLVED] (was: how to randomize (scample) regions in a an (org) buffer) Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2021-10-06 15:53 UTC (permalink / raw)
To: help-gnu-emacs
Hi
I need to replace private information in my org files, but only region wide.
I found
https://www.reddit.com/r/emacs/comments/6pc0ts/sanitize_buffer_by_replacing_words_with_random/
Where two such functions are discussed, one is even for org files,
however only buffer wide and the code looks rather complicated to me.
Anybody knows about such a function?
Thanks
Uwe Brauer
^ permalink raw reply [flat|nested] 44+ messages in thread
* [SOLVED] (was: how to randomize (scample) regions in a an (org) buffer)
2021-10-06 15:53 how to randomize (scample) regions in a an (org) buffer Uwe Brauer
@ 2021-10-06 16:35 ` Uwe Brauer
2021-10-06 19:59 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2021-10-06 16:35 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]
>>> "UB" == Uwe Brauer <oub@mat.ucm.es> writes:
> Hi
> I need to replace private information in my org files, but only region wide.
> I found
> https://www.reddit.com/r/emacs/comments/6pc0ts/sanitize_buffer_by_replacing_words_with_random/
> Where two such functions are discussed, one is even for org files,
> however only buffer wide and the code looks rather complicated to me.
Actually it was quite easy as in
(defun randomise-region ()
"Like `ap/replace-words-randomly', but only replace inside region if it is active.
If the region is not active, replace from point to the end of the
buffer. The region is never considered active outside
`transient-mark-mode'. "
(interactive)
(if (or (and (boundp 'zmacs-region-active-p) zmacs-region-active-p)
(and (boundp 'transient-mark-mode) transient-mark-mode mark-active))
(save-restriction
(save-excursion
(narrow-to-region (point) (mark))
(goto-char (point-min))
(ap/replace-words-randomly)))
(ap/replace-words-randomly)))
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED] (was: how to randomize (scample) regions in a an (org) buffer)
2021-10-06 16:35 ` [SOLVED] (was: how to randomize (scample) regions in a an (org) buffer) Uwe Brauer
@ 2021-10-06 19:59 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-06 20:24 ` [SOLVED] Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-10-06 19:59 UTC (permalink / raw)
To: help-gnu-emacs
Uwe Brauer wrote:
> Actually it was quite easy as in
>
> (defun randomise-region ()
> "Like `ap/replace-words-randomly', but only replace inside region if it is active.
> If the region is not active, replace from point to the end of the
> buffer. The region is never considered active outside
> `transient-mark-mode'. "
> (interactive)
> (if (or (and (boundp 'zmacs-region-active-p) zmacs-region-active-p)
> (and (boundp 'transient-mark-mode) transient-mark-mode mark-active))
> (save-restriction
> (save-excursion
> (narrow-to-region (point) (mark))
> (goto-char (point-min))
> (ap/replace-words-randomly)))
> (ap/replace-words-randomly)))
;;; -*- lexical-binding: t -*-
;;;
;;; this file:
;;; http://user.it.uu.se/~embe8573/emacs-init/sort-incal.el
;;; https://dataswamp.org/~incal/emacs-init/sort-incal.el
(require 'edit)
(require 'erc)
(require 'sort)
(setq sort-fold-case t)
(defun sort-second-field (beg end)
(interactive "r")
(sort-fields 2 beg end) )
(defalias 's2f #'sort-second-field)
(defun sort-lines-length (beg end)
(interactive (if (use-region-p)
(list (region-beginning) (region-end))
(list (point-min) (point-max)) ))
(save-excursion
(save-restriction
(narrow-to-region beg end)
(goto-char (point-min))
(sort-subr nil
#'forward-line
#'end-of-line
nil nil
(lambda (a b) (> (- (cdr a) (car a))
(- (cdr b) (car b)) ))))))
(defalias 'sll #'sort-lines-length)
(defun sort-lines-random (beg end)
(interactive "r")
(save-excursion
(save-restriction
(narrow-to-region beg end)
(goto-char (point-min))
(sort-subr nil
#'forward-line
#'end-of-line
nil nil
(lambda (_ __) (zerop (random 2)) )))))
(defalias 'r #'sort-lines-random)
;; test here:
;; aaa
;; ccc
;; bbb
;; ddd
(defun sort-buffer-random ()
(interactive)
(sort-lines-random (point-min) (point-max))
(save-buffer) )
(defun sort-whole-lines (beg end)
(interactive "r")
(save-excursion
(let ((s (progn (goto-char beg) (line-beginning-position)))
(e (progn (goto-char end) (line-end-position))) )
(sort-lines nil s e) )))
(defun sort-buffer-and-save ()
(interactive)
(sort-lines nil (point-min) (point-max))
(save-buffer) )
(defalias 'bs #'sort-buffer-and-save)
(defun insert-string-list (string-list)
(when string-list
(insert (format "%s" (car string-list)))
(dolist (s (cdr string-list))
(insert (format " %s" s)))))
(defun sort-line-words (beg end &optional set-delim)
(interactive "r\nP")
(let*((str (region-to-string))
(delim-str (when set-delim
(read-string "delimiter: ") ))
(str-list (split-string str delim-str))
(sorted (erc-sort-strings str-list)) )
(kill-region beg end)
(if set-delim
(progn
(dolist (s (nreverse (cdr (nreverse sorted))))
(insert (format "%s%s" s delim-str)))
(insert (format "%s" (car (last sorted)))))
(insert-string-list sorted) )))
;;; sort me: a is just string test this
;;; sorted: a is just string test this
;;;
;;; and me with a dash delim: this-is-just-a-test-string
(defun scramble (beg end)
"Shuffle chars in region from BEG to END."
(interactive "r")
(when (use-region-p)
(save-excursion
(let*((str (region-to-string))
(chars (delete "" (split-string str "")))
(rand-chars (sort chars (lambda (_ __) (zerop (random 2))))) )
(delete-region beg end)
(dolist (c rand-chars)
(insert c) )))))
(require 'seq)
(defun scramble-string (str)
"Randomize the characters of a string."
(interactive "sscramble me: ")
(let ((rand-str (seq-sort (lambda (_ __) (zerop (random 2))) str )))
(if (called-interactively-p 'any)
(message rand-str)
rand-str) ))
(defun comic-book-insult ()
(interactive)
(insert (concat (scramble-string "@#$%&") "!")) )
;; (comic-book-insult) ; @#$%&!
;; (comic-book-insult) ; $&#@%!
;; (scramble-string "Hello there, Emacs is very cool piece of software")
;; "aye eposrr lvre olsec,ewfico ceti ftomH hseoa l E"
(provide 'sort-incal)
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2021-10-06 19:59 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-10-06 20:24 ` Uwe Brauer
2021-10-06 20:58 ` [SOLVED] Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2021-10-06 20:24 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1115 bytes --]
>>> "EBvUlftGEte" == Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:
> Uwe Brauer wrote:
>> Actually it was quite easy as in
>>
>> (defun randomise-region ()
>> "Like `ap/replace-words-randomly', but only replace inside region if it is active.
>> If the region is not active, replace from point to the end of the
>> buffer. The region is never considered active outside
>> `transient-mark-mode'. "
>> (interactive)
>> (if (or (and (boundp 'zmacs-region-active-p) zmacs-region-active-p)
>> (and (boundp 'transient-mark-mode) transient-mark-mode mark-active))
>> (save-restriction
>> (save-excursion
>> (narrow-to-region (point) (mark))
>> (goto-char (point-min))
>> (ap/replace-words-randomly)))
>> (ap/replace-words-randomly)))
> ;;; -*- lexical-binding: t -*-
> ;;;
> ;;; this file:
> ;;; http://user.it.uu.se/~embe8573/emacs-init/sort-incal.el
> ;;; https://dataswamp.org/~incal/emacs-init/sort-incal.el
> (require 'edit)
> (require 'erc)
> (require 'sort)
Thanks but the file edit, is missing at least not included in my emacs
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2021-10-06 20:24 ` [SOLVED] Uwe Brauer
@ 2021-10-06 20:58 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-07 7:05 ` [SOLVED] Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-10-06 20:58 UTC (permalink / raw)
To: help-gnu-emacs
Uwe Brauer wrote:
> Thanks but the file edit, is missing at least not included
> in my emacs
You are right, "must" fix the names, try these and only these:
(defun region-to-string ()
"Return the region text as a string. Replace newlines with spaces."
(when (use-region-p)
(let ((beg (region-beginning))
(end (region-end) ))
(let ((text (buffer-substring-no-properties beg end)))
(replace-regexp-in-string "\n" " " text) ))))
(defun scramble (beg end)
"Shuffle chars in region from BEG to END."
(interactive "r")
(when (use-region-p)
(save-excursion
(let*((str (region-to-string))
(chars (delete "" (split-string str "")))
(rand-chars (sort chars (lambda (_ __) (zerop (random 2))))) )
(delete-region beg end)
(dolist (c rand-chars)
(insert c) )))))
(require 'seq)
(defun scramble-string (str)
"Randomize the characters of a string."
(interactive "sscramble me: ")
(let ((rand-str (seq-sort (lambda (_ __) (zerop (random 2))) str )))
(if (called-interactively-p 'any)
(message rand-str)
rand-str) ))
(defun comic-book-insult ()
(interactive)
(insert (concat (scramble-string "@#$%&") "!")) )
;; (comic-book-insult) ; @#$%&!
;; (comic-book-insult) ; $&#@%!
;; (scramble-string "Hello there, Emacs is very cool piece of software")
;; "aye eposrr lvre olsec,ewfico ceti ftomH hseoa l E"
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2021-10-06 20:58 ` [SOLVED] Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-10-07 7:05 ` Uwe Brauer
2021-10-07 8:15 ` [SOLVED] Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2021-10-07 7:05 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 529 bytes --]
>>> "EBvUlftGEte" == Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:
> Uwe Brauer wrote:
>> Thanks but the file edit, is missing at least not included
>> in my emacs
> You are right, "must" fix the names, try these and only these:
Thanks that works nicely, it is a bit different from the package I use
because mine replaces words by some randomly picked words of the same
size yours randomise also the words. Both approaches work, yours is
independent from any external tool, tough.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2021-10-07 7:05 ` [SOLVED] Uwe Brauer
@ 2021-10-07 8:15 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 44+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-10-07 8:15 UTC (permalink / raw)
To: help-gnu-emacs
Uwe Brauer wrote:
>>>> "EBvUlftGEte" == Emanuel Berg via Users list for the GNU
>>> Emacs text editor <help-gnu-emacs@gnu.org> writes:
>
>> Uwe Brauer wrote:
>>> Thanks but the file edit, is missing at least not included
>>> in my emacs
>
>> You are right, "must" fix the names, try these and only these:
>
> Thanks that works nicely, it is a bit different from the package I use
> because mine replaces words by some randomly picked words of the same
> size yours randomise also the words. Both approaches work, yours is
> independent from any external tool, tough.
You mean zmacs-region-active-p and/or
ap/replace-words-randomly ?
Yeah, I don't have either ...
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 44+ messages in thread
* org-ref-insert-cite-link inserts citep
@ 2019-12-11 21:50 Uwe Brauer
2019-12-11 21:58 ` [SOLVED] (was: org-ref-insert-cite-link inserts citep) Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2019-12-11 21:50 UTC (permalink / raw)
To: emacs-orgmode
Hi
I enjoy org-ref, but I struggle to configure org-ref-insert-link.
It inserts, per default, citep
for example
citep:wald84:_gener_relat
How can I change that to plain cite:wald84:_gener_relat
Thanks and regards
Uwe Brauer
^ permalink raw reply [flat|nested] 44+ messages in thread
* org babel: %% [removed source block]
@ 2018-11-29 11:38 Uwe Brauer
2018-11-29 16:32 ` Berry, Charles
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2018-11-29 11:38 UTC (permalink / raw)
To: emacs-orgmode
Hi
I have the following org file
#+BEGIN_SRC matlab :tangle test.m :padline no :results none
function [ll x]=mitest(A0,x0)
% initialization
format long
epsi=1.e-3;
nit=0;
nmaxit=200;
Delta=10;
A=A0;
while Delta>epsi & nit<nmaxit
nit=nit+1; % counter
#+END_SRC
The basic idea is.
That we do.
We also will
#+BEGIN_SRC matlab :tangle test.m :padline no
y=A*x0;
end
#+END_SRC
Now org-babel-tangle works nicely, but when I try to export the org file
to latex via org-export-dispatch
I obtain a latex file in which the source code is removed.
What do I miss??
I am asked in the export process whether I want to evaluate the code,
which I don't since it is a simple function not a code to be evaluated.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: org babel: %% [removed source block]
2018-11-29 11:38 org babel: %% [removed source block] Uwe Brauer
@ 2018-11-29 16:32 ` Berry, Charles
2018-11-29 17:27 ` [SOLVED] (was: org babel: %% [removed source block]) Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Berry, Charles @ 2018-11-29 16:32 UTC (permalink / raw)
To: Uwe Brauer; +Cc: org-mode-email
I cannot reproduce your export issue with org 9.1.14.
You need to provide more details.
Perhaps you have a header-arg set that you have not told us about?
What does C-c C-v C-i report when point is in each of your source blocks? I get
Lang: matlab
Properties:
:header-args nil
:header-args:matlab nil
Header Arguments:
:cache no
:exports code
:hlines no
:noweb no
:padline no
:results none
:session none
:tangle test.m
for the first.
HTH,
Chuck
> On Nov 29, 2018, at 3:38 AM, Uwe Brauer <oub@mat.ucm.es> wrote:
>
>
> Hi
>
> I have the following org file
> #+BEGIN_SRC matlab :tangle test.m :padline no :results none
> function [ll x]=mitest(A0,x0)
> % initialization
> format long
> epsi=1.e-3;
> nit=0;
> nmaxit=200;
> Delta=10;
> A=A0;
> while Delta>epsi & nit<nmaxit
> nit=nit+1; % counter
> #+END_SRC
>
> The basic idea is.
> That we do.
> We also will
>
> #+BEGIN_SRC matlab :tangle test.m :padline no
> y=A*x0;
> end
> #+END_SRC
>
> Now org-babel-tangle works nicely, but when I try to export the org file
> to latex via org-export-dispatch
>
> I obtain a latex file in which the source code is removed.
>
> What do I miss??
>
>
> I am asked in the export process whether I want to evaluate the code,
> which I don't since it is a simple function not a code to be evaluated.
>
>
>
^ permalink raw reply [flat|nested] 44+ messages in thread
* [SOLVED] (was: org babel: %% [removed source block])
2018-11-29 16:32 ` Berry, Charles
@ 2018-11-29 17:27 ` Uwe Brauer
2018-11-29 22:20 ` [SOLVED] Nick Dokos
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2018-11-29 17:27 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 378 bytes --]
>>> "Berry," == Berry, Charles <ccberry@ucsd.edu> writes:
> I cannot reproduce your export issue with org 9.1.14.
> You need to provide more details.
Sorry for the noise. I just realised that a very very long time ago I
installed a function remove-src-blk-export, which, uhh, removes source
blocks.
I removed that function and everything works as expected.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2018-11-29 17:27 ` [SOLVED] (was: org babel: %% [removed source block]) Uwe Brauer
@ 2018-11-29 22:20 ` Nick Dokos
0 siblings, 0 replies; 44+ messages in thread
From: Nick Dokos @ 2018-11-29 22:20 UTC (permalink / raw)
To: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
>>>> "Berry," == Berry, Charles <ccberry@ucsd.edu> writes:
>
> > I cannot reproduce your export issue with org 9.1.14.
> > You need to provide more details.
>
> Sorry for the noise. I just realised that a very very long time ago I
> installed a function remove-src-blk-export, which, uhh, removes source
> blocks.
>
> I removed that function and everything works as expected.
I was going to ask who produced that unfamiliar-looking "%% [removed
source block]" :-) Glad you figured it out.
--
Nick
"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler
^ permalink raw reply [flat|nested] 44+ messages in thread
* export table to html, don't display certain columns
@ 2018-04-04 9:08 Uwe Brauer
2018-04-04 13:25 ` [SOLVED] (was: export table to html, don't display certain columns) Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2018-04-04 9:08 UTC (permalink / raw)
To: emacs-orgmode
Hi
I know that in radio tables I can skip columns like this
% END RECEIVE ORGTBL firmas \begin{comment} #+ORGTBL: SEND firmas
orgtbl-to-latex :skipcols (1) :lend "\\\\ \\hline" :environment
supertabular
However how can I achieve that in tables in org file which I want
to export to html?
Thanks
Uwe Brauer
^ permalink raw reply [flat|nested] 44+ messages in thread
* [SOLVED] (was: export table to html, don't display certain columns)
2018-04-04 9:08 export table to html, don't display certain columns Uwe Brauer
@ 2018-04-04 13:25 ` Uwe Brauer
2018-04-04 13:29 ` [SOLVED] Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2018-04-04 13:25 UTC (permalink / raw)
To: emacs-orgmode
>>> "Uwe" == Uwe Brauer <oub@mat.ucm.es> writes:
> Hi
> I know that in radio tables I can skip columns like this
> % END RECEIVE ORGTBL firmas \begin{comment} #+ORGTBL: SEND firmas
> orgtbl-to-latex :skipcols (1) :lend "\\\\ \\hline" :environment
> supertabular
To answer my own question
| / | / | | | / |
| | Name | Res | Letra | Obs |
|---+-------+-----+-------+-----|
| | Smith | 0 | | |
| | Jones | 1.4 | | |
| | Bond | 5.6 | * | |
All columns starting with / are ignored when exporting. Sorry for the
noise and the double posting.
Uwe Brauer
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [SOLVED]
2018-04-04 13:25 ` [SOLVED] (was: export table to html, don't display certain columns) Uwe Brauer
@ 2018-04-04 13:29 ` Uwe Brauer
0 siblings, 0 replies; 44+ messages in thread
From: Uwe Brauer @ 2018-04-04 13:29 UTC (permalink / raw)
To: emacs-orgmode
> To answer my own question
> | / | / | | | / |
> | | Name | Res | Letra | Obs |
> |---+-------+-----+-------+-----|
> | | Smith | 0 | | |
> | | Jones | 1.4 | | |
> | | Bond | 5.6 | * | |
> All columns starting with / are ignored when exporting. Sorry for the
> noise and the double posting.
That is not entirely correct. Someone (I forgot who it was, sorry)
provided me with the following hack
(add-hook 'org-export-before-processing-hook
'f-ox-filter-table-column-del)
(defun f-ox-filter-table-column-del (back-end)
"Delete the columns $2 to $> marked as \"/\" on a row with \"/\" in $1.
If you want a non-empty column $1 to be deleted make it $2 by
inserting an empty column before or rearrange column order in
some other way. Make sure \"/\" is in $1 again after that."
(while (re-search-forward
"^[ \t]*| +/ +|\\(.*?|\\)?? +\\(/\\) +|" nil t)
(goto-char (match-beginning 2))
(org-table-delete-column)
(beginning-of-line)))
That is very useful and I wonder why there is nothing in org vanilla
(but then it might and I did not find it.)
^ permalink raw reply [flat|nested] 44+ messages in thread
* how do you compose mails in Gnus with org-mode
@ 2018-03-01 13:37 Joseph Vidal-Rosset
2018-03-03 11:57 ` Thorsten Jolitz
0 siblings, 1 reply; 44+ messages in thread
From: Joseph Vidal-Rosset @ 2018-03-01 13:37 UTC (permalink / raw)
To: emacs-orgmode list
Hello,
I know that the subject of my email exists already.
[[https://lists.gnu.org/archive/html/emacs-orgmode/2009-08/msg00855.html]]
But I'm loosing to much time in searching the solution of my
"problem". I would be happy to get in Gnus the same function that exists
in mu4e that is org-mu4e-compose-org-mode. Supposing that I want to reply
to an email, I would be glad to write my reply in a org file and, once
finished this reply, going back to gnus to be able to org-mime-htmlize
it and send it.
At the moment the only solution that I have is to quit gnus in order to
make an org file that I copy and paste in the reply. I am convinced that
a better solution exists, but I am unable to find it (ideally the org
file for such a reply would contain the bibliography link by default).
Your help will be very welcome,
Best wishes,
Jo.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: how do you compose mails in Gnus with org-mode
2018-03-01 13:37 how do you compose mails in Gnus with org-mode Joseph Vidal-Rosset
@ 2018-03-03 11:57 ` Thorsten Jolitz
2018-03-06 10:12 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Thorsten Jolitz @ 2018-03-03 11:57 UTC (permalink / raw)
To: emacs-orgmode
Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com> writes:
Hallo
> I know that the subject of my email exists already.
> [[https://lists.gnu.org/archive/html/emacs-orgmode/2009-08/msg00855.html]]
This works perfectly for your subject:
,----[ C-h f outorg-edit-as-org RET ]
| outorg-edit-as-org is an interactive Lisp function in ‘outorg.el’.
|
| It is bound to M-# #, <menu-bar> <Outshine> <Edit As Org>.
|
| (outorg-edit-as-org &optional ARG)
|
| Convert and copy to temporary Org buffer
|
| With ARG, act conditional on the raw value of ARG:
|
| | prefix | raw | action 1 | action 2 |
| |--------+-----+-------------------+--------------------------------|
| | C-u | (4) | edit-whole-buffer | --- |
| | C-1 | 1 | edit-whole-buffer | insert default export-template |
| | C-2 | 2 | edit-whole-buffer | prompt user for template-file |
| | C-3 | 3 | edit-whole-buffer | insert & keep default template |
| | C-4 | 4 | edit-whole-buffer | insert & keep template-file |
| | C-5 | 5 | propagate changes | --- |
|
| [back]
`----
It has already been described several time how to configure
outshine/outorg that it works with message-mode too.
Its actually quite easy. Configure outshine like described in the
README, and add outline-minor-mode to message-mode-hook in your .emacs.
,----
| (add-hook 'emacs-lisp-mode-hook 'outline-minor-mode)
| (add-hook 'message-mode-hook 'outline-minor-mode))
`----
Then with M-# # your email (open in message-mode, gnus) will be opened
in an org-mode buffer for editing in org-mode.
Looks very similar to opening a source-block in org-mode to edit the
sources in the programming language mode.
,----
| [ *unsent followup to Joseph Vidal-Rosset on gmane.emacs.orgmode* ]
| Exit with M-# (Meta-Key and #)
| * --text follows this line--
| Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com> writes:
|
| Hallo
|
| > I know that the subject of my email exists already.
| > https://lists.gnu.org/archive/html/emacs-orgmode/2009-08/msg00855.html
|
| This works perfectly for your subject: [...]
`----
and tells you how to exit again: M-#
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: how do you compose mails in Gnus with org-mode
2018-03-03 11:57 ` Thorsten Jolitz
@ 2018-03-06 10:12 ` Uwe Brauer
2018-03-06 18:24 ` Thorsten Jolitz
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2018-03-06 10:12 UTC (permalink / raw)
To: emacs-orgmode
>>> "Thorsten" == Thorsten Jolitz <tjolitz@gmail.com> writes:
> Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com> writes:
> Hallo
>> I know that the subject of my email exists already.
>> [[https://lists.gnu.org/archive/html/emacs-orgmode/2009-08/msg00855.html]]
> This works perfectly for your subject:
I just realised that you are the author of that package. Sorry.
I set
(require 'outorg)
(require 'outshine)
(add-hook 'outline-minor-mode-hook 'outshine-hook-function)
(add-hook 'message-mode-hook 'outline-minor-mode)
But when I fire up outorg-edit-as-org in a reply message I obtain the
error I described in my earlier message.
Uwe Brauer
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: how do you compose mails in Gnus with org-mode
2018-03-06 10:12 ` Uwe Brauer
@ 2018-03-06 18:24 ` Thorsten Jolitz
2018-03-06 19:01 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Thorsten Jolitz @ 2018-03-06 18:24 UTC (permalink / raw)
To: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
>>>> "Thorsten" == Thorsten Jolitz <tjolitz@gmail.com> writes:
>
> > Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com> writes:
> > Hallo
>
> >> I know that the subject of my email exists already.
> >> [[https://lists.gnu.org/archive/html/emacs-orgmode/2009-08/msg00855.html]]
>
> > This works perfectly for your subject:
>
> I just realised that you are the author of that package. Sorry.
>
> I set
>
> (require 'outorg)
> (require 'outshine)
> (add-hook 'outline-minor-mode-hook 'outshine-hook-function)
>
> (add-hook 'message-mode-hook 'outline-minor-mode)
ok, maybe I answered the wrong message, does not look that incomplete
actually. Maybe try a copy of my config.
I used outorg-edit-as-org to insert and evaluate these source blocks
directly in this email, so for me it works:
#+BEGIN_SRC emacs-lisp
(emacs-version)
#+END_SRC
#+results:
: GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
: of 2018-02-09
#+BEGIN_SRC emacs-lisp
(org-version)
#+END_SRC
#+results:
: 8.2.10
#+BEGIN_SRC emacs-lisp
(gnus-version)
#+END_SRC
#+results:
: Gnus v5.13
> But when I fire up outorg-edit-as-org in a reply message I obtain the
> error I described in my earlier message.
>
> Uwe Brauer
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: how do you compose mails in Gnus with org-mode
2018-03-06 18:24 ` Thorsten Jolitz
@ 2018-03-06 19:01 ` Uwe Brauer
2018-03-06 19:36 ` Thorsten Jolitz
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2018-03-06 19:01 UTC (permalink / raw)
To: emacs-orgmode
>>> "Thorsten" == Thorsten Jolitz <tjolitz@gmail.com> writes:
> Uwe Brauer <oub@mat.ucm.es> writes:
>>>>> "Thorsten" == Thorsten Jolitz <tjolitz@gmail.com> writes:
>>
>> > Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com> writes:
>> > Hallo
>>
>> >> I know that the subject of my email exists already.
>> >> [[https://lists.gnu.org/archive/html/emacs-orgmode/2009-08/msg00855.html]]
>>
>> > This works perfectly for your subject:
>>
>> I just realised that you are the author of that package. Sorry.
>>
>> I set
>>
>> (require 'outorg)
>> (require 'outshine)
>> (add-hook 'outline-minor-mode-hook 'outshine-hook-function)
>>
>> (add-hook 'message-mode-hook 'outline-minor-mode)
> ok, maybe I answered the wrong message, does not look that incomplete
> actually. Maybe try a copy of my config.
> I used outorg-edit-as-org to insert and evaluate these source blocks
> directly in this email, so for me it works:
I still can't
> #+BEGIN_SRC emacs-lisp
> (emacs-version)
> #+END_SRC
> #+results:
> : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
> : of 2018-02-09
GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2018-01-25"
> #+BEGIN_SRC emacs-lisp
> (org-version)
> #+END_SRC
Git master from June 2017 so relatively recent
> #+results:
> : 8.2.10
> #+BEGIN_SRC emacs-lisp
> (gnus-version)
> #+END_SRC
> #+results:
> : Gnus v5.13
The same here.
>> But when I fire up outorg-edit-as-org in a reply message I obtain the
>> error I described in my earlier message.
>>
>> Uwe Brauer
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: how do you compose mails in Gnus with org-mode
2018-03-06 19:01 ` Uwe Brauer
@ 2018-03-06 19:36 ` Thorsten Jolitz
2018-03-07 9:57 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Thorsten Jolitz @ 2018-03-06 19:36 UTC (permalink / raw)
To: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
>>>> "Thorsten" == Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> Uwe Brauer <oub@mat.ucm.es> writes:
>>>>>> "Thorsten" == Thorsten Jolitz <tjolitz@gmail.com> writes:
>>>
>>> > Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com> writes:
>>> > Hallo
>>>
>>> >> I know that the subject of my email exists already.
>>> >> [[https://lists.gnu.org/archive/html/emacs-orgmode/2009-08/msg00855.html]]
>>>
>>> > This works perfectly for your subject:
>>>
>>> I just realised that you are the author of that package. Sorry.
>>>
>>> I set
>>>
>>> (require 'outorg)
>>> (require 'outshine)
>>> (add-hook 'outline-minor-mode-hook 'outshine-hook-function)
>>>
>>> (add-hook 'message-mode-hook 'outline-minor-mode)
>
>> ok, maybe I answered the wrong message, does not look that incomplete
>> actually. Maybe try a copy of my config.
>
>> I used outorg-edit-as-org to insert and evaluate these source blocks
>> directly in this email, so for me it works:
> I still can't
>
>> #+BEGIN_SRC emacs-lisp
>> (emacs-version)
>> #+END_SRC
>
>
>> #+results:
>> : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
>> : of 2018-02-09
>
>
> GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d
> scroll bars)
> of 2018-01-25"
Wow, emacs 27 ... I'm on Archlinux and always thought packages a pretty
up-to-date.
Maybe outline has changed somehow between Emacs 25 and Emacs 27?
But I don't think so, the error you send is pretty typical for
incomplete configuration.
> Debugger entered--Lisp error: (error "Before first heading")
> signal(error ("Before first heading"))
> error("Before first heading")
> outline-back-to-heading()
is typical when
,----
| outorg-prepare-message-mode-buffer-for-editing ()
`----
has not run, it turns this line into a 1st level org headline thus
converting any kind of message body into an org file.
,----
| * --text follows this line--
| Uwe Brauer <oub@mat.ucm.es> writes:
`----
without this, the error is justified - an org file without a single
org headline is no org file at all.
You could try to write an email with these lines:
,----
| * 1st level
| ** 2nd level
| some text
`----
put point on some text an call outorg, to see if it works.
Another option would be to use edebug:
open outorg.el, put point into 'outorg-edit-as-org', and call M-x
edebug-defun. Then convert an email again, and go step-by-step with
SPACE key, and see how far you get.
When done, call 'load-library' on outorg.el to get rid of edebug
instrumentation.
>> #+BEGIN_SRC emacs-lisp
>> (org-version)
>> #+END_SRC
>
> Git master from June 2017 so relatively recent
>
>> #+results:
>> : 8.2.10
>
>> #+BEGIN_SRC emacs-lisp
>> (gnus-version)
>> #+END_SRC
>
>> #+results:
>> : Gnus v5.13
>
> The same here.
>
>>> But when I fire up outorg-edit-as-org in a reply message I obtain the
>>> error I described in my earlier message.
>>>
>>> Uwe Brauer
>
>
>
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: how do you compose mails in Gnus with org-mode
2018-03-06 19:36 ` Thorsten Jolitz
@ 2018-03-07 9:57 ` Uwe Brauer
2018-03-07 17:46 ` Thorsten Jolitz
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2018-03-07 9:57 UTC (permalink / raw)
To: emacs-orgmode
> Uwe Brauer <oub@mat.ucm.es> writes:
> Wow, emacs 27 ... I'm on Archlinux and always thought packages a pretty
> up-to-date.
Right Ubuntu officially only ships 24, which is pretty old.
Well it is directly form git master, so it is a pre release.
The official release is 26.
> Maybe outline has changed somehow between Emacs 25 and Emacs 27?
> But I don't think so, the error you send is pretty typical for
> incomplete configuration.
I think at the weekend, I will debug the problem. It might be that there
some parts of my init file which are in conflict with your package.
> is typical when
> ,----
> | outorg-prepare-message-mode-buffer-for-editing ()
> `----
> has not run, it turns this line into a 1st level org headline thus
> converting any kind of message body into an org file.
> ,----
> | * --text follows this line--
> | Uwe Brauer <oub@mat.ucm.es> writes:
> `----
> without this, the error is justified - an org file without a single
> org headline is no org file at all.
> You could try to write an email with these lines:
> ,----
> | * 1st level
> | ** 2nd level
> | some text
> `----
> put point on some text an call outorg, to see if it works.
ok
> Another option would be to use edebug:
> open outorg.el, put point into 'outorg-edit-as-org', and call M-x
> edebug-defun. Then convert an email again, and go step-by-step with
> SPACE key, and see how far you get.
Right.
BTW, you recommended
(require 'outorg-export)
I installed your package via the package system, so I don't see that
file. Where can I obtain it from?
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: how do you compose mails in Gnus with org-mode
2018-03-07 9:57 ` Uwe Brauer
@ 2018-03-07 17:46 ` Thorsten Jolitz
2018-03-08 8:50 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Thorsten Jolitz @ 2018-03-07 17:46 UTC (permalink / raw)
To: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
> > Uwe Brauer <oub@mat.ucm.es> writes:
>
> > Wow, emacs 27 ... I'm on Archlinux and always thought packages a
> > pretty
> > up-to-date.
>
> Right Ubuntu officially only ships 24, which is pretty old.
>
> Well it is directly form git master, so it is a pre release.
> The official release is 26.
Then Archlinux is not that much out of date.
> > Maybe outline has changed somehow between Emacs 25 and Emacs 27?
> > But I don't think so, the error you send is pretty typical for
> > incomplete configuration.
>
> I think at the weekend, I will debug the problem. It might be that there
> some parts of my init file which are in conflict with your package.
A good start would be to try outshine with emacs-lisp mode.
With your outshine config done, write a file like foo.el
,----
| ;;; 1st level header
| ;;;; Sum
| (+ 1 1)
| ;;;; Subtract
| (- 2 1)
`----
or
,----
| ;; * 1st level header
| ;; ** Sum
| (+ 1 1)
| ;; ** Subtract
| (- 2 1)
`----
and see if you got headline fontification and all the outshine
functionality.
If that works, its a message-mode problem.
If not, a genereal problem with your config.
> [...]
> BTW, you recommended
> (require 'outorg-export)
>
> I installed your package via the package system, so I don't see that
> file. Where can I obtain it from?
It's an extension to outorg:
,----
| ;;; outorg-export.el -- Automated exporting through org
|
| ;; Author: Jonathan Leech-Pepin <jonathan.leechpepin AT gmail DOT com
| ;; Version: 0.1
| ;; URL: https://github.com/jleechpe/outorg-export
|
| ;;;; MetaData
| ;; :PROPERTIES:
| ;; :copyright: Jonathan Leech-Pepin
| ;; :copyright-years: 2014+
| ;; :version: 0.3
| ;; :licence: GPLv3 or later
| ;; :licence-url: http://www.gnu.org/licenses/
| ;; :part-of-emacs: no
| ;; :author: Jonathan Leech-Pepin
| ;; :author_email: jonathan.leechpepin AT gmail DOT com
| ;; :keywords: emacs org-mode export
| ;; :END:
`----
This is the README
,----
| outorg-export
| =============
|
| Automated exporting of sections of source files to any format org can export to.
`----
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: how do you compose mails in Gnus with org-mode
2018-03-07 17:46 ` Thorsten Jolitz
@ 2018-03-08 8:50 ` Uwe Brauer
2018-03-08 16:58 ` Thorsten Jolitz
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2018-03-08 8:50 UTC (permalink / raw)
To: emacs-orgmode
>>> "Thorsten" == Thorsten Jolitz <tjolitz@gmail.com> writes:
> Uwe Brauer <oub@mat.ucm.es> writes:
>> > Uwe Brauer <oub@mat.ucm.es> writes:
>>
>> > Wow, emacs 27 ... I'm on Archlinux and always thought packages a
>> > pretty
>> > up-to-date.
>>
>> Right Ubuntu officially only ships 24, which is pretty old.
>>
>> Well it is directly form git master, so it is a pre release.
>> The official release is 26.
> Then Archlinux is not that much out of date.
>> > Maybe outline has changed somehow between Emacs 25 and Emacs 27?
>> > But I don't think so, the error you send is pretty typical for
>> > incomplete configuration.
>>
>> I think at the weekend, I will debug the problem. It might be that there
>> some parts of my init file which are in conflict with your package.
> A good start would be to try outshine with emacs-lisp mode.
> With your outshine config done, write a file like foo.el
> ,----
> | ;;; 1st level header
> | ;;;; Sum
> | (+ 1 1)
> | ;;;; Subtract
> | (- 2 1)
> `----
> or
> ,----
> | ;; * 1st level header
> | ;; ** Sum
> | (+ 1 1)
> | ;; ** Subtract
> | (- 2 1)
> `----
> and see if you got headline fontification and all the outshine
> functionality.
That seems to work, I opened your outorg buffer and there everything
worked as expected.
> If that works, its a message-mode problem.
> If not, a genereal problem with your config.
>> [...]
>> BTW, you recommended
>> (require 'outorg-export)
>>
>> I installed your package via the package system, so I don't see that
>> file. Where can I obtain it from?
> It's an extension to outorg:
Where can I find it, only in that site? It seems not to be in elpa/melpa
and marmelade.
Thanks for the pointer
Uwe
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: how do you compose mails in Gnus with org-mode
2018-03-08 8:50 ` Uwe Brauer
@ 2018-03-08 16:58 ` Thorsten Jolitz
2018-03-09 21:49 ` [SOLVED] (was: how do you compose mails in Gnus with org-mode) Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Thorsten Jolitz @ 2018-03-08 16:58 UTC (permalink / raw)
To: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
>>>> "Thorsten" == Thorsten Jolitz <tjolitz@gmail.com> writes:
>
> > A good start would be to try outshine with emacs-lisp mode.
> > With your outshine config done, write a file like foo.el
>
> > ,----
> > | ;;; 1st level header
> > | ;;;; Sum
> > | (+ 1 1)
> > | ;;;; Subtract
> > | (- 2 1)
> > `----
>
> > or
>
> > ,----
> > | ;; * 1st level header
> > | ;; ** Sum
> > | (+ 1 1)
> > | ;; ** Subtract
> > | (- 2 1)
> > `----
>
> > and see if you got headline fontification and all the outshine
> > functionality.
>
> That seems to work, I opened your outorg buffer and there everything
> worked as expected.
>
>
> > If that works, its a message-mode problem.
> > If not, a genereal problem with your config.
When I do M-# # writing this mail I see:
,----
| [ *unsent followup to Uwe Brauer on gmane.emacs.orgmode* ] Exit with M-#
| (Meta-Key and #)
| * --text follows this line--
| Uwe Brauer <oub@mat.ucm.es> writes: ...[]
`----
I suggest edebug then, as written, this must run successfully:
,----[ C-h f outorg-prepare-message-mode-buffer-for-editing RET ]
| outorg-prepare-message-mode-buffer-for-editing is a Lisp function in
| ‘outorg.el’.
|
| (outorg-prepare-message-mode-buffer-for-editing)
|
| Prepare an unsent-mail in a message-mode buffer for outorg.
|
| This function assumes that ’--text follows this line--’ (or
| whatever is found inside variable ‘mail-header-separator’) is the
| first line below the message header, is always present, and never
| modified by the user. It turns this line into an ‘outshine’
| headline and out-comments all text below this line - if any.
`----
> >> [...]
> >> BTW, you recommended
> >> (require 'outorg-export)
> >>
> >> I installed your package via the package system, so I don't see that
> >> file. Where can I obtain it from?
>
> > It's an extension to outorg:
>
> Where can I find it, only in that site? It seems not to be in elpa/melpa
> and marmelade.
Only available via github I think ....
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 44+ messages in thread
* [SOLVED] (was: how do you compose mails in Gnus with org-mode)
2018-03-08 16:58 ` Thorsten Jolitz
@ 2018-03-09 21:49 ` Uwe Brauer
2018-03-09 22:59 ` [SOLVED] Thorsten Jolitz
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2018-03-09 21:49 UTC (permalink / raw)
To: emacs-orgmode
> Uwe Brauer <oub@mat.ucm.es> writes:
> When I do M-# # writing this mail I see:
> ,----
> | [ *unsent followup to Uwe Brauer on gmane.emacs.orgmode* ] Exit with M-#
> | (Meta-Key and #)
> | * --text follows this line--
> | Uwe Brauer <oub@mat.ucm.es> writes: ...[]
> `----
I found the culprit
(setq message-yank-prefix " > ")
No idea why I had this, but may be it is ages there. Just moving it out
my init files and everything worked as expected. Thanks
Uwe
^ permalink raw reply [flat|nested] 44+ messages in thread
* emacs hebrew script bidi nikud rendering bugs
@ 2015-11-06 19:36 Mark David
2015-11-07 9:41 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Mark David @ 2015-11-06 19:36 UTC (permalink / raw)
To: emacs-devel@gnu.org
I want to report and maybe fix bugs in rendering Hebrew script, particularly with diacritics (nikud). It only partially works in environments I'm using (Ubunutu, Emacs 25.x). (Hebrew without diacritics, used for everyday Hebrew language writing, is evidently functioning well.) Is there a mailing list best suited for that? Is there a separate development team for that kind of thing? Where would I report, say, inability to correctly render a sequence of Hebrew base character and diacritic like this
Unicode Character 'HEBREW LETTER ALEF' (U+05D0)
Unicode Character 'HEBREW POINT QAMATS' (U+05B8)
(with a given font, window system, OS, "multlingual environment" setting, etc.)?
Thanks,
Mark
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: emacs hebrew script bidi nikud rendering bugs
2015-11-06 19:36 emacs hebrew script bidi nikud rendering bugs Mark David
@ 2015-11-07 9:41 ` Uwe Brauer
2015-11-07 11:36 ` Eli Zaretskii
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-11-07 9:41 UTC (permalink / raw)
To: emacs-devel
>>> "Mark" == Mark David <markhd@fastmail.fm> writes:
> I want to report and maybe fix bugs in rendering Hebrew script,
> particularly with diacritics (nikud). It only partially works in
> environments I'm using (Ubunutu, Emacs 25.x). (Hebrew without
> diacritics, used for everyday Hebrew language writing, is evidently
> functioning well.) Is there a mailing list best suited for that? Is
> there a separate development team for that kind of thing? Where would
> I report, say, inability to correctly render a sequence of Hebrew base
> character and diacritic like this
> Unicode Character 'HEBREW LETTER ALEF' (U+05D0)
> Unicode Character 'HEBREW POINT QAMATS' (U+05B8)
I am not sure what you mean by rendered correctly.
Let A=aleph
^=QAMATS
Then for example OpenOffice displays this correctly as
A
^
while Emacs 25 (and 24.5) displays it as
A
^
That is what you mean? (Not sure whether to write hebrew+niqqud on the
list)
Remark: using xelatex the hebrew text with niqquds get compiled and the
pdf displays the niqqud correctly.
Uwe Brauer
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: emacs hebrew script bidi nikud rendering bugs
2015-11-07 9:41 ` Uwe Brauer
@ 2015-11-07 11:36 ` Eli Zaretskii
2015-11-07 17:27 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Eli Zaretskii @ 2015-11-07 11:36 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-devel
> From: Uwe Brauer <oub@mat.ucm.es>
> Date: Sat, 07 Nov 2015 09:41:46 +0000
>
> >>> "Mark" == Mark David <markhd@fastmail.fm> writes:
>
> > I want to report and maybe fix bugs in rendering Hebrew script,
> > particularly with diacritics (nikud). It only partially works in
> > environments I'm using (Ubunutu, Emacs 25.x). (Hebrew without
> > diacritics, used for everyday Hebrew language writing, is evidently
> > functioning well.) Is there a mailing list best suited for that? Is
> > there a separate development team for that kind of thing? Where would
> > I report, say, inability to correctly render a sequence of Hebrew base
> > character and diacritic like this
>
> > Unicode Character 'HEBREW LETTER ALEF' (U+05D0)
>
> > Unicode Character 'HEBREW POINT QAMATS' (U+05B8)
>
> I am not sure what you mean by rendered correctly.
>
> Let A=aleph
> ^=QAMATS
>
> Then for example OpenOffice displays this correctly as
>
> A
> ^
> while Emacs 25 (and 24.5) displays it as
>
> A
> ^
Not here: I see A, as expected.
^
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: emacs hebrew script bidi nikud rendering bugs
2015-11-07 11:36 ` Eli Zaretskii
@ 2015-11-07 17:27 ` Uwe Brauer
2015-11-07 18:00 ` Eli Zaretskii
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-11-07 17:27 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 407 bytes --]
> Not here: I see A, as expected.
> ^
You are right for 25, at least partially. I my default font is
'(default ((t (:family "DejaVu Sans Mono" :foundry "unknown" :slant
normal :weight normal :height 143 :width normal))))
And I don't see *all* niqqud correctly. I attach a screenshot with the
misplaced niqqud of a latex file and a pdf file where they are displayed
correctly.
[-- Attachment #2: niqqud.png --]
[-- Type: image/png, Size: 14507 bytes --]
[-- Attachment #3: testheb.pdf --]
[-- Type: application/pdf, Size: 17688 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: emacs hebrew script bidi nikud rendering bugs
2015-11-07 17:27 ` Uwe Brauer
@ 2015-11-07 18:00 ` Eli Zaretskii
2015-11-07 18:32 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Eli Zaretskii @ 2015-11-07 18:00 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-devel
> From: Uwe Brauer <oub@mat.ucm.es>
> Date: Sat, 07 Nov 2015 17:27:57 +0000
>
> > Not here: I see A, as expected.
> > ^
>
> You are right for 25, at least partially. I my default font is
> '(default ((t (:family "DejaVu Sans Mono" :foundry "unknown" :slant
> normal :weight normal :height 143 :width normal))))
The default font is not what matters. You should find out which
font(s) is/are used to display the problematic character combinations.
Emacs cannot compose characters that are displayed by different fonts.
Use "C-u C-x =" to show the font for each character.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: emacs hebrew script bidi nikud rendering bugs
2015-11-07 18:00 ` Eli Zaretskii
@ 2015-11-07 18:32 ` Uwe Brauer
2015-11-07 18:52 ` Eli Zaretskii
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-11-07 18:32 UTC (permalink / raw)
To: emacs-devel
> The default font is not what matters. You should find out which
> font(s) is/are used to display the problematic character combinations.
> Emacs cannot compose characters that are displayed by different fonts.
> Use "C-u C-x =" to show the font for each character.
Out of curiosity, are all niqqud displayed correctly in your setting?
- First of all the ones which work
for example aleph+qamats: I obtain
,----
|
| position: 431 of 708 (61%), column: 12
| character: א (displayed as א) (codepoint 1488, #o2720, #x5d0)
| preferred charset: unicode (Unicode (ISO10646))
| code point in charset: 0x05D0
| script: hebrew
| syntax: w which means: word
| category: .:Base, R:Right-to-left (strong)
| to input: type "C-x 8 RET 5d0" or "C-x 8 RET HEBREW LETTER ALEF"
| buffer code: #xD7 #x90
| file code: #xD7 #x90 (encoded by coding system utf-8-unix)
| display: composed to form "אָ" (see below)
|
| Composed with the following character(s) "ָ" using this font:
| xft:-unknown-DejaVu Sans-normal-normal-normal-*-19-*-*-*-*-0-iso10646-1
| by these glyphs:
| [0 1 64303 4765 13 2 11 10 3 nil]
|
| Character code properties: customize what to show
| name: HEBREW LETTER ALEF
| general-category: Lo (Letter, Other)
| decomposition: (1488) ('א')
|
| There are text properties here:
| fontified t
`----
- now to aleph+qubuts where qubuts is not displayed directly under
the aleph. Cursor on the aleph
,----
|
| position: 464 of 708 (65%), column: 12
| character: א (displayed as א) (codepoint 1488, #o2720, #x5d0)
| preferred charset: unicode (Unicode (ISO10646))
| code point in charset: 0x05D0
| script: hebrew
| syntax: w which means: word
| category: .:Base, R:Right-to-left (strong)
| to input: type "C-x 8 RET 5d0" or "C-x 8 RET HEBREW LETTER ALEF"
| buffer code: #xD7 #x90
| file code: #xD7 #x90 (encoded by coding system utf-8-unix)
| display: composed to form "אֻ" (see below)
|
| Composed with the following character(s) "ֻ" using this font:
| xft:-unknown-DejaVu Sans-normal-normal-normal-*-19-*-*-*-*-0-iso10646-1
| by these glyphs:
| [0 1 1488 1316 13 2 11 10 0 nil]
| [0 1 1467 1305 0 2 11 -2 5 nil]
|
| Character code properties: customize what to show
| name: HEBREW LETTER ALEF
| general-category: Lo (Letter, Other)
| decomposition: (1488) ('א')
|
| There are text properties here:
| fontified t
|
| [back]
`----
I fail to see the difference.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: emacs hebrew script bidi nikud rendering bugs
2015-11-07 18:32 ` Uwe Brauer
@ 2015-11-07 18:52 ` Eli Zaretskii
2015-11-08 9:05 ` [SOLVED] (was: emacs hebrew script bidi nikud rendering bugs) Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Eli Zaretskii @ 2015-11-07 18:52 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-devel
> From: Uwe Brauer <oub@mat.ucm.es>
> Date: Sat, 07 Nov 2015 18:32:05 +0000
>
>
>
> > The default font is not what matters. You should find out which
> > font(s) is/are used to display the problematic character combinations.
> > Emacs cannot compose characters that are displayed by different fonts.
> > Use "C-u C-x =" to show the font for each character.
>
> Out of curiosity, are all niqqud displayed correctly in your setting?
Yes.
> I fail to see the difference.
Right, it seems to be a problem with the shaping engine. Try
upgrading libotf, libm17n-flt, and m17n-db. If that doesn't help,
please submit a bug report to their bug tracker.
^ permalink raw reply [flat|nested] 44+ messages in thread
* vc-next-action RCS vs hg: copies the entry of ChangeLog
@ 2015-10-15 6:48 Uwe Brauer
2015-10-18 8:25 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-10-15 6:48 UTC (permalink / raw)
To: emacs-devel
Hi
Switching from RCS to HG I noted a difference.
If in RCS I run vc-next-action for checking in, Emacs copies into the
vc-log the content of the most recent ChangeLog. Using the HG backend
this behaviour is absent. Any possibility to enable it?
Thanks
Uwe Brauer
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
@ 2015-10-18 8:25 ` Uwe Brauer
2015-10-18 9:50 ` Dmitry Gutov
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-10-18 8:25 UTC (permalink / raw)
To: emacs-devel
>>> "Dmitry" == Dmitry Gutov <dgutov@yandex.ru> writes:
> On 10/18/2015 10:02 AM, Uwe Brauer wrote:
>> Do you mean that if you use vc-log-print you see the content of the ChangeLog?
> I mean that when I make changes to a Hg-controlled file, save, add
> an entry to the nearby ChangeLog file, switch back to the source
> file and press `C-x v v', the entry from the ChangeLog file is
> added to the opened buffer (where you edit the commit message).
This is also my case!
> I haven't actually tried committing and then looking at the log, but
> why wouldn't it be there?
Well I just repeated your steps and then run a vc-print-log to see
changeset: 34:8d6c1d9fcc44
branch: banch-pub
tag: tip
user: Uwe Brauer <oub@mat.ucm.es>
date: Sun Oct 18 11:21:55 2015 +0300
summary: try out
But the change log contains
2015-10-18 Uwe Brauer <oub@mat.ucm.es>
* section-0002.tex (subsection{Weight._Sobol._fract._order_their}
{} {}):
test
Which is *not* displayed.
It is displayed if the file is under RCS!
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-18 8:25 ` Uwe Brauer
@ 2015-10-18 9:50 ` Dmitry Gutov
2015-10-18 13:06 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Dmitry Gutov @ 2015-10-18 9:50 UTC (permalink / raw)
To: emacs-devel
On 10/18/2015 11:25 AM, Uwe Brauer wrote:
> But the change log contains
> 2015-10-18 Uwe Brauer <oub@mat.ucm.es>
>
> * section-0002.tex (subsection{Weight._Sobol._fract._order_their}
> {} {}):
> test
>
> Which is *not* displayed.
>
> It is displayed if the file is under RCS!
Turns out, the problem is that vc-hg-print-log doesn't display multiline
messages, just the first line.
Mercurial is weird.
The easiest way to display them is to pass -v to 'hg log'. However, that
will also display the list of files touched by the commit, which can be
long, and it's pretty annoying.
To avoid that, https://bz.mercurial-scm.org/show_bug.cgi?id=688 suggests
using the --template argument, to indicate exactly what to output.
If someone were to look into it and tell us what template format
corresponds to "current output plus long commit message", that would be
helpful. Preferably, both for "short" and "long" types of output (see
vc-hg-print-log).
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-18 9:50 ` Dmitry Gutov
@ 2015-10-18 13:06 ` Uwe Brauer
2015-10-18 20:04 ` Dmitry Gutov
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-10-18 13:06 UTC (permalink / raw)
To: emacs-devel
> On 10/18/2015 11:25 AM, Uwe Brauer wrote:
> Turns out, the problem is that vc-hg-print-log doesn't display
> multiline messages, just the first line.
> Mercurial is weird.
> The easiest way to display them is to pass -v to 'hg log'. However,
> that will also display the list of files touched by the commit, which
> can be long, and it's pretty annoying.
> To avoid that, https://bz.mercurial-scm.org/show_bug.cgi?id=688
> suggests using the --template argument, to indicate exactly what to
> output.
> If someone were to look into it and tell us what template format
> corresponds to "current output plus long commit message", that would
> be helpful. Preferably, both for "short" and "long" types of output
> (see vc-hg-print-log).
Hi it seems that
hg log --template "commit {node}\nAuthor : {author}\nDate: {date|rfc822date}\n\n{desc}\n\n{nofiles}\n"
Does more or less what
git log does
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-18 13:06 ` Uwe Brauer
@ 2015-10-18 20:04 ` Dmitry Gutov
2015-10-19 6:55 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Dmitry Gutov @ 2015-10-18 20:04 UTC (permalink / raw)
To: emacs-devel
On 10/18/2015 04:06 PM, Uwe Brauer wrote:
> hg log --template "commit {node}\nAuthor : {author}\nDate: {date|rfc822date}\n\n{desc}\n\n{nofiles}\n"
Thank you, that's a step in the right direction. But do we really want
to change Hg's log output beyond showing multiline messages?
Because if it's going to have more changes, at the very least, we'll
need to adjust the font-lock rules as well (vc-hg-log-view-mode applies
certain amount of highlighting).
Though if the output as exactly like Git's, we could use those.
The current changeset value format, containing both the numeric revision
number and its hash, seems like it might be more useful as well.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-18 20:04 ` Dmitry Gutov
@ 2015-10-19 6:55 ` Uwe Brauer
2015-10-19 7:07 ` Eli Zaretskii
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-10-19 6:55 UTC (permalink / raw)
To: emacs-devel
>>> "Dmitry" == Dmitry Gutov <dgutov@yandex.ru> writes:
> On 10/18/2015 04:06 PM, Uwe Brauer wrote:
>> hg log --template "commit {node}\nAuthor : {author}\nDate: {date|rfc822date}\n\n{desc}\n\n{nofiles}\n"
> Thank you, that's a step in the right direction. But do we really want
> to change Hg's log output beyond showing multiline messages?
I am right now confused. I go to the Emacs git trunc, switch into the
lisp directory:
the latest ChangeLog is ChangeLog.17
its most recent entry (this is not the most update git version of emacs) is
,----
| 2015-04-06 Alan Mackenzie <acm@muc.de>
|
| Fix miscellaneous glitches in cc-mode.el. (Bug#20245)
| * progmodes/cc-mode.el (c-common-init): bind [Snip]
`----
However when I run git log in that directory I see
,----
| commit 09c15856a926eb80106a5c42571660601c2167d6
| Author: Glenn Morris <rgm@gnu.org>
| Date: Fri Sep 4 06:19:49 2015 -0400
|
| ; Auto-commit of loaddefs files.
|
| commit 2559d6e8dadead055e6b06b04f71b2eca195dae8
| Author: Eli Zaretskii <eliz@gnu.org>
| Date: Fri Sep 4 09:56:40 2015 +0300
`----
So git log does not show the ChangeLogs neither?!
However when for example run vc-print-log in abbrev.el
is seems to show the ChangeLog but not the git commit message.
Is this correct??
So in order to have the same behavior for hg, what do we need that the
hg log format is *exactly* the same as the
git log format?
Thanks
Uwe
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-19 6:55 ` Uwe Brauer
@ 2015-10-19 7:07 ` Eli Zaretskii
2015-10-19 8:14 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Eli Zaretskii @ 2015-10-19 7:07 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-devel
> From: Uwe Brauer <oub@mat.ucm.es>
> Date: Mon, 19 Oct 2015 09:55:50 +0300
>
> I am right now confused. I go to the Emacs git trunc, switch into the
> lisp directory:
> the latest ChangeLog is ChangeLog.17
> its most recent entry (this is not the most update git version of emacs) is
>
> ,----
> | 2015-04-06 Alan Mackenzie <acm@muc.de>
> |
> | Fix miscellaneous glitches in cc-mode.el. (Bug#20245)
> | * progmodes/cc-mode.el (c-common-init): bind [Snip]
> `----
>
> However when I run git log in that directory I see
>
> ,----
> | commit 09c15856a926eb80106a5c42571660601c2167d6
> | Author: Glenn Morris <rgm@gnu.org>
> | Date: Fri Sep 4 06:19:49 2015 -0400
> |
> | ; Auto-commit of loaddefs files.
> |
> | commit 2559d6e8dadead055e6b06b04f71b2eca195dae8
> | Author: Eli Zaretskii <eliz@gnu.org>
> | Date: Fri Sep 4 09:56:40 2015 +0300
> `----
>
>
> So git log does not show the ChangeLogs neither?!
Not in those ones. Look at ChangeLog.2 at top level, this is the Git
commit log, updated once a week.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-19 7:07 ` Eli Zaretskii
@ 2015-10-19 8:14 ` Uwe Brauer
2015-10-19 8:30 ` Eli Zaretskii
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-10-19 8:14 UTC (permalink / raw)
To: emacs-devel
> Not in those ones. Look at ChangeLog.2 at top level, this is the Git
> commit log, updated once a week.
I successfully run git pull.
Now
ChangeLog.2 contains the following first lines
,----
| 2015-10-18 Michael Albinus <michael.albinus@gmx.de>
|
| Minor edits in Tramp
|
| * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp):
| Declare it.
|
| * lisp/net/tramp-compat.el (directory-listing-before-filename-regexp):
| Remove declaration.
`----
However git log | more
gives
,----
| commit f1575763c0d30df9f9e5b730c2f2c68f501cda9c
| Author: Eli Zaretskii <eliz@gnu.org>
| Date: Mon Oct 19 10:04:50 2015 +0300
|
| Fix return value of 'set-file-extended-attributes'
|
| * lisp/files.el (set-file-extended-attributes): Return non-nil
| when setting either ACLs or SELinux context succeeds. Document
| the return value. (Bug#21699)
|
| * doc/lispref/files.texi (Changing Files): Document the return
| value of set-file-extended-attributes.
`----
of course if in lisp/files.el I run vc-print-log it shows the above
message.
What I am wondering where is the corresponding ChangeLog file?
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-19 8:14 ` Uwe Brauer
@ 2015-10-19 8:30 ` Eli Zaretskii
2015-10-19 8:38 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Eli Zaretskii @ 2015-10-19 8:30 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-devel
> From: Uwe Brauer <oub@mat.ucm.es>
> Date: Mon, 19 Oct 2015 11:14:17 +0300
>
>
>
> > Not in those ones. Look at ChangeLog.2 at top level, this is the Git
> > commit log, updated once a week.
>
> I successfully run git pull.
>
> Now
> ChangeLog.2 contains the following first lines
> ,----
> | 2015-10-18 Michael Albinus <michael.albinus@gmx.de>
> |
> | Minor edits in Tramp
> |
> | * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp):
> | Declare it.
> |
> | * lisp/net/tramp-compat.el (directory-listing-before-filename-regexp):
> | Remove declaration.
> `----
>
> However git log | more
>
> gives
> ,----
> | commit f1575763c0d30df9f9e5b730c2f2c68f501cda9c
> | Author: Eli Zaretskii <eliz@gnu.org>
> | Date: Mon Oct 19 10:04:50 2015 +0300
> |
> | Fix return value of 'set-file-extended-attributes'
> |
> | * lisp/files.el (set-file-extended-attributes): Return non-nil
> | when setting either ACLs or SELinux context succeeds. Document
> | the return value. (Bug#21699)
> |
> | * doc/lispref/files.texi (Changing Files): Document the return
> | value of set-file-extended-attributes.
> `----
Of course. Like I said above:
> > Look at ChangeLog.2 at top level, this is the Git
> > commit log, updated once a week.
^^^^^^^^^^^^^^^^^^^
Wait for a few hours, and you will ChangeLog.2 updated in the
repository.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-19 8:30 ` Eli Zaretskii
@ 2015-10-19 8:38 ` Uwe Brauer
2015-10-19 9:04 ` Eli Zaretskii
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-10-19 8:38 UTC (permalink / raw)
To: emacs-devel
> Of course. Like I said above:
> ^^^^^^^^^^^^^^^^^^^
> Wait for a few hours, and you will ChangeLog.2 updated in the
> repository.
Ok, thanks. Last question, a bit off topic I admit. Where is it
configured that git uses ChangeLog.2.
I did a grep in the .git directory but did not find anything useful.
thanks
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-19 8:38 ` Uwe Brauer
@ 2015-10-19 9:04 ` Eli Zaretskii
2015-10-19 9:15 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Eli Zaretskii @ 2015-10-19 9:04 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-devel
> From: Uwe Brauer <oub@mat.ucm.es>
> Date: Mon, 19 Oct 2015 11:38:25 +0300
>
> Ok, thanks. Last question, a bit off topic I admit. Where is it
> configured that git uses ChangeLog.2.
It doesn't. We produce ChangeLog.2 from "git log".
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-19 9:04 ` Eli Zaretskii
@ 2015-10-19 9:15 ` Uwe Brauer
2015-10-19 9:20 ` Dmitry Gutov
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-10-19 9:15 UTC (permalink / raw)
To: emacs-devel
> It doesn't. We produce ChangeLog.2 from "git log".
Ok, but git log
prints the commit msg and the relevant ChangeLog entry
(of that directory I presume.)
Hg log seems not to have that feature.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-19 9:15 ` Uwe Brauer
@ 2015-10-19 9:20 ` Dmitry Gutov
2015-10-19 10:45 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Dmitry Gutov @ 2015-10-19 9:20 UTC (permalink / raw)
To: emacs-devel
On 10/19/2015 12:15 PM, Uwe Brauer wrote:
> Ok, but git log
> prints the commit msg and the relevant ChangeLog entry
> (of that directory I presume.)
>
> Hg log seems not to have that feature.
hg log -v.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-19 9:20 ` Dmitry Gutov
@ 2015-10-19 10:45 ` Uwe Brauer
2015-10-19 10:51 ` Dmitry Gutov
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-10-19 10:45 UTC (permalink / raw)
To: emacs-devel
>>> "Dmitry" == Dmitry Gutov <dgutov@yandex.ru> writes:
> On 10/19/2015 12:15 PM, Uwe Brauer wrote:
>> Ok, but git log
>> prints the commit msg and the relevant ChangeLog entry
>> (of that directory I presume.)
>>
>> Hg log seems not to have that feature.
> hg log -v.
No, this does not display the content of the ChangeLog!!!
Let me try to resume.
HG
- Edit a file and enter a comment "CHLcomment" into the ChangeLog
- From the command line: hg commit -m "test msg"
- From the command line: hg log -v
*Only* the comment "test msg" is displayed
GIT
- Edit a file and enter a comment "CHLcomment" into the ChangeLog
- From the command line: git commit -am "test msg"
- From the command line: git log
*Only* the comment "test msg" is displayed!!
Now I use Emacs.
GIT
- Edit a file and enter a comment "CHLcommentEmacs" into the ChangeLog
- vc-next-action: "test msgEmacs"
- vc-print-log: both comments are shown "CHLcommentEmacs" and "test msgEmacs"
- from the command line git log shows also *BOTH*
HG
- Edit a file and enter a comment "CHLcommentEmacs" into the ChangeLog
- vc-next-action: "test msgEmacs"
- vc-print-log: only "test msgEmacs" is displayed
- from the command line hg log only shows "test msgEmacs"
So it seems the culprit is Emacs, when it commits using git is also
inserts part of the ChangeLog, otherwise I don't understand the
different behavior of
git log
From the command line.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-19 10:45 ` Uwe Brauer
@ 2015-10-19 10:51 ` Dmitry Gutov
2015-10-19 10:57 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Dmitry Gutov @ 2015-10-19 10:51 UTC (permalink / raw)
To: emacs-devel
On 10/19/2015 01:45 PM, Uwe Brauer wrote:
> > hg log -v.
>
>
> No, this does not display the content of the ChangeLog!!!
Right. It shows the full contents of commit messages. Which should have
ChangeLog entries in them, if you committed from inside Emacs, using
vc-next-action.
> Let me try to resume.
>
> HG
> - Edit a file and enter a comment "CHLcomment" into the ChangeLog
>
> - From the command line: hg commit -m "test msg"
>
> - From the command line: hg log -v
>
> *Only* the comment "test msg" is displayed
Indeed.
> Now I use Emacs.
>
> GIT
> ...
> HG
> - Edit a file and enter a comment "CHLcommentEmacs" into the ChangeLog
>
> - vc-next-action: "test msgEmacs"
>
> - vc-print-log: only "test msgEmacs" is displayed
Because, like I explained in this very thread, vc-hg-print-log doesn't
use the '-v' argument when calling 'hg log'.
> - from the command line hg log only shows "test msgEmacs"
Call 'hg log -v' at this step.
> So it seems the culprit is Emacs, when it commits using git is also
> inserts part of the ChangeLog, otherwise I don't understand the
> different behavior of
>
> git log
>
> From the command line.
'git log' doesn't need '-v'.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-19 10:51 ` Dmitry Gutov
@ 2015-10-19 10:57 ` Uwe Brauer
2015-10-19 11:02 ` Dmitry Gutov
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-10-19 10:57 UTC (permalink / raw)
To: emacs-devel
> On 10/19/2015 01:45 PM, Uwe Brauer wrote:
> Right. It shows the full contents of commit messages. Which should
> have ChangeLog entries in them, if you committed from inside Emacs,
> using vc-next-action.
> Indeed.
> Because, like I explained in this very thread, vc-hg-print-log doesn't
> use the '-v' argument when calling 'hg log'.
> Call 'hg log -v' at this step.
> 'git log' doesn't need '-v'.
You are right I am wrong.
I send you a possible hg log
hg log --template "commit {node}\nAuthor: {author}\nDate: {date|rfc822date}\n{desc}\n{nofiles}\n"
And for me it looks very much than the one of git, so one could just use
the same code.
However you seem to prefer a different format.
Could you please tell me what you have in mind?
So I could try to play with the templates.
Thanks
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-19 10:57 ` Uwe Brauer
@ 2015-10-19 11:02 ` Dmitry Gutov
2015-10-19 13:20 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Dmitry Gutov @ 2015-10-19 11:02 UTC (permalink / raw)
To: emacs-devel
On 10/19/2015 01:57 PM, Uwe Brauer wrote:
> I send you a possible hg log
> hg log --template "commit {node}\nAuthor: {author}\nDate: {date|rfc822date}\n{desc}\n{nofiles}\n"
>
> And for me it looks very much than the one of git, so one could just use
> the same code.
>
> However you seem to prefer a different format.
>
> Could you please tell me what you have in mind?
I don't know which template string that corresponds to, but for
vc-print-log, we use the normal 'hg log' output.
For vc-print-root-log, we currently use this template:
(concat "{rev}:{ifeq(branch, 'default','', '{branch}')}"
":{bookmarks}:{tags}:{author|person}"
" {date|shortdate} {desc|firstline}\\n")
So we have two of them, and we probably want to modify each of them
slightly, so that the messages are displayed in full.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-19 11:02 ` Dmitry Gutov
@ 2015-10-19 13:20 ` Uwe Brauer
2015-10-19 23:46 ` Dmitry Gutov
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-10-19 13:20 UTC (permalink / raw)
To: emacs-devel
>>> "Dmitry" == Dmitry Gutov <dgutov@yandex.ru> writes:
> On 10/19/2015 01:57 PM, Uwe Brauer wrote:
>> I send you a possible hg log
>> hg log --template "commit {node}\nAuthor: {author}\nDate: {date|rfc822date}\n{desc}\n{nofiles}\n"
>>
>> And for me it looks very much than the one of git, so one could just use
>> the same code.
>>
>> However you seem to prefer a different format.
>>
>> Could you please tell me what you have in mind?
> I don't know which template string that corresponds to, but for
> vc-print-log, we use the normal 'hg log' output.
> For vc-print-root-log, we currently use this template:
> (concat "{rev}:{ifeq(branch, 'default','', '{branch}')}"
> ":{bookmarks}:{tags}:{author|person}"
> " {date|shortdate} {desc|firstline}\\n")
> So we have two of them, and we probably want to modify each of them
> slightly, so that the messages are displayed in full.
Ok
However when I run
hg log --template "changeset: {rev}:{node|short}\ntag: {tags}\nuser:
{author}\nDate: {date|rfc822date}\ndescription: {desc}\n{nofiles}\n"
I obtain
,----
| changeset: 17:5d2e1c5cdb3c
| tag: tip
| user: Uwe Brauer <oub@mat.ucm.es>
| Date: Mon, 19 Oct 2015 13:51:29 +0300
| description: second commit
|
| * testhg.tex: my first one.
`----
While with
hg log -v
,----
| changeset: 17:5d2e1c5cdb3c
| tag: tip
| user: Uwe Brauer <oub@mat.ucm.es>
| date: Mon Oct 19 13:51:29 2015 +0300
| files: testhg.tex
| description:
| second commit
|
| * testhg.tex: my first one.
|
`----
So I think the new template should be fine or you want to fiddle me the
newlines?
How to implement that in is not entirely clear to me. Maybe a different
template for hg is needed?
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-19 13:20 ` Uwe Brauer
@ 2015-10-19 23:46 ` Dmitry Gutov
2015-10-20 6:05 ` Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Dmitry Gutov @ 2015-10-19 23:46 UTC (permalink / raw)
To: emacs-devel
On 10/19/2015 04:20 PM, Uwe Brauer wrote:
> So I think the new template should be fine or you want to fiddle me the
> newlines?
Why newlines?
The obvious difference is that the values are not lined up vertically.
But you can add spaces to fix that, manually. Then:
- No need to replace "summary:" with "description:".
- Even when the commit doesn't have a tag, your template still shows
that line.
- The date format is slightly different.
- When the commit has multiple parents, the default style shows them
both, yours doesn't.
> How to implement that in is not entirely clear to me. Maybe a different
> template for hg is needed?
I don't know what you mean by that.
It's okay if this is too much for you. Then please open a bug for this,
and we'll get back to it later. Maybe someone experienced with Mercurial
will come and help.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-19 23:46 ` Dmitry Gutov
@ 2015-10-20 6:05 ` Uwe Brauer
2015-10-20 8:34 ` Dmitry Gutov
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-10-20 6:05 UTC (permalink / raw)
To: emacs-devel
>>> "Dmitry" == Dmitry Gutov <dgutov@yandex.ru> writes:
> On 10/19/2015 04:20 PM, Uwe Brauer wrote:
>> So I think the new template should be fine or you want to fiddle me the
>> newlines?
> Why newlines?
> The obvious difference is that the values are not lined up vertically.
> But you can add spaces to fix that, manually. Then:
> - No need to replace "summary:" with "description:".
> - Even when the commit doesn't have a tag, your template still shows that line.
> - The date format is slightly different.
> - When the commit has multiple parents, the default style shows them both, yours doesn't.
Ok, I will ask on the mercurial list for more help.
>> How to implement that in is not entirely clear to me. Maybe a different
>> template for hg is needed?
> I don't know what you mean by that.
What I mean is suppose I come up with the hg template which meets all
the requirements, I would leave it to the vc maintainer to implement
that in lisp. For me it is not obvious how to do it.
> It's okay if this is too much for you. Then please open a bug for
> this, and we'll get back to it later. Maybe someone experienced with
> Mercurial will come and help.
If I don't get a useful respond on the Mercurial list, I will do that.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: vc-next-action RCS vs hg: copies the entry of ChangeLog
2015-10-20 6:05 ` Uwe Brauer
@ 2015-10-20 8:34 ` Dmitry Gutov
2015-10-26 16:35 ` [Solved] (was: vc-next-action RCS vs hg: copies the entry of ChangeLog) Uwe Brauer
0 siblings, 1 reply; 44+ messages in thread
From: Dmitry Gutov @ 2015-10-20 8:34 UTC (permalink / raw)
To: emacs-devel
On 10/20/2015 09:05 AM, Uwe Brauer wrote:
> What I mean is suppose I come up with the hg template which meets all
> the requirements, I would leave it to the vc maintainer to implement
> that in lisp. For me it is not obvious how to do it.
You could leave that to me, yes.
^ permalink raw reply [flat|nested] 44+ messages in thread
* [Solved] (was: vc-next-action RCS vs hg: copies the entry of ChangeLog)
2015-10-20 8:34 ` Dmitry Gutov
@ 2015-10-26 16:35 ` Uwe Brauer
2015-10-27 13:15 ` [Solved] Dmitry Gutov
0 siblings, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-10-26 16:35 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]
>>> "Dmitry" == Dmitry Gutov <dgutov@yandex.ru> writes:
> On 10/20/2015 09:05 AM, Uwe Brauer wrote:
>> What I mean is suppose I come up with the hg template which meets all
>> the requirements, I would leave it to the vc maintainer to implement
>> that in lisp. For me it is not obvious how to do it.
> You could leave that to me, yes.
I finally found a solution which was proposed to me by Simon King on the
mercury mailing list.
It seems impossible to run hg log from the commandline in order to
obtain a output similar/identical to «git log».
There is however a two step procedure.
- write a style file (I attach the correct one below)
- then run hg log --style /path/to/hgstyle
And voila!
,----
| changeset: 32:de9787eefb88
| tag: tip
| user: Uwe Brauer <oub@mat.ucm.es>
| Date: Mon Oct 26 16:27:35 2015 +0000
| summary: A Huge commit
|
| * section-1.tex: Here comes an
| important change
|
| * testhg2.tex (section{Nación} {} {}): New long change:
|
| * testhg2.tex (section{Introduction} {} {}): Add an
| introduction
|
| * testneuneu.tex (section{Einfuehrung} {} {}): Eine
| Neue Einfuehrung
`----
How to implement this is lisp I leave to you.
Thanks and regards
Uwe Brauer
[-- Attachment #2: hgstyle --]
[-- Type: application/octet-stream, Size: 167 bytes --]
changeset = "changeset: {rev}:{node|short}\n{tags}user: {author}\nDate: {date|date}\nsummary: {tabindent(desc)}\n{nofiles}\n"
tag = "tag: {tag}\n"
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [Solved]
2015-10-26 16:35 ` [Solved] (was: vc-next-action RCS vs hg: copies the entry of ChangeLog) Uwe Brauer
@ 2015-10-27 13:15 ` Dmitry Gutov
2015-10-27 14:23 ` [Solved] Uwe Brauer
2015-10-27 14:30 ` [Solved] Uwe Brauer
0 siblings, 2 replies; 44+ messages in thread
From: Dmitry Gutov @ 2015-10-27 13:15 UTC (permalink / raw)
To: emacs-devel
On 10/26/2015 06:35 PM, Uwe Brauer wrote:
> There is however a two step procedure.
>
> - write a style file (I attach the correct one below)
>
> - then run hg log --style /path/to/hgstyle
>
> And voila!
Thank you the style file. I was able to turn it back into a template
string, using what the Mercurial documentation calls the "list operator"
(percent sign).
I've also made some changes:
- Removed 'tabindent', because 8-spaces indentation looks too much, and
'indent' doesn't work in my version of Mercurial (3.4).
- Added "parents:". I tried to put them on separate lines, but haven't
managed do to that while retaining their short format.
- Added indentation after "tag:".
- Removed {nofiles}. Any idea what that expansion is supposed to do? It
didn't seem to have any effect.
Pushed to master as 99ded6b.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [Solved]
2015-10-27 13:15 ` [Solved] Dmitry Gutov
@ 2015-10-27 14:23 ` Uwe Brauer
2015-10-27 15:15 ` [Solved] Dmitry Gutov
2015-10-27 14:30 ` [Solved] Uwe Brauer
1 sibling, 1 reply; 44+ messages in thread
From: Uwe Brauer @ 2015-10-27 14:23 UTC (permalink / raw)
To: emacs-devel
> On 10/26/2015 06:35 PM, Uwe Brauer wrote:
> Thank you the style file. I was able to turn it back into a template
> string, using what the Mercurial documentation calls the "list
> operator" (percent sign).
> I've also made some changes:
> - Removed 'tabindent', because 8-spaces indentation looks too much,
> and 'indent' doesn't work in my version of Mercurial (3.4).
Nor in mine 3.0.1.
Pitty I liked the tabindentation makes it better readable. Will see
whether tabindent is configurable.
> - Added "parents:". I tried to put them on separate lines, but haven't
> managed do to that while retaining their short format.
> - Added indentation after "tag:".
> - Removed {nofiles}. Any idea what that expansion is supposed to do?
> It didn't seem to have any effect.
Well that is supposed not to show the list of modified files. As far as
I can remember this was one of your concerns about «hg log -v»
> Pushed to master as 99ded6b.
Ok I pulled and, since did not want to recompile my whole emacs, I just
compiled replaced the whole vc directory by a new one. But now how am I
suppose to use the new functionality? Because for me nothing has changed
in the behaviour of vc-print-log
Uwe
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [Solved]
2015-10-27 14:23 ` [Solved] Uwe Brauer
@ 2015-10-27 15:15 ` Dmitry Gutov
0 siblings, 0 replies; 44+ messages in thread
From: Dmitry Gutov @ 2015-10-27 15:15 UTC (permalink / raw)
To: emacs-devel
On 10/27/2015 04:23 PM, Uwe Brauer wrote:
> Pitty I liked the tabindentation makes it better readable. Will see
> whether tabindent is configurable.
I don't know if it makes that much of a difference: everything but the
message contents is formatted in a distinct way.
> Well that is supposed not to show the list of modified files. As far as
> I can remember this was one of your concerns about «hg log -v»
We don't see the list of modified files without {nofiles} either.
> Ok I pulled and, since did not want to recompile my whole emacs, I just
> compiled replaced the whole vc directory by a new one. But now how am I
> suppose to use the new functionality? Because for me nothing has changed
> in the behaviour of vc-print-log
It should show multiline messages in commits that contain them.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [Solved]
2015-10-27 13:15 ` [Solved] Dmitry Gutov
2015-10-27 14:23 ` [Solved] Uwe Brauer
@ 2015-10-27 14:30 ` Uwe Brauer
1 sibling, 0 replies; 44+ messages in thread
From: Uwe Brauer @ 2015-10-27 14:30 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
> On 10/26/2015 06:35 PM, Uwe Brauer wrote:
> Thank you the style file. I was able to turn it back into a template
> string, using what the Mercurial documentation calls the "list
> operator" (percent sign).
> I've also made some changes:
> - Removed 'tabindent', because 8-spaces indentation looks too much,
> and 'indent' doesn't work in my version of Mercurial (3.4).
The function fill68 might come in handy, I attach a modified style
file
[-- Attachment #2: hgstyle --]
[-- Type: application/octet-stream, Size: 176 bytes --]
changeset = "changeset: {rev}:{node|short}\n{tags}user: {author}\nDate: {date|date}\nsummary: {tabindent(fill68(desc)))}\n{nofiles}\n"
tag = "tag: {tag}\n"
^ permalink raw reply [flat|nested] 44+ messages in thread
* Prefix-Arg (non-interactive!) in Info
@ 2010-08-13 14:37 Memnon Anon
2010-08-13 15:17 ` Eli Zaretskii
0 siblings, 1 reply; 44+ messages in thread
From: Memnon Anon @ 2010-08-13 14:37 UTC (permalink / raw)
To: help-gnu-emacs
[ Fairly long mail, questions are at the very bottom.]
Hi,
Someone had a fairly easy question on the orgmode ml:
,----[ Message-ID: <0vhbizzap7.fsf@gmail.com> ]
| I'd like to bind `C-u C-c C-x C-i' to the <f10> key in emacs 23.
`----
So, I thought this should be easy to find in the Info documentation and
started looking through the relevant documentation via the indices, and
plain repeated `C-s' for things like C-u, universal argument etc.
But it was surprisingly difficult to find an answer to a simple
question: How do I non-interactively! pass a prefix argument to a
function?
On the one hand, it strengthened my remembrance, that C-u =
argument of 4, C-u C-u = argument of 16 etc, but I found no way how to
put this into good use; first tries in *scratch* failed.
On the contrary, this FAQ entry suggested another way and put me on the
wrong track for a minute or two:
,----[ (info "(efaq)Replying to the sender of a message") ]
| 12.6 How can I force Rmail to reply to the sender of a message, but not the other recipients?
|
| Ron Isaacson <isaacson@seas.upenn.edu> says: When you hit <r> to reply
| in Rmail, by default it CCs all of the original recipients (everyone on
! the original `To' and `CC' lists). With a prefix argument (i.e., typing
! `C-u' before <r>), it replies only to the sender. However, going
! through the whole `C-u' business every time you want to reply is a
! pain. This is the best fix I've been able to come up with:
|
| (defun rmail-reply-t ()
| "Reply only to the sender of the current message. (See rmail-reply.)"
| (interactive)
! (rmail-reply t))
| (add-hook 'rmail-mode-hook
| (lambda ()
| (define-key rmail-mode-map "r" 'rmail-reply-t)
| (define-key rmail-mode-map "R" 'rmail-reply)))
`----
( Thinking: "C-u = Argument t?!" Nah, this can not be right, can it?
But this other guy [Message ID: <87ocd71jz6.fsf@gmx.net>]
suggested exactly that ...")
I finally gave up and went to google, where I found the right(?)
solution:
,----[ http://www.emacs.uniyar.ac.ru/doc/em24h/emacs200.htm ]
| (define-key c++-mode-map [(f6)] (definteractive (comment-region '(4))))
| [...]
| definteractive declares an anonymous function at point with the body
! containing a call to comment region with argument '(4), which is the
! Lisp representation for the C-u prefix argument.
`----
Up to now, I was not only able to find such information in Info, I even
found them easily and quicker than with google, so I am wondering:
Did I miss a crucial Info page? (I think so, but ... which?)
If not, is this worth a wishlist bug against the documentation?
If so, where would you suggest to put this information?
Memnon
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: Prefix-Arg (non-interactive!) in Info
2010-08-13 14:37 Prefix-Arg (non-interactive!) in Info Memnon Anon
@ 2010-08-13 15:17 ` Eli Zaretskii
2010-08-13 15:50 ` Memnon Anon
0 siblings, 1 reply; 44+ messages in thread
From: Eli Zaretskii @ 2010-08-13 15:17 UTC (permalink / raw)
To: help-gnu-emacs
> From: Memnon Anon <gegendosenfleisch@googlemail.com>
> Date: Fri, 13 Aug 2010 16:37:04 +0200
>
> So, I thought this should be easy to find in the Info documentation and
> started looking through the relevant documentation via the indices, and
> plain repeated `C-s' for things like C-u, universal argument etc.
>
> But it was surprisingly difficult to find an answer to a simple
> question: How do I non-interactively! pass a prefix argument to a
> function?
This information is usually in the doc string of the function you want
to invoke. For example:
rename-buffer is an interactive built-in function in `C source code'.
(rename-buffer NEWNAME &optional UNIQUE)
Change current buffer's name to NEWNAME (a string).
If second arg UNIQUE is nil or omitted, it is an error if a
buffer named NEWNAME already exists.
If UNIQUE is non-nil, come up with a new name using
`generate-new-buffer-name'.
Interactively, you can set UNIQUE with a prefix argument.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IOW, the prefix argument is normally one of the function's arguments,
so if you want to call the function non-interactively, just put there
the value you want to pass it.
The reason why you didn't find this in the Info manual is twofold:
. You were looking for some general way of doing this, while the
"normal" way is not general, but specific to each function --
exactly which argument is mapped to the prefix argument is
something each function determines for itself.
. Since every function has a different argument mapped to the prefix
arg, the manual doesn't have any discussions of this, except when
it describes each and every function.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: Prefix-Arg (non-interactive!) in Info
2010-08-13 15:17 ` Eli Zaretskii
@ 2010-08-13 15:50 ` Memnon Anon
2010-08-13 16:09 ` Eli Zaretskii
0 siblings, 1 reply; 44+ messages in thread
From: Memnon Anon @ 2010-08-13 15:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
> This information is usually in the doc string of the function you want
> to invoke. For example:
Sorry, my description was not clear enough.
I knew that `C-u' produces a prefix arg, 4 by default, or any other
number if you specify it, as does M-4; and the manual states this in
several places. I also knew that each function uses prefixes
differently - as flag, as a repeater etc. -, and I knew where to look
for it, which is in the docstring.
What I did not find, was, how to pass this argument non interactively -
i.e. without `C-u' or M-4 - to a function.
I found this sentence in an old version of the emacs lisp intro:
http://www.cs.tut.fi/lintula/manual/elisp/emacs-lisp-intro-1.05/emacs-lisp-intro_21.html
,----
| (C-u produces an unprocessed prefix argument of (4), which is a list of
| one element.)
`----
Exactly the "list of one element" part I was not aware of.
So, `C-u C-c C-x C-i' calls org-clock-in with an argument of (4).
(global-set-key (kbd "<f12>") (lambda () (interactive) (org-clock-in '(4))))
Well, I guess I should stop patching up my elisp knowledge bit by bit
and finally read and digest the whole emacs lisp intro and not just
browse it.
Memnon
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: Prefix-Arg (non-interactive!) in Info
2010-08-13 15:50 ` Memnon Anon
@ 2010-08-13 16:09 ` Eli Zaretskii
2010-08-13 17:04 ` Memnon Anon
0 siblings, 1 reply; 44+ messages in thread
From: Eli Zaretskii @ 2010-08-13 16:09 UTC (permalink / raw)
To: help-gnu-emacs
> From: Memnon Anon <gegendosenfleisch@googlemail.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Fri, 13 Aug 2010 17:50:13 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > This information is usually in the doc string of the function you want
> > to invoke. For example:
>
> Sorry, my description was not clear enough.
I think it was clear enough, but perhaps my response wasn't.
Let's try a different approach: which function would you like to call
non-interactively, passing it some value of the prefix arg? (Please
don't say "it's not important which function": my point is _precisely_
that it _is_ important, because the answer to your question is
specific to the function you want to invoke.)
> What I did not find, was, how to pass this argument non interactively -
> i.e. without `C-u' or M-4 - to a function.
It depends on the function.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: Prefix-Arg (non-interactive!) in Info
2010-08-13 16:09 ` Eli Zaretskii
@ 2010-08-13 17:04 ` Memnon Anon
2010-08-13 19:33 ` Eli Zaretskii
0 siblings, 1 reply; 44+ messages in thread
From: Memnon Anon @ 2010-08-13 17:04 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
> Let's try a different approach: which function would you like to call
> non-interactively, passing it some value of the prefix arg? (Please
> don't say "it's not important which function": my point is _precisely_
> that it _is_ important, because the answer to your question is
> specific to the function you want to invoke.)
The function asked for was org-clock-in.
,----[ org-clock-in ]
| org-clock-in is an interactive compiled Lisp function.
|
| (org-clock-in &optional SELECT START-TIME)
|
| Start the clock on the current item.
| If necessary, clock-out of the currently active clock.
| With a prefix argument SELECT (C-u), offer a list of recently clocked tasks to
| clock into. When SELECT is C-u C-u, clock into the current task and mark
| is as the default task, a special task that will always be offered in
| the clocking selection, associated with the letter `d'.
`----
I knew `C-u' = 4 (and not "t" as someone suggested), so I tried
(global-set-key (kbd "<F12>") (lambda () (interactive) (org-clock-in 4)))
^^^^^^^^^^^^^^^
This did not work, but I was hardly surprised.
It never does on the first approach :)
===
(Well, I had this example in mind: (info "(eintr)Interactive multiply-by-seven")
(defun multiply-by-seven (number) ; Interactive version.
"Multiply NUMBER by seven."
(interactive "p")
(message "The result is %d" (* 7 number)))
(multiply-by-seven 2) --> 14
M-8 M-x multiply-by-seven --> 56
C-u M-x multiply-by-seven --> 28
Works for this function...
===
So I tried to figure out in what form org-clock-in wanted its argument
of 4 passed in.
And I found nothing, until I turned to google.
...
Now I am really confused:
I expected this to work, but it does not:
(multiply-by-seven '(4)).
Oh well, I still don't get it.
But
(global-set-key (kbd "<F12>") (lambda () (interactive) (org-clock-in
'(4))))
works, the questioner has an answer; problem solved. And I will
dedicate some time to learn elisp some, soon (at least the basics);
and I will start with a thorough reading of the elisp intro.
Up to now, I could fix my and others problems by looking at working code
and fiddling until mine worked finally, too ... somehow; but I am
getting the impression this takes way more time on the long run than
learning the beast properly.
Memnon
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: Prefix-Arg (non-interactive!) in Info
2010-08-13 17:04 ` Memnon Anon
@ 2010-08-13 19:33 ` Eli Zaretskii
2010-08-13 20:58 ` [Solved] (was: Prefix-Arg (non-interactive!) in Info) Memnon Anon
0 siblings, 1 reply; 44+ messages in thread
From: Eli Zaretskii @ 2010-08-13 19:33 UTC (permalink / raw)
To: help-gnu-emacs
> From: Memnon Anon <gegendosenfleisch@googlemail.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Fri, 13 Aug 2010 19:04:30 +0200
>
> The function asked for was org-clock-in.
>
> ,----[ org-clock-in ]
> | org-clock-in is an interactive compiled Lisp function.
> |
> | (org-clock-in &optional SELECT START-TIME)
> |
> | Start the clock on the current item.
> | If necessary, clock-out of the currently active clock.
> | With a prefix argument SELECT (C-u), offer a list of recently clocked tasks to
> | clock into. When SELECT is C-u C-u, clock into the current task and mark
> | is as the default task, a special task that will always be offered in
> | the clocking selection, associated with the letter `d'.
> `----
>
> I knew `C-u' = 4 (and not "t" as someone suggested), so I tried
> (global-set-key (kbd "<F12>") (lambda () (interactive) (org-clock-in 4)))
> ^^^^^^^^^^^^^^^
> This did not work, but I was hardly surprised.
You are wrong assuming that the prefix arg is always 4. Its ``value''
depends on how the function accesses it; the node in the ELisp manual
that Drew pointed to spells out the possible ``values''. In addition,
it matters how the function tests the possible values of the argument;
if the function just checks that its argument (in this case, SELECT)
is non-nil, then '(4) will do, but so will '(foobar).
> (defun multiply-by-seven (number) ; Interactive version.
> "Multiply NUMBER by seven."
> (interactive "p")
> (message "The result is %d" (* 7 number)))
>
> (multiply-by-seven 2) --> 14
> M-8 M-x multiply-by-seven --> 56
> C-u M-x multiply-by-seven --> 28
> Works for this function...
>
> So I tried to figure out in what form org-clock-in wanted its argument
> of 4 passed in.
>
> And I found nothing, until I turned to google.
It would be better (and more educational) to simply read the code of
the function (and submit a bug report regarding the unclear doc
string). In there, you'd see that org-clock-in uses (interactive "P"),
which assigns the raw prefix argument to SELECT, and it tests its
value like this:
(when (equal select '(4))
which tells you that it really wants the list '(4) -- not very clean,
I'd say.
> Now I am really confused:
> I expected this to work, but it does not:
> (multiply-by-seven '(4)).
That's because multiply-by-seven uses (interactive "p") -- lowercase
`p' -- which assigns to NUMBER the numerical value of the prefix arg.
The meaning of the interactive codes, such as "P" and "p", is
explained in the node "Interactive Codes" in the ELisp manual.
^ permalink raw reply [flat|nested] 44+ messages in thread
* [Solved] (was: Prefix-Arg (non-interactive!) in Info)
2010-08-13 19:33 ` Eli Zaretskii
@ 2010-08-13 20:58 ` Memnon Anon
2010-08-14 8:05 ` Eli Zaretskii
0 siblings, 1 reply; 44+ messages in thread
From: Memnon Anon @ 2010-08-13 20:58 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
>> This did not work, but I was hardly surprised.
>
> You are wrong assuming that the prefix arg is always 4. Its ``value''
> depends on how the function accesses it; the node in the ELisp manual
> that Drew pointed to spells out the possible ``values''. In addition,
> it matters how the function tests the possible values of the argument;
> if the function just checks that its argument (in this case, SELECT)
> is non-nil, then '(4) will do, but so will '(foobar).
Yes, now I understand. I thought it would always be an integer and
`C-u' just is default 4 without further ado. I did not expect it
to be that versatile :).
> It would be better (and more educational) to simply read the code of
> the function (and submit a bug report regarding the unclear doc
> string).
I usually do, when I investigate for my own purpose.
But here, I wanted to help another person (and investigate a wrong^W not
working answer he got).
So, I went the short route this time.
w.r.t. Bug report, no, I would not do that.
I am no programmer, I hardly ever write anything from scratch; I modify
existing code for my own needs and at best effort. Imho, for reporting
Bugs like this, a more profound level of expertise is needed or you are
most certainly waisting a developers precious time.
(My area of expertise is latin. So I need a tool that handles text well,
especially latex, but also grep et al. Emacs is just perfect for that.
Of course, orgmode all by itself would be enough. I think this is a
point that is stressed not enough: Emacs is not only a "a great tool for
programmers. It is an excellent tool for everyone who has to deal with
large amount of text! If you are willing to learn its ways that is :)
> That's because multiply-by-seven uses (interactive "p") -- lowercase
> `p' -- which assigns to NUMBER the numerical value of the prefix arg.
> The meaning of the interactive codes, such as "P" and "p", is
> explained in the node "Interactive Codes" in the ELisp manual.
Thank you *very much* for taking the time to explain.
I really learned a lot today :).
Memnon "Happy" Anon
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [Solved] (was: Prefix-Arg (non-interactive!) in Info)
2010-08-13 20:58 ` [Solved] (was: Prefix-Arg (non-interactive!) in Info) Memnon Anon
@ 2010-08-14 8:05 ` Eli Zaretskii
2010-08-14 21:18 ` [Solved] Memnon Anon
0 siblings, 1 reply; 44+ messages in thread
From: Eli Zaretskii @ 2010-08-14 8:05 UTC (permalink / raw)
To: help-gnu-emacs
> From: Memnon Anon <gegendosenfleisch@googlemail.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Fri, 13 Aug 2010 22:58:11 +0200
>
> w.r.t. Bug report, no, I would not do that.
> I am no programmer, I hardly ever write anything from scratch; I modify
> existing code for my own needs and at best effort. Imho, for reporting
> Bugs like this, a more profound level of expertise is needed or you are
> most certainly waisting a developers precious time.
I urge you to reconsider. Sending an email saying that the doc string
of org-clock-in does not say what value to assign to the SELECT
argument in a non-interactive call does not need any high level of
expertise. If a doc string does not explain what are the valid
values of the function's arguments, then that doc string needs to be
improved. Documenting this is the absolute minimum of any doc string;
without that, the doc string is useless. It is sometimes okay to omit
these details if the valid values are clear from the text and the
context. But I cannot see how someone could claim that the value '(4)
could be "clear".
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [Solved]
2010-08-14 8:05 ` Eli Zaretskii
@ 2010-08-14 21:18 ` Memnon Anon
2010-08-14 22:27 ` [Solved] Eli Zaretskii
0 siblings, 1 reply; 44+ messages in thread
From: Memnon Anon @ 2010-08-14 21:18 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
> I urge you to reconsider. Sending an email saying that the doc string
> of org-clock-in does not say what value to assign to the SELECT
> argument in a non-interactive call does not need any high level of
> expertise.
Sending the mail does not need expertise. But recognizing if something
really is a deficiency does. Bug reports are great, but creating
"noise" is not; and I really don't want to be a nuisance to the experts
who provide me with so excellent tools. And even if I did recognize a
lack of precision - which requires some knowledge of best practice in
doc strings - I would want to send a patch, which requires even more
knowledge of doc strings in general (= not only seeing what is wrong but
also 'fixing' it).
One way is looking for other docstrings that seem to be "better".
In org, I found lots of functions that are usually called interactively
that have a doc string like the one before.
see eg:
,----[ org-remember.el ]
| (defun org-remember (&optional goto org-force-remember-template-char)
| "Call `remember'. If this is already a remember buffer, re-apply template.
| If there is an active region, make sure remember uses it as initial content
| of the remember buffer.
|
| When called interactively with a \\[universal-argument] \
| prefix argument GOTO, don't remember
| anything, just go to the file/headline where the selected template usually
| stores its notes. With a double prefix argument \
| \\[universal-argument] \\[universal-argument], go to the last
| note stored by remember.
|
| Lisp programs can set ORG-FORCE-REMEMBER-TEMPLATE-CHAR to a character
| associated with a template in `org-remember-templates'."
| (interactive "P")
| (org-require-remember)
| (cond
| ((equal goto '(4)) (org-go-to-remember-target))
| ((equal goto '(16)) (org-remember-goto-last-stored))
`----
I (so far) only found one docstring that seems "better" in this regard:
,----[ org-agenda.el ]
| (defun org-agenda-set-restriction-lock (&optional type)
| "Set restriction lock for agenda, to current subtree or file.
| Restriction will be the file if TYPE is `file', or if type is the
* universal prefix '(4), or if the cursor is before the first headline
| ^^^^^^^^^^^^^^^^^^^^^^
| in the file. Otherwise, restriction will be to the current subtree."
`----
This one says explicitly '(4) is what is tested against.
So should I look for all interactive functions that check against a
universal argument with
(when (equal arg '(4)) ...
and suggest the docstring, which usually only says something like: "When
using \\[universal-argument], ..." to be modified like:
"When using \\[universal-argument] '(4)"? (Of course on a case to case
basis whenever it seems not clear so far.)
> If a doc string does not explain what are the valid values of the
> function's arguments, then that doc string needs to be improved.
> Documenting this is the absolute minimum of any doc string; without
> that, the doc string is useless. It is sometimes okay to omit these
> details if the valid values are clear from the text and the context.
> But I cannot see how someone could claim that the value '(4) could be
> "clear".
Mhhh.
Please have a look at this docstring:
,----[ org-agenda.el ]
| (defun org-agenda-clock-out (&optional arg)
| "Stop the currently running clock."
| (interactive "P")
| (unless (marker-buffer org-clock-marker)
| (error "No running clock"))
| (let ((marker (make-marker)) newhead)
| (org-with-remote-undo (marker-buffer org-clock-marker)
| (with-current-buffer (marker-buffer org-clock-marker)
| (save-excursion
| (save-restriction
| (widen)
| (goto-char org-clock-marker)
| (org-back-to-heading t)
| (move-marker marker (point))
| (org-clock-out)
| (setq newhead (org-get-heading))))))
| (org-agenda-change-all-lines newhead marker)
| (move-marker marker nil)))
`----
This function takes an (optioal) arg, but it is in now way explain what
this arg does.
To tell the truth, in contrast to `org-agenda-clock-in', I do not even
see where this arg is used anywhere in the function...
Should I really file bug reports when I obviously do not understand
whats going on? I don't think so.
Plus: All these points are not really important, because these functions
are meant to be used interactively, what they usually are ... except
when someone wants to bind them to a key with a lambda like in the case
of C-u C-c C-x C-i (org-clock-in) before.
Memnon
P.S.: Cool, I saw you really use the convention to start a new sentence
with <SPC> <SPC>. I never saw anyone really that :)
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [Solved]
2010-08-14 21:18 ` [Solved] Memnon Anon
@ 2010-08-14 22:27 ` Eli Zaretskii
0 siblings, 0 replies; 44+ messages in thread
From: Eli Zaretskii @ 2010-08-14 22:27 UTC (permalink / raw)
To: help-gnu-emacs
> From: Memnon Anon <gegendosenfleisch@googlemail.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Sat, 14 Aug 2010 23:18:21 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > I urge you to reconsider. Sending an email saying that the doc string
> > of org-clock-in does not say what value to assign to the SELECT
> > argument in a non-interactive call does not need any high level of
> > expertise.
>
> Sending the mail does not need expertise. But recognizing if something
> really is a deficiency does. Bug reports are great, but creating
> "noise" is not; and I really don't want to be a nuisance to the experts
> who provide me with so excellent tools. And even if I did recognize a
> lack of precision - which requires some knowledge of best practice in
> doc strings - I would want to send a patch, which requires even more
> knowledge of doc strings in general (= not only seeing what is wrong but
> also 'fixing' it).
Sending a patch is fine. But if you cannot send a patch, at least
make a bug report. Doing nothing after you spotted a problem is IMO
worse than sending a bug report out of mistake or misunderstanding.
> One way is looking for other docstrings that seem to be "better".
> In org, I found lots of functions that are usually called interactively
> that have a doc string like the one before.
Even more reason to submit a report: it sounds like many doc strings
there need the same treatment.
> Should I really file bug reports when I obviously do not understand
> whats going on?
Yes. An unclear doc string needs improvement.
^ permalink raw reply [flat|nested] 44+ messages in thread
end of thread, other threads:[~2023-12-01 6:56 UTC | newest]
Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-28 16:46 how to export checkboxes to odt? Uwe Brauer
2021-09-28 20:21 ` [SOLVED] (was: how to export checkboxes to odt?) Uwe Brauer
2021-09-29 4:07 ` Timothy
2021-09-29 6:30 ` [SOLVED] Uwe Brauer
2021-09-29 11:02 ` [SOLVED] (was: how to export checkboxes to odt?) Max Nikulin
2021-09-30 15:39 ` [checkbox in tables] (was: [SOLVED]) Uwe Brauer
2021-09-28 20:47 ` how to export checkboxes to odt? Juan Manuel Macías
2021-09-29 6:29 ` Uwe Brauer
2021-09-29 7:02 ` [misunderstanding] (was: how to export checkboxes to odt?) Uwe Brauer
-- strict thread matches above, loose matches on Subject: below --
2023-11-29 13:36 count all spelling typos in a given buffer Uwe Brauer
2023-11-29 20:54 ` Emanuel Berg
2023-11-30 9:49 ` [SOLVED] (was: count all spelling typos in a given buffer.) Uwe Brauer
2023-12-01 5:59 ` Emanuel Berg
2023-12-01 6:56 ` [SOLVED] Uwe Brauer
2022-10-02 20:18 add-log-time-format with time? Uwe Brauer
2022-10-03 6:49 ` [SOLVED] (was: add-log-time-format with time?) Uwe Brauer
2022-10-03 11:33 ` Emanuel Berg
2022-10-09 5:51 ` [SOLVED] Uwe Brauer
2022-07-23 16:45 problems with better-registers: turn-off-all-minor modes or remove all text-properties Uwe Brauer
2022-07-24 0:09 ` Michael Heerdegen
2022-07-24 3:59 ` Michael Heerdegen
2022-07-24 5:39 ` Uwe Brauer
2022-07-24 19:51 ` [SOLVED] (was: problems with better-registers: turn-off-all-minor modes or remove all text-properties) Uwe Brauer
2022-07-24 22:36 ` [SOLVED] Michael Heerdegen
2022-07-25 5:37 ` [SOLVED] Uwe Brauer
2022-07-25 5:49 ` [SOLVED] Uwe Brauer
2022-07-25 17:09 ` [SOLVED] Stefan Monnier via Users list for the GNU Emacs text editor
2022-07-25 19:49 ` [SOLVED] Uwe Brauer
2022-07-25 22:37 ` [SOLVED] Michael Heerdegen
2022-07-26 4:57 ` [SOLVED] Uwe Brauer
2022-07-26 13:01 ` [SOLVED] Thorsten Bonow
2022-07-26 15:02 ` [SOLVED] Uwe Brauer
2022-07-26 16:23 ` [SOLVED] Yuri Khan
2022-07-26 23:28 ` [SOLVED] Michael Heerdegen
2022-07-27 10:50 ` [SOLVED] Uwe Brauer
2022-07-27 15:04 ` [SOLVED] Yuri Khan
2022-07-28 14:46 ` [SOLVED$ Uwe Brauer
2021-12-28 13:41 [BUG] org-persist [9.5 (release_9.5-194-gdb302d @ /home/oub/emacs/site-lisp/packages/org/)] Uwe Brauer
2021-12-28 13:53 ` [SOLVED] (was: [BUG] org-persist [9.5 (release_9.5-194-gdb302d @ /home/oub/emacs/site-lisp/packages/org/)]) Uwe Brauer
2021-12-28 14:49 ` Ihor Radchenko
2021-12-28 17:28 ` [SOLVED] Uwe Brauer
2021-12-29 5:11 ` [SOLVED] Ihor Radchenko
2021-12-29 8:06 ` [SOLVED] Uwe Brauer
2021-12-29 8:18 ` [SOLVED] Ihor Radchenko
2021-10-06 15:53 how to randomize (scample) regions in a an (org) buffer Uwe Brauer
2021-10-06 16:35 ` [SOLVED] (was: how to randomize (scample) regions in a an (org) buffer) Uwe Brauer
2021-10-06 19:59 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-06 20:24 ` [SOLVED] Uwe Brauer
2021-10-06 20:58 ` [SOLVED] Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-07 7:05 ` [SOLVED] Uwe Brauer
2021-10-07 8:15 ` [SOLVED] Emanuel Berg via Users list for the GNU Emacs text editor
2019-12-11 21:50 org-ref-insert-cite-link inserts citep Uwe Brauer
2019-12-11 21:58 ` [SOLVED] (was: org-ref-insert-cite-link inserts citep) Uwe Brauer
2019-12-11 22:20 ` John Kitchin
2019-12-12 8:13 ` [SOLVED] Uwe Brauer
2018-11-29 11:38 org babel: %% [removed source block] Uwe Brauer
2018-11-29 16:32 ` Berry, Charles
2018-11-29 17:27 ` [SOLVED] (was: org babel: %% [removed source block]) Uwe Brauer
2018-11-29 22:20 ` [SOLVED] Nick Dokos
2018-04-04 9:08 export table to html, don't display certain columns Uwe Brauer
2018-04-04 13:25 ` [SOLVED] (was: export table to html, don't display certain columns) Uwe Brauer
2018-04-04 13:29 ` [SOLVED] Uwe Brauer
2018-03-01 13:37 how do you compose mails in Gnus with org-mode Joseph Vidal-Rosset
2018-03-03 11:57 ` Thorsten Jolitz
2018-03-06 10:12 ` Uwe Brauer
2018-03-06 18:24 ` Thorsten Jolitz
2018-03-06 19:01 ` Uwe Brauer
2018-03-06 19:36 ` Thorsten Jolitz
2018-03-07 9:57 ` Uwe Brauer
2018-03-07 17:46 ` Thorsten Jolitz
2018-03-08 8:50 ` Uwe Brauer
2018-03-08 16:58 ` Thorsten Jolitz
2018-03-09 21:49 ` [SOLVED] (was: how do you compose mails in Gnus with org-mode) Uwe Brauer
2018-03-09 22:59 ` [SOLVED] Thorsten Jolitz
2015-11-06 19:36 emacs hebrew script bidi nikud rendering bugs Mark David
2015-11-07 9:41 ` Uwe Brauer
2015-11-07 11:36 ` Eli Zaretskii
2015-11-07 17:27 ` Uwe Brauer
2015-11-07 18:00 ` Eli Zaretskii
2015-11-07 18:32 ` Uwe Brauer
2015-11-07 18:52 ` Eli Zaretskii
2015-11-08 9:05 ` [SOLVED] (was: emacs hebrew script bidi nikud rendering bugs) Uwe Brauer
2015-11-09 17:52 ` [SOLVED] Benjamin Riefenstahl
2015-10-15 6:48 vc-next-action RCS vs hg: copies the entry of ChangeLog Uwe Brauer
2015-10-18 8:25 ` Uwe Brauer
2015-10-18 9:50 ` Dmitry Gutov
2015-10-18 13:06 ` Uwe Brauer
2015-10-18 20:04 ` Dmitry Gutov
2015-10-19 6:55 ` Uwe Brauer
2015-10-19 7:07 ` Eli Zaretskii
2015-10-19 8:14 ` Uwe Brauer
2015-10-19 8:30 ` Eli Zaretskii
2015-10-19 8:38 ` Uwe Brauer
2015-10-19 9:04 ` Eli Zaretskii
2015-10-19 9:15 ` Uwe Brauer
2015-10-19 9:20 ` Dmitry Gutov
2015-10-19 10:45 ` Uwe Brauer
2015-10-19 10:51 ` Dmitry Gutov
2015-10-19 10:57 ` Uwe Brauer
2015-10-19 11:02 ` Dmitry Gutov
2015-10-19 13:20 ` Uwe Brauer
2015-10-19 23:46 ` Dmitry Gutov
2015-10-20 6:05 ` Uwe Brauer
2015-10-20 8:34 ` Dmitry Gutov
2015-10-26 16:35 ` [Solved] (was: vc-next-action RCS vs hg: copies the entry of ChangeLog) Uwe Brauer
2015-10-27 13:15 ` [Solved] Dmitry Gutov
2015-10-27 14:23 ` [Solved] Uwe Brauer
2015-10-27 15:15 ` [Solved] Dmitry Gutov
2015-10-27 14:30 ` [Solved] Uwe Brauer
2010-08-13 14:37 Prefix-Arg (non-interactive!) in Info Memnon Anon
2010-08-13 15:17 ` Eli Zaretskii
2010-08-13 15:50 ` Memnon Anon
2010-08-13 16:09 ` Eli Zaretskii
2010-08-13 17:04 ` Memnon Anon
2010-08-13 19:33 ` Eli Zaretskii
2010-08-13 20:58 ` [Solved] (was: Prefix-Arg (non-interactive!) in Info) Memnon Anon
2010-08-14 8:05 ` Eli Zaretskii
2010-08-14 21:18 ` [Solved] Memnon Anon
2010-08-14 22:27 ` [Solved] Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.