unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ messages in thread

* Re: [Solved]
  2015-10-27 14:23                                             ` [Solved] Uwe Brauer
@ 2015-10-27 15:15                                               ` Dmitry Gutov
  0 siblings, 0 replies; 11+ 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] 11+ messages in thread

* Re: [SOLVED]
  2015-11-08  9:05             ` [SOLVED] (was: emacs hebrew script bidi nikud rendering bugs) Uwe Brauer
@ 2015-11-09 17:52               ` Benjamin Riefenstahl
  0 siblings, 0 replies; 11+ messages in thread
From: Benjamin Riefenstahl @ 2015-11-09 17:52 UTC (permalink / raw)
  To: emacs-devel

Hi Uwe,

Uwe Brauer writes:
> I upgraded libotf 0.9.13, libm17n-flt, and m17n-db to version 1.6.X
> and the niqqud are displayed correctly.

Good!

Just for the record, this is still with "DejaVu Sans" and relatively
standard stuff like alef+qamats and alef+qubuts specifically, right?
Did you try adding dagesh or the yiddish ligatures, like the things that
Mark has?

benny




^ permalink raw reply	[flat|nested] 11+ 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; 11+ 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] 11+ 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:28   ` Uwe Brauer
  2023-11-30  9:49   ` [SOLVED] (was: count all spelling typos in a given buffer.) Uwe Brauer
  0 siblings, 2 replies; 11+ 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] 11+ messages in thread

* Re: count all spelling typos in a given buffer.
  2023-11-29 20:54 ` Emanuel Berg
@ 2023-11-30  9:28   ` Uwe Brauer
  2023-11-30  9:49   ` [SOLVED] (was: count all spelling typos in a given buffer.) Uwe Brauer
  1 sibling, 0 replies; 11+ messages in thread
From: Uwe Brauer @ 2023-11-30  9:28 UTC (permalink / raw)
  To: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 2184 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.

Thanks very much


> ;;; -*- lexical-binding: t -*-
> ;;
> ;; this file:
> ;;   https://dataswamp.org/~incal/emacs-init/spell.el

I also tried to download spell.el but that file needs dwim.el
which I don't have and can't find in the emacs git tree (just pulled)


However I tried your code, and I also downloaded some of your packages, including your misc.el 

Be it as it may., when I execute ispell-count, I receive

Starting "look" process...
let: Autoloading file /home/oub/emacs/site-lisp/packages/berg-code/misc.el failed to define function forward-to-word
Quit

When I rename your misc.el, restart emacs.
I try it again and then I obtain another error which I attach

Maybe I need a actualised version of your misc.el?

Thanks 


> (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

-- 
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 #1.2: ispell-count-bug.txt --]
[-- Type: text/plain, Size: 2178 bytes --]

Debugger entered--Lisp error: (wrong-number-of-arguments (1 . 1) 0)
  forward-to-word()
  (let ((word (thing-at-point 'word t))) (if (ispell-lookup-words word) nil (setq errors (1+ errors))) (setq words (1+ words)) (forward-to-word))
  (while (< (point) end) (let ((word (thing-at-point 'word t))) (if (ispell-lookup-words word) nil (setq errors (1+ errors))) (setq words (1+ words)) (forward-to-word)))
  (let* ((words 0) (errors 0)) (while (< (point) end) (let ((word (thing-at-point 'word t))) (if (ispell-lookup-words word) nil (setq errors (1+ errors))) (setq words (1+ words)) (forward-to-word))) (message "%s words checked, %s errors" words errors) nil)
  (save-excursion (goto-char beg) (forward-word) (backward-word) (let* ((words 0) (errors 0)) (while (< (point) end) (let ((word (thing-at-point 'word t))) (if (ispell-lookup-words word) nil (setq errors (1+ errors))) (setq words (1+ words)) (forward-to-word))) (message "%s words checked, %s errors" words errors) nil))
  (unwind-protect (save-excursion (goto-char beg) (forward-word) (backward-word) (let* ((words 0) (errors 0)) (while (< (point) end) (let ((word (thing-at-point ... t))) (if (ispell-lookup-words word) nil (setq errors (1+ errors))) (setq words (1+ words)) (forward-to-word))) (message "%s words checked, %s errors" words errors) nil)) (save-mark-and-excursion--restore saved-marker))
  (let ((saved-marker (save-mark-and-excursion--save))) (unwind-protect (save-excursion (goto-char beg) (forward-word) (backward-word) (let* ((words 0) (errors 0)) (while (< (point) end) (let ((word ...)) (if (ispell-lookup-words word) nil (setq errors ...)) (setq words (1+ words)) (forward-to-word))) (message "%s words checked, %s errors" words errors) nil)) (save-mark-and-excursion--restore saved-marker)))
  ispell-count(1779 1837)
  funcall-interactively(ispell-count 1779 1837)
  call-interactively(ispell-count record nil)
  command-execute(ispell-count record)
  execute-extended-command(nil "ispell-count" "ispell-cou")
  funcall-interactively(execute-extended-command nil "ispell-count" "ispell-cou")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [SOLVED] (was: count all spelling typos in a given buffer.)
  2023-11-29 20:54 ` Emanuel Berg
  2023-11-30  9:28   ` Uwe Brauer
@ 2023-11-30  9:49   ` Uwe Brauer
  2023-12-01  5:59     ` Emanuel Berg
  1 sibling, 1 reply; 11+ 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] 11+ 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; 11+ 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] 11+ messages in thread

* Re: [SOLVED]
  2023-12-01  5:59     ` Emanuel Berg
@ 2023-12-01  6:56       ` Uwe Brauer
  0 siblings, 0 replies; 11+ 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] 11+ messages in thread

end of thread, other threads:[~2023-12-01  6:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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:28   ` Uwe Brauer
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
  -- strict thread matches above, loose matches on Subject: below --
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

Code repositories for project(s) associated with this public inbox

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

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