unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to
@ 2020-01-06 18:30 Jorge P. de Morais Neto
  2020-01-06 19:51 ` Eric Abrahamsen
  0 siblings, 1 reply; 13+ messages in thread
From: Jorge P. de Morais Neto @ 2020-01-06 18:30 UTC (permalink / raw)
  To: 38993; +Cc: eric

[-- Attachment #1: Very small EBDB database to reproduce the error --]
[-- Type: text/plain, Size: 916 bytes --]

;; Object ebdb-db-file
;; EBDB file-persistent database
(ebdb-db-file "ebdb-db-file"
  :file "ebdb"
  :label "File: ebdb"
  :uuid
  (ebdb-field-uuid "ebdb-field-uuid"
    :uuid "4d878781-a0c7-4c1b-8e9b-5ded097a9a89")
  :sync-time '(24083 31041 155826 700000)
  :records
  (list
    (ebdb-record-person "ebdb-record-person"
      :uuid
      (ebdb-field-uuid "ebdb-field-uuid"
        :uuid "196a6c43-c1cc-4c20-9e8a-23f4e30d4bf7")
      :creation-date
      (ebdb-field-creation-date "ebdb-field-creation-date"
        :timestamp '(24083 31034 623446 825000))
      :timestamp
      (ebdb-field-timestamp "ebdb-field-timestamp"
        :timestamp '(24083 31046 399326 700000))
      :notes
      (ebdb-field-notes "ebdb-field-notes"
        :notes "foo")
      :name
      (ebdb-field-name-complex "ebdb-field-name-complex"
        :surname "Doe"
        :given-names '("John"))))
  :record-class ebdb-record-person)

[-- Attachment #2: Type: text/plain, Size: 4522 bytes --]


Hi.  The latest EBDB (0.6.11) saves the database on Emacs exit even when
told not to.  To reproduce the error on a minimally customized Emacs:

1. Place the attached ebdb database on .emacs.d
2. Start Emacs and invoke M-x ebdb <RET><RET>
3. Move to the notes field of the John Doe record
4. Remove the field with C-k
5. Exit EBDB by pressing "q"
6. Hit C-x C-c to exit Emacs.  When asked whether to save the EBDB
   database, answer no.
7. Restart Emacs
8. Invoke M-x ebdb <RET><RET>
9. Notice that the database was altered.

In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.12)
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description:	Debian GNU/Linux 10 (buster)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading EBDB sources...
Initializing EBDB records... done
Formatting EBDB...done.

Configured using:
 'configure
 CONFIG_SHELL=/gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7/bin/bash
 SHELL=/gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7/bin/bash
 --prefix=/gnu/store/hg2qd5ggvnxq5gfdhxqpidhm3rr8vysr-emacs-26.3
 --enable-fast-install --with-modules --disable-build-details'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS GLIB NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS

Important settings:
  value of $EMACSLOADPATH: /home/jorge/.guix-profile/share/emacs/site-lisp:/home/jorge/.guix-profile/share/emacs/26.3/lisp
  value of $LC_MONETARY: pt_BR.UTF-8
  value of $LC_NUMERIC: pt_BR.UTF-8
  value of $LC_TIME: pt_BR.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: EBDB

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils ebdb-com crm mailabbrev ebdb-format ebdb cl-extra
help-mode eieio-opt speedbar sb-image ezimage dframe find-func
eieio-base pcase subr-x cal-menu calendar cal-loaddefs map timezone
elec-pair finder-inf info package easymenu epg-config url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars guix-emacs rx seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib time-date mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 144067 9239)
 (symbols 48 24680 2)
 (miscs 40 88 149)
 (strings 32 44118 1235)
 (string-bytes 1 1247821)
 (vectors 16 22805)
 (vector-slots 8 639565 8596)
 (floats 8 55 62)
 (intervals 56 288 0)
 (buffers 992 14))

-- 
- <https://jorgemorais.gitlab.io/justice-for-rms/>
- I am Brazilian.  I hope my English is correct and I welcome feedback.
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
- Free/libre software for Replicant, LineageOS and Android: https://f-droid.org
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]

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

* bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to
  2020-01-06 18:30 bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to Jorge P. de Morais Neto
@ 2020-01-06 19:51 ` Eric Abrahamsen
  2020-01-06 21:04   ` Jorge P. de Morais Neto
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Abrahamsen @ 2020-01-06 19:51 UTC (permalink / raw)
  To: Jorge P. de Morais Neto; +Cc: 38993

jorge+list@disroot.org (Jorge P. de Morais Neto) writes:

> Hi.  The latest EBDB (0.6.11) saves the database on Emacs exit even when
> told not to.  To reproduce the error on a minimally customized Emacs:

Probably you've also got `ebdb-save-on-exit' set to t -- that adds a
save hook to `kill-emacs-hook'. Try setting it to nil.

What you're seeing is the `buffer-offer-save' mechanism, which kicks in
both when you run `save-some-buffers' and before you kill Emacs. So
there's sort of two potential save mechanisms when you exit Emacs. If
that's annoying I could also provide an option for not offering to save
the database.





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

* bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to
  2020-01-06 19:51 ` Eric Abrahamsen
@ 2020-01-06 21:04   ` Jorge P. de Morais Neto
  2020-01-06 21:33     ` Eric Abrahamsen
  0 siblings, 1 reply; 13+ messages in thread
From: Jorge P. de Morais Neto @ 2020-01-06 21:04 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 38993

Em [2020-01-06 seg 11:51:48-0800], Eric Abrahamsen escreveu:

> Probably you've also got `ebdb-save-on-exit' set to t -- that adds a
> save hook to `kill-emacs-hook'.

Yes, it was t (the default).  I actually had read about it on the EBDB
manual, but, since Emacs was asking whether to save, I interpreted that
variable as whether Emacs would ask at all.  That is, I thought that if
the variable was t then Emacs would ask whether to save, and if it was
nil then Emacs would exit without saving and without any question.

> What you're seeing is the `buffer-offer-save' mechanism, which kicks
> in both when you run `save-some-buffers' and before you kill Emacs.
> So there's sort of two potential save mechanisms when you exit Emacs.
> If that's annoying I could also provide an option for not offering to
> save the database.

The current behavior is a bit counter-intuitive.  Not only for the
reason I provided above, but because, when I answer the question
positively (that I do want to save the buffer), Emacs asks for a file to
save the *EBDB* buffer.  It then saves _that_ buffer (with its human
readable contents) to the just-specified file, and also appears to save
the actual database to its file, even though for my test I had
previously set `ebdb-save-on-exit' to nil.  Apparently, answering
positively the buffer-offer-save question causes two saves.
Counter-intuitive.  And what if the user is confused -- thinking that
Emacs was asking whether to save the _actual database_ -- and then
provides the path of the database file?  Would not EBDB then save the
*EBDB* buffer there, overwriting the actual database, causing data loss?

Isn't it peculiar to EBDB that Emacs offers to save the
computer-generated contents of the *EBDB* buffer on exit?  IIRC, when I
exit Emacs it does not offer to save my Org Agenda (only the actual Org
files from which it generated the agenda), nor Dired buffers, nor any
other computer-generated buffer.

Regards
-- 
- <https://jorgemorais.gitlab.io/justice-for-rms/>
- I am Brazilian.  I hope my English is correct and I welcome feedback.
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
- Free/libre software for Replicant, LineageOS and Android: https://f-droid.org
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]





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

* bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to
  2020-01-06 21:04   ` Jorge P. de Morais Neto
@ 2020-01-06 21:33     ` Eric Abrahamsen
  2020-01-07 11:53       ` Jorge P. de Morais Neto
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Abrahamsen @ 2020-01-06 21:33 UTC (permalink / raw)
  To: Jorge P. de Morais Neto; +Cc: 38993

Jorge P. de Morais Neto <jorge+list@disroot.org> writes:

> Em [2020-01-06 seg 11:51:48-0800], Eric Abrahamsen escreveu:
>
>> Probably you've also got `ebdb-save-on-exit' set to t -- that adds a
>> save hook to `kill-emacs-hook'.
>
> Yes, it was t (the default).  I actually had read about it on the EBDB
> manual, but, since Emacs was asking whether to save, I interpreted that
> variable as whether Emacs would ask at all.  That is, I thought that if
> the variable was t then Emacs would ask whether to save, and if it was
> nil then Emacs would exit without saving and without any question.

I suppose I could have it do that (prompt for saving) rather than saving
silently. I guess I just assumed that in most cases users would want the
database saved, rather than discarding changes. I don't have very strong
feelings about it, though.

>> What you're seeing is the `buffer-offer-save' mechanism, which kicks
>> in both when you run `save-some-buffers' and before you kill Emacs.
>> So there's sort of two potential save mechanisms when you exit Emacs.
>> If that's annoying I could also provide an option for not offering to
>> save the database.

[...]

> Isn't it peculiar to EBDB that Emacs offers to save the
> computer-generated contents of the *EBDB* buffer on exit? IIRC, when I
> exit Emacs it does not offer to save my Org Agenda (only the actual Org
> files from which it generated the agenda), nor Dired buffers, nor any
> other computer-generated buffer.

This is an error, either in Emacs or EBDB, I'm not sure. I originally
implemented the ability for special-mode buffers to offer themselves as
saveable, but the idea was that, if they saved themselves using their
own function, Emacs wouldn't then *also* save the buffer itself in a
file.

Either my code in Emacs or my code in EBDB has a bug, I haven't gone and
figured out which. I'll try to do that soon.

Eric





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

* bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to
  2020-01-06 21:33     ` Eric Abrahamsen
@ 2020-01-07 11:53       ` Jorge P. de Morais Neto
  2020-01-07 18:42         ` Eric Abrahamsen
  0 siblings, 1 reply; 13+ messages in thread
From: Jorge P. de Morais Neto @ 2020-01-07 11:53 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 38993

Em [2020-01-06 seg 13:33:55-0800], Eric Abrahamsen escreveu:

> I suppose I could have it do that (prompt for saving) rather than
> saving silently.  I guess I just assumed that in most cases users
> would want the database saved, rather than discarding changes.  I
> don't have very strong feelings about it, though.

In principle I want consistency with the rest of GNU Emacs.  IIRC, Emacs
generally does not overwrite without asking.  There is the auto-save
functionality, but it saves to *separate* files.  However I should
disclaim that I have never studied human-machine interaction and I too
do not have strong feelings about this.

> This is an error, either in Emacs or EBDB, I'm not sure.  I originally
> implemented the ability for special-mode buffers to offer themselves
> as saveable, but the idea was that, if they saved themselves using
> their own function, Emacs wouldn't then *also* save the buffer itself
> in a file.
>
> Either my code in Emacs or my code in EBDB has a bug, I haven't gone
> and figured out which.  I'll try to do that soon.

Yes, by default Emacs should not ask to save the computer-generated
"*EBDB*" buffer.  Regarding the database, I think that if
`ebdb-save-on-exit' is nil then either:
1. Emacs should not ask to save the database on exit; or
2. The EBDB documentation should explicitly mention that Emacs will ask;
   and the behavior should be altered so that, when the user answers no,
   then Emacs should not save the database.

Oh, and thank you for this great package!  Do you have a mechanism for
accepting donations?  I unfortunately would donate just a little at this
moment, but I intend to donate more in the future when my financial
situation improves and/or the Brazilian Real gains value against the US
dollar.  Also, even very small donations may add up.

Regards

-- 
- <https://jorgemorais.gitlab.io/justice-for-rms/>
- I am Brazilian.  I hope my English is correct and I welcome feedback.
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
- Free/libre software for Replicant, LineageOS and Android: https://f-droid.org
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]





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

* bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to
  2020-01-07 11:53       ` Jorge P. de Morais Neto
@ 2020-01-07 18:42         ` Eric Abrahamsen
  2020-01-08 13:28           ` Jorge P. de Morais Neto
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Abrahamsen @ 2020-01-07 18:42 UTC (permalink / raw)
  To: Jorge P. de Morais Neto; +Cc: 38993

Jorge P. de Morais Neto <jorge+list@disroot.org> writes:

> Em [2020-01-06 seg 13:33:55-0800], Eric Abrahamsen escreveu:
>
>> I suppose I could have it do that (prompt for saving) rather than
>> saving silently.  I guess I just assumed that in most cases users
>> would want the database saved, rather than discarding changes.  I
>> don't have very strong feelings about it, though.
>
> In principle I want consistency with the rest of GNU Emacs.  IIRC, Emacs
> generally does not overwrite without asking.  There is the auto-save
> functionality, but it saves to *separate* files.  However I should
> disclaim that I have never studied human-machine interaction and I too
> do not have strong feelings about this.

Yes, I think consistency is the best thing to aim for. FWIW, what we're
talking about isn't auto-save (EBDB has its own mechanism for auto-save,
which is silent), but about behavior during `save-some-buffers'.

>> This is an error, either in Emacs or EBDB, I'm not sure. I originally
>> implemented the ability for special-mode buffers to offer themselves
>> as saveable, but the idea was that, if they saved themselves using
>> their own function, Emacs wouldn't then *also* save the buffer itself
>> in a file.
>>
>> Either my code in Emacs or my code in EBDB has a bug, I haven't gone
>> and figured out which.  I'll try to do that soon.
>
> Yes, by default Emacs should not ask to save the computer-generated
> "*EBDB*" buffer.  Regarding the database, I think that if
> `ebdb-save-on-exit' is nil then either:
> 1. Emacs should not ask to save the database on exit; or
> 2. The EBDB documentation should explicitly mention that Emacs will ask;
>    and the behavior should be altered so that, when the user answers no,
>    then Emacs should not save the database.

The problems is that, when you exit Emacs, it first runs
`save-some-buffers' -- which will prompt the user to possibly save the
database -- and then runs the `kill-emacs-hook'. So if you've said
"don't save" to the `save-some-buffers' prompt, the kill emacs hook
doesn't know that, and might save the database anyway.

To complicate things, the save-some-buffers prompt only runs if you have
live *EBDB* buffers. It's entirely possible to have a loaded database
with unsaved changes, but no buffers, in which case `save-some-buffers'
won't do anything at all.

Give me a bit to chew on this. I think I have a sense of the desired
behavior, it will just be a matter of getting to it.

> Oh, and thank you for this great package! Do you have a mechanism for
> accepting donations? I unfortunately would donate just a little at this
> moment, but I intend to donate more in the future when my financial
> situation improves and/or the Brazilian Real gains value against the US
> dollar.  Also, even very small donations may add up.

I'm glad it's useful to you! I hadn't really thought about donations, I
suppose it makes me a tiny bit uncomfortable. But I see Github has a
sponsorship thing, I suppose it wouldn't hurt to sign up!

Eric





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

* bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to
  2020-01-07 18:42         ` Eric Abrahamsen
@ 2020-01-08 13:28           ` Jorge P. de Morais Neto
  2020-01-08 18:54             ` Eric Abrahamsen
  0 siblings, 1 reply; 13+ messages in thread
From: Jorge P. de Morais Neto @ 2020-01-08 13:28 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 38993

Em [2020-01-07 ter 10:42:55-0800], Eric Abrahamsen escreveu:

> Jorge P. de Morais Neto <jorge+list@disroot.org> writes:
>
>> In principle I want consistency with the rest of GNU Emacs.  IIRC,
>> Emacs generally does not overwrite without asking.  There is the
>> auto-save functionality, but it saves to *separate* files.
>
> Yes, I think consistency is the best thing to aim for.

Good.

> FWIW, what we're talking about isn't auto-save

I know.  I only mentioned Emacs auto-save as a generic example that
(IIRC) Emacs never overwrites user data without asking, regardless of
mechanism.

Oh, and in my quick testing in Spacemacs (this time I didn't start a
minimally customized instance), setting `ebdb-save-on-exit' to nil
(either with `setq' or with Customize) has no effect if EBDB is already
open.  I believe it would be better to change this behavior.  One reason
is that it is counter-intuitive.  Another is that the user might open
EBDB, make some changes and then realize she does not want to persist
them.

> I'm glad it's useful to you!  I hadn't really thought about donations,
> I suppose it makes me a tiny bit uncomfortable.  But I see Github has
> a sponsorship thing, I suppose it wouldn't hurt to sign up!

Good!  It would be even better if you had a more free-software-friendly
mechanism of donation.  Maybe Liberapay?  By the way, if you could
entirely move away from GitHub, some of us would be happier.

Regards
-- 
- <https://jorgemorais.gitlab.io/justice-for-rms/>
- I am Brazilian.  I hope my English is correct and I welcome feedback.
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
- Free/libre software for Replicant, LineageOS and Android: https://f-droid.org
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]





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

* bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to
  2020-01-08 13:28           ` Jorge P. de Morais Neto
@ 2020-01-08 18:54             ` Eric Abrahamsen
  2020-01-11 21:15               ` Jorge P. de Morais Neto
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Abrahamsen @ 2020-01-08 18:54 UTC (permalink / raw)
  To: Jorge P. de Morais Neto; +Cc: 38993

Jorge P. de Morais Neto <jorge+list@disroot.org> writes:

[...]

> Oh, and in my quick testing in Spacemacs (this time I didn't start a
> minimally customized instance), setting `ebdb-save-on-exit' to nil
> (either with `setq' or with Customize) has no effect if EBDB is already
> open. I believe it would be better to change this behavior. One reason
> is that it is counter-intuitive. Another is that the user might open
> EBDB, make some changes and then realize she does not want to persist
> them.

Okay, I guess that would work: always add a hook, but only actually do
the save if `ebdb-save-on-exit' is t. So if you have open *EBDB*
buffers, and unsaved changes, but you set `ebdb-save-on-exit' to nil,
then when you kill Emacs you'll still get prompted to save EBDB, but if
you say "no" then nothing further will happen.

Note that you can (I think) also dump unsaved changes by running
`ebdb-reload-database' on the database in question. Come to think of it,
that command should ask for confirmation before reloading, if the
database has unsaved changes.

>> I'm glad it's useful to you! I hadn't really thought about donations,
>> I suppose it makes me a tiny bit uncomfortable. But I see Github has
>> a sponsorship thing, I suppose it wouldn't hurt to sign up!
>
> Good! It would be even better if you had a more free-software-friendly
> mechanism of donation. Maybe Liberapay? By the way, if you could
> entirely move away from GitHub, some of us would be happier.

Oh, Liberapay looks good! I realized GitHub Sponsors only lets you set
up recurring monthly payments, which doesn't seem very likely. Anyway,
I have no real expectations.

I have an account at SourceHut, which is very FOSS-friendly, but so far
haven't put any repos there, maybe I could consider moving.

Eric





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

* bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to
  2020-01-08 18:54             ` Eric Abrahamsen
@ 2020-01-11 21:15               ` Jorge P. de Morais Neto
  2020-01-12 17:38                 ` Eric Abrahamsen
  0 siblings, 1 reply; 13+ messages in thread
From: Jorge P. de Morais Neto @ 2020-01-11 21:15 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 38993

Em [2020-01-08 qua 10:54:35-0800], Eric Abrahamsen escreveu:

> Okay, I guess that would work: always add a hook, but only actually do
> the save if `ebdb-save-on-exit' is t.  So if you have open *EBDB*
> buffers, and unsaved changes, but you set `ebdb-save-on-exit' to nil,
> then when you kill Emacs you'll still get prompted to save EBDB, but if
> you say "no" then nothing further will happen.

That would be a step in the right direction.  In addition to this you
could improve the weird (and arguably harmful) EBDB idiosyncrasies that
we previously talked about:

1. misleading the user by asking whether to save but then, if
   `ebdb-save-on-exit' is t, saving the database anyway even if the user
   answered in the negative; and
2. saving the "*EBDB*" buffer itself, which I believe is not useful.

And the `ebdb-save-on-exit' option could be renamed to
`ebdb-silently-save-on-exit', or, if that is too verbose, then at least
its documentation should emphasize that Emacs will save with no
questions asked.

> I have an account at SourceHut, which is very FOSS-friendly, but so
> far haven't put any repos there, maybe I could consider moving.

You might want to consult
<https://libreplanet.org/wiki/Fsf_2019_forge_evaluation>, as well as
discussing the options with the free software community on IRC or XMPP.
I myself have chosen GitLab to host my very simple static website.  I
based the decision on GitLab's features, ease of use, and the C ethics
grade from the FSF, a grade which seemed acceptable to me.  However I
later learned that, at least according to the aforementioned LibrePlanet
page, the GitLab ethics evaluation regressed.  I guess I should move
away from it.

By the way, if you forgive my impertinence, I suggest saying
"free/libre" rather than "FLOSS", or, even worse, "FOSS".  Please see
<https://www.gnu.org/philosophy/floss-and-foss.en.html>.

Regards
-- 
- <https://jorgemorais.gitlab.io/justice-for-rms/>
- I am Brazilian.  I hope my English is correct and I welcome feedback.
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
- Free/libre software for Replicant, LineageOS and Android: https://f-droid.org
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]





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

* bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to
  2020-01-11 21:15               ` Jorge P. de Morais Neto
@ 2020-01-12 17:38                 ` Eric Abrahamsen
  2020-01-14 14:12                   ` Jorge P. de Morais Neto
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Abrahamsen @ 2020-01-12 17:38 UTC (permalink / raw)
  To: Jorge P. de Morais Neto; +Cc: 38993

Jorge P. de Morais Neto <jorge+list@disroot.org> writes:

> Em [2020-01-08 qua 10:54:35-0800], Eric Abrahamsen escreveu:
>
>> Okay, I guess that would work: always add a hook, but only actually do
>> the save if `ebdb-save-on-exit' is t.  So if you have open *EBDB*
>> buffers, and unsaved changes, but you set `ebdb-save-on-exit' to nil,
>> then when you kill Emacs you'll still get prompted to save EBDB, but if
>> you say "no" then nothing further will happen.
>
> That would be a step in the right direction.  In addition to this you
> could improve the weird (and arguably harmful) EBDB idiosyncrasies that
> we previously talked about:
>
> 1. misleading the user by asking whether to save but then, if
>    `ebdb-save-on-exit' is t, saving the database anyway even if the user
>    answered in the negative; and
> 2. saving the "*EBDB*" buffer itself, which I believe is not useful.
>
> And the `ebdb-save-on-exit' option could be renamed to
> `ebdb-silently-save-on-exit', or, if that is too verbose, then at least
> its documentation should emphasize that Emacs will save with no
> questions asked.

I've already fixed #2 above, I just haven't made a new release yet (I'll
try to get the rest of the bugs you raised fixed first).

I still don't have a good solution for the first problem. I guess what
I'm leaning toward is 1: adding a note to the documentation/manual about
this weirdness, and 2: defaulting `ebdb-save-on-exit' to nil. The
average user will be using EBDB interactively, meaning that they'll get
the prompt both at "C-x s" and when killing Emacs. The
`ebdb-save-on-exit' option could be reserved for hackers who are using
EBDB in some more peculiar fashion.

>> I have an account at SourceHut, which is very FOSS-friendly, but so
>> far haven't put any repos there, maybe I could consider moving.
>
> You might want to consult
> <https://libreplanet.org/wiki/Fsf_2019_forge_evaluation>, as well as
> discussing the options with the free software community on IRC or XMPP.
> I myself have chosen GitLab to host my very simple static website.  I
> based the decision on GitLab's features, ease of use, and the C ethics
> grade from the FSF, a grade which seemed acceptable to me.  However I
> later learned that, at least according to the aforementioned LibrePlanet
> page, the GitLab ethics evaluation regressed.  I guess I should move
> away from it.

It looks to me like SourceHut is licensed under the GPL
(https://git.sr.ht/~sircmpwn/git.sr.ht/tree/master/LICENSE), so I'm
hoping that's an A! Or at least a B.

> By the way, if you forgive my impertinence, I suggest saying
> "free/libre" rather than "FLOSS", or, even worse, "FOSS".  Please see
> <https://www.gnu.org/philosophy/floss-and-foss.en.html>.

Thanks for that! No impertinence, I'll admit it's something I haven't
read or really thought much about before. I'll be aware of it from here
on out.

Thanks,
Eric





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

* bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to
  2020-01-12 17:38                 ` Eric Abrahamsen
@ 2020-01-14 14:12                   ` Jorge P. de Morais Neto
  2020-01-14 22:53                     ` Eric Abrahamsen
  0 siblings, 1 reply; 13+ messages in thread
From: Jorge P. de Morais Neto @ 2020-01-14 14:12 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 38993

Em [2020-01-12 dom 09:38:20-0800], Eric Abrahamsen escreveu:

> I still don't have a good solution for the first problem.  I guess
> what I'm leaning toward is 1: adding a note to the
> documentation/manual about this weirdness, and 2: defaulting
> `ebdb-save-on-exit' to nil.  The average user will be using EBDB
> interactively, meaning that they'll get the prompt both at "C-x s" and
> when killing Emacs.  The `ebdb-save-on-exit' option could be reserved
> for hackers who are using EBDB in some more peculiar fashion.

I think that would be consistent with the rest of Emacs and even other
desktop applications like LibreOffice.  But EBDB also has auto-save (as
in Emacs 26.3 manual section 18.6 -- "Auto-Saving: Protection Against
Disasters"), right?

> It looks to me like SourceHut is licensed under the GPL
> (https://git.sr.ht/~sircmpwn/git.sr.ht/tree/master/LICENSE), so I'm
> hoping that's an A! Or at least a B.

I lack knowledge of the situation and feel insecure myself in the choice
of software forge, but still I would like give you the following URL:
<https://sourcehut.org/alpha-details/>

> Thanks for that! No impertinence, I'll admit it's something I haven't
> read or really thought much about before. I'll be aware of it from here
> on out.

Nice!

Regards
-- 
- <https://jorgemorais.gitlab.io/justice-for-rms/>
- I am Brazilian.  I hope my English is correct and I welcome feedback.
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
- Free/libre software for Replicant, LineageOS and Android: https://f-droid.org
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]





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

* bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to
  2020-01-14 14:12                   ` Jorge P. de Morais Neto
@ 2020-01-14 22:53                     ` Eric Abrahamsen
  2020-01-18 19:38                       ` Eric Abrahamsen
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Abrahamsen @ 2020-01-14 22:53 UTC (permalink / raw)
  To: Jorge P. de Morais Neto; +Cc: 38993

Jorge P. de Morais Neto <jorge+list@disroot.org> writes:

> Em [2020-01-12 dom 09:38:20-0800], Eric Abrahamsen escreveu:
>
>> I still don't have a good solution for the first problem.  I guess
>> what I'm leaning toward is 1: adding a note to the
>> documentation/manual about this weirdness, and 2: defaulting
>> `ebdb-save-on-exit' to nil.  The average user will be using EBDB
>> interactively, meaning that they'll get the prompt both at "C-x s" and
>> when killing Emacs.  The `ebdb-save-on-exit' option could be reserved
>> for hackers who are using EBDB in some more peculiar fashion.
>
> I think that would be consistent with the rest of Emacs and even other
> desktop applications like LibreOffice.

Cool, that's done.

> But EBDB also has auto-save (as in Emacs 26.3 manual section 18.6 --
> "Auto-Saving: Protection Against Disasters"), right?

Yes, but personally I shut it off on my databases because the
eieio-persistent save routine is horribly slow, and I don't want my
Emacs locking up for several seconds when auto-saving is happening.

>> It looks to me like SourceHut is licensed under the GPL
>> (https://git.sr.ht/~sircmpwn/git.sr.ht/tree/master/LICENSE), so I'm
>> hoping that's an A! Or at least a B.
>
> I lack knowledge of the situation and feel insecure myself in the choice
> of software forge, but still I would like give you the following URL:
> <https://sourcehut.org/alpha-details/>

Oh I know :) I don't put anything in there I don't have mirrored
elsewhere. But I do pay for my account, so the maintainer can get to
beta faster.

New release as soon as I've got the Org tags thing fixed...





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

* bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to
  2020-01-14 22:53                     ` Eric Abrahamsen
@ 2020-01-18 19:38                       ` Eric Abrahamsen
  0 siblings, 0 replies; 13+ messages in thread
From: Eric Abrahamsen @ 2020-01-18 19:38 UTC (permalink / raw)
  To: Jorge P. de Morais Neto; +Cc: 38993, 38993-done

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

[...]

> New release as soon as I've got the Org tags thing fixed...

That's taking too long, so I've done a bugfix release in the meantime,
and am closing this.

Thanks,
Eric





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

end of thread, other threads:[~2020-01-18 19:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-06 18:30 bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to Jorge P. de Morais Neto
2020-01-06 19:51 ` Eric Abrahamsen
2020-01-06 21:04   ` Jorge P. de Morais Neto
2020-01-06 21:33     ` Eric Abrahamsen
2020-01-07 11:53       ` Jorge P. de Morais Neto
2020-01-07 18:42         ` Eric Abrahamsen
2020-01-08 13:28           ` Jorge P. de Morais Neto
2020-01-08 18:54             ` Eric Abrahamsen
2020-01-11 21:15               ` Jorge P. de Morais Neto
2020-01-12 17:38                 ` Eric Abrahamsen
2020-01-14 14:12                   ` Jorge P. de Morais Neto
2020-01-14 22:53                     ` Eric Abrahamsen
2020-01-18 19:38                       ` Eric Abrahamsen

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