unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28924: 25.3; All hg entries on single line possibly due to typo in vc-hg-root-log-format.
@ 2017-10-21 15:17 gavenkoa
  2017-10-24 17:24 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: gavenkoa @ 2017-10-21 15:17 UTC (permalink / raw)
  To: 28924

In GNU Emacs 25.3.1 (x86_64-w64-mingw32)
 of 2017-09-17 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 10.0.15063

All changelog entries placed on one line on vc-print-root-log for HG with \n
symbols between entries.

When I changed:

 (defcustom vc-hg-root-log-format
   `(,(concat "{rev}:{ifeq(branch, 'default','', '{branch}')}"
              ":{bookmarks}:{tags}:{author|person}"
-             " {date|shortdate} {desc|firstline}\\n")
+             " {date|shortdate} {desc|firstline}\n")

it starts working fine.

I use hg.exe wrapper around Cygwin Python script hg, stripped version is:

  int main(int argc, char **argv) {
    execvp(cmd, argv);
  }

It comes after hg in PATH so execvp loads script instead itself.

-- 
http://defun.work/





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

* bug#28924: 25.3; All hg entries on single line possibly due to typo in vc-hg-root-log-format.
  2017-10-21 15:17 bug#28924: 25.3; All hg entries on single line possibly due to typo in vc-hg-root-log-format gavenkoa
@ 2017-10-24 17:24 ` Eli Zaretskii
  2017-10-24 21:37   ` Oleksandr Gavenko
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2017-10-24 17:24 UTC (permalink / raw)
  To: gavenkoa; +Cc: 28924

> From: gavenkoa@gmail.com
> Date: Sat, 21 Oct 2017 18:17:13 +0300
> 
> All changelog entries placed on one line on vc-print-root-log for HG with \n
> symbols between entries.
> 
> When I changed:
> 
>  (defcustom vc-hg-root-log-format
>    `(,(concat "{rev}:{ifeq(branch, 'default','', '{branch}')}"
>               ":{bookmarks}:{tags}:{author|person}"
> -             " {date|shortdate} {desc|firstline}\\n")
> +             " {date|shortdate} {desc|firstline}\n")
> 
> it starts working fine.

I tried to reproduce this, but couldn't.  Can you show a complete
recipe, starting with "emacs -Q", and using some public hg repository
one can clone?

> I use hg.exe wrapper around Cygwin Python script hg, stripped version is:
> 
>   int main(int argc, char **argv) {
>     execvp(cmd, argv);
>   }
> 
> It comes after hg in PATH so execvp loads script instead itself.

It's possible that this intermediary wrapper is the culprit.  Is it
possible for you to use the native hg.exe?





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

* bug#28924: 25.3; All hg entries on single line possibly due to typo in vc-hg-root-log-format.
  2017-10-24 17:24 ` Eli Zaretskii
@ 2017-10-24 21:37   ` Oleksandr Gavenko
  2017-10-24 22:01     ` Ken Brown
  2017-10-25 14:46     ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Oleksandr Gavenko @ 2017-10-24 21:37 UTC (permalink / raw)
  Cc: 28924

On Tue, Oct 24, 2017 at 8:24 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> All changelog entries placed on one line on vc-print-root-log for HG with \n
>> symbols between entries.
>>
>> When I changed:
>>
>>  (defcustom vc-hg-root-log-format
>>    `(,(concat "{rev}:{ifeq(branch, 'default','', '{branch}')}"
>>               ":{bookmarks}:{tags}:{author|person}"
>> -             " {date|shortdate} {desc|firstline}\\n")
>> +             " {date|shortdate} {desc|firstline}\n")
>>
>> it starts working fine.
>
> I tried to reproduce this, but couldn't.  Can you show a complete
> recipe, starting with "emacs -Q", and using some public hg repository
> one can clone?
>
Hi! I troubleshooted another issue recently and found that
CYGWIN=noglob option cause problem when arguments passed from native
Windows app (Emacs) to Cygwin app.

In our situation with my fix \n resolved to new line character code by
Emacs and Cygwin is happy with it. With double slashes single one is
passed (with "n") to Cygwin application and I see long:

1544:::tip:Oleksandr Gavenko 2017-10-23 Make function silent if file
is modified.\n1543::::Oleksandr Gavenko 2017-10-22 Prefer Python 3 for
interactive shell.\n1542::::Oleksandr Gavenko 2017-10-21 Use UTF-8 on
Windows fpr processes.\n1541::::Oleksandr Gavenko 2017-10-11 Set font
size depending on DPI.\n1540::::Oleksandr Gavenko 2017-10-10 Mistaken
s-TAB key binding broke my workflow.\n.......

That is native Emacs with Cygwin wrapper to Cygwin hg. It can be that
no one on a planet works like that. I believe that people use native
ports of HG/GIT/ag/ack/etc.

Actually everything with backslash escaping is broken when CYGWIN=noglob.

I live with:

+  ;; Workaround for Cygwin shell, when set 'CYGWIN=noglob'. By
default 'shell-quote-argument'
+  ;; quoted by double '\' chars this cause failure.
+  (defun shell-quote-argument (argument)
+    (concat "'" argument "'"))

since 2011-08-05 and this has only one drawback - when quoted string
contains single quote...

Most of the time it's not a problem. Sometime I forget about this and
debugging session refreshes my memory when I face a problem ))

Cygwin Emacs w32 is not stable to day long usage. Due to BLODA fork()
it sticks once or twice a day.

Ideally I would like to have Cygwin Emacs with native Windows exec()
instead of unstable fork(). Emacs isn't server app that is needed the
fork().

Native Emacs don't have pty (and M-x term) and lack of smooth
integration with Cygwin. I use cygwin-mount.el and wrappers with .exe
suffix around Cygwin scripts to increase Emacs usefulness...

Without CYGWIN=noglob Emacs fail on some vc-hg.el commands as commands
passes '{rev}' and curly braces from native application are expanded
(stripped) by Cygwin apps.

Windows is extremely unpleasant platform for Emacs usage. With stable
Cygwin Emacs w32 this can be changed ))

Now we have Cygwin Emacs with native Windows widgets (emacs-w32). In
Cygwin list maintainer responded that it would accept patch for
replacing gam_server.exe with native port to Windows API to detect
file changes.

I would like to replace each Emacs Cygwin fork() with exec(). I'll ask
on dev list if it's possible and acceptable when I have enough spare
time for experiment.





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

* bug#28924: 25.3; All hg entries on single line possibly due to typo in vc-hg-root-log-format.
  2017-10-24 21:37   ` Oleksandr Gavenko
@ 2017-10-24 22:01     ` Ken Brown
  2017-10-25 10:50       ` Oleksandr Gavenko
  2017-10-25 14:46     ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Ken Brown @ 2017-10-24 22:01 UTC (permalink / raw)
  To: Oleksandr Gavenko; +Cc: 28924

On 10/24/2017 5:37 PM, Oleksandr Gavenko wrote:
> Cygwin Emacs w32 is not stable to day long usage. Due to BLODA fork()
> it sticks once or twice a day.

Are you using 32-bit Cygwin or 64-bit Cygwin?  I've never had fork 
issues with 64-bit Cygwin.

Ken






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

* bug#28924: 25.3; All hg entries on single line possibly due to typo in vc-hg-root-log-format.
  2017-10-24 22:01     ` Ken Brown
@ 2017-10-25 10:50       ` Oleksandr Gavenko
  0 siblings, 0 replies; 6+ messages in thread
From: Oleksandr Gavenko @ 2017-10-25 10:50 UTC (permalink / raw)
  To: Ken Brown; +Cc: 28924

On Wed, Oct 25, 2017 at 1:01 AM, Ken Brown <kbrown@cornell.edu> wrote:
> On 10/24/2017 5:37 PM, Oleksandr Gavenko wrote:
>>
>> Cygwin Emacs w32 is not stable to day long usage. Due to BLODA fork()
>> it sticks once or twice a day.
>
> Are you using 32-bit Cygwin or 64-bit Cygwin?  I've never had fork issues
> with 64-bit Cygwin.
>
64-bit Cygwin.

I forgot exact details when problem happen. I see forked Emacs which I
usually terminate. It's unclear what process is going to be started.

I work with files under Git or Hg so Emacs makes a lot of forks during a day.

Cygwin installation is in exclusion in Windows Defender.

Here's my report:

https://cygwin.com/ml/cygwin/2017-06/msg00126.html
  Sometimes Emacs sticks on forking...

Other also reported same instability but they have 3rd party anti
virus software.

I am glad to disable Windows Defender but for Windows 10 Home edition
they don't provide official way...





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

* bug#28924: 25.3; All hg entries on single line possibly due to typo in vc-hg-root-log-format.
  2017-10-24 21:37   ` Oleksandr Gavenko
  2017-10-24 22:01     ` Ken Brown
@ 2017-10-25 14:46     ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2017-10-25 14:46 UTC (permalink / raw)
  To: Oleksandr Gavenko; +Cc: 28924-done

> From: Oleksandr Gavenko <gavenkoa@gmail.com>
> Date: Wed, 25 Oct 2017 00:37:56 +0300
> Cc: 28924@debbugs.gnu.org
> 
> Hi! I troubleshooted another issue recently and found that
> CYGWIN=noglob option cause problem when arguments passed from native
> Windows app (Emacs) to Cygwin app.
> 
> In our situation with my fix \n resolved to new line character code by
> Emacs and Cygwin is happy with it. With double slashes single one is
> passed (with "n") to Cygwin application and I see long:
> 
> 1544:::tip:Oleksandr Gavenko 2017-10-23 Make function silent if file
> is modified.\n1543::::Oleksandr Gavenko 2017-10-22 Prefer Python 3 for
> interactive shell.\n1542::::Oleksandr Gavenko 2017-10-21 Use UTF-8 on
> Windows fpr processes.\n1541::::Oleksandr Gavenko 2017-10-11 Set font
> size depending on DPI.\n1540::::Oleksandr Gavenko 2017-10-10 Mistaken
> s-TAB key binding broke my workflow.\n.......
> 
> That is native Emacs with Cygwin wrapper to Cygwin hg. It can be that
> no one on a planet works like that. I believe that people use native
> ports of HG/GIT/ag/ack/etc.

Thanks for telling us.

Since your situation is very special, and since vc-hg-root-log-format
is a defcustom, I think for you to customize the value to make it work
in your setup is exactly the right solution of this problem.  So I'm
closing this bug report, as I think nothing has to be done for it in
Emacs core.





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

end of thread, other threads:[~2017-10-25 14:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-21 15:17 bug#28924: 25.3; All hg entries on single line possibly due to typo in vc-hg-root-log-format gavenkoa
2017-10-24 17:24 ` Eli Zaretskii
2017-10-24 21:37   ` Oleksandr Gavenko
2017-10-24 22:01     ` Ken Brown
2017-10-25 10:50       ` Oleksandr Gavenko
2017-10-25 14:46     ` Eli Zaretskii

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).