From unknown Thu Jun 19 14:19:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#32000 <32000@debbugs.gnu.org> To: bug#32000 <32000@debbugs.gnu.org> Subject: Status: 26.1; Behavior of buffer-offer-save not lining up with documentation Reply-To: bug#32000 <32000@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:19:20 +0000 retitle 32000 26.1; Behavior of buffer-offer-save not lining up with docume= ntation reassign 32000 emacs submitter 32000 Brad Lindsay severity 32000 minor tag 32000 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 28 19:01:21 2018 Received: (at submit) by debbugs.gnu.org; 28 Jun 2018 23:01:21 +0000 Received: from localhost ([127.0.0.1]:39008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYfui-0000Ey-OU for submit@debbugs.gnu.org; Thu, 28 Jun 2018 19:01:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYfqh-00005r-Cy for submit@debbugs.gnu.org; Thu, 28 Jun 2018 18:57:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYfqa-0000Oh-Gg for submit@debbugs.gnu.org; Thu, 28 Jun 2018 18:57:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38176) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fYfqa-0000OI-CA for submit@debbugs.gnu.org; Thu, 28 Jun 2018 18:57:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYfqY-0002nh-Ib for bug-gnu-emacs@gnu.org; Thu, 28 Jun 2018 18:57:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYfqW-0000Ey-Sj for bug-gnu-emacs@gnu.org; Thu, 28 Jun 2018 18:57:02 -0400 Received: from mail-qt0-x22e.google.com ([2607:f8b0:400d:c0d::22e]:44819) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYfqW-0000Cy-MT for bug-gnu-emacs@gnu.org; Thu, 28 Jun 2018 18:57:00 -0400 Received: by mail-qt0-x22e.google.com with SMTP id 92-v6so6295746qta.11 for ; Thu, 28 Jun 2018 15:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:date:message-id:subject:to :content-transfer-encoding; bh=7XuRdfqknm/l6cL/fALPBN1qILXPs8gctzPuuFMRhnQ=; b=BmD9aaAr96RQlnqg14FLb9bNq65l4MA66GYpIo1Oa8ft0uZwPkw08Q5a0+l+bgBzSn yxYW2MO/QJrNgD2pSz2lkZ09rlbdtn+MDzPiREc0t2URMoMe9Th+VtMx3Vv/wC/wFtY5 yCWh3vf47ylf5vG2ukmUzUE67JLUFFBFjV8GUe4iS4Z9J2LJDwAzT8uztV/7NeGPuigZ YpcPCCLJ0ZVK5fpwKXUQRF1I1yLTKU4FNC0zS+3XqoDaDaM7MbY5WWQaVta8AvTixzZg pqEgLFHo2z3cCelLsmShC+kWdRL5n7cPhKTlX+6beInU/jDdYEWybxub5Izox6Jh3FKD n/Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:date:message-id:subject:to :content-transfer-encoding; bh=7XuRdfqknm/l6cL/fALPBN1qILXPs8gctzPuuFMRhnQ=; b=TcviWNXtpG1LyqYv7h8MLb7ihIVRL7Vi3rzZ6bs40ewzqgOBp3vrATVQkYrLAVPC6G j+Xa8s381MR/8D31uQMKNd9eJaAR7Pvghi1FX+j8/uGrMU7IFsnwc0Gu9jDvq90VjXFt GDpleI7ndXheEF+KcP9aFaqDKklYG2LfeSEXyH5nucDYKdMqneVtlA5yfSNWIv+THxqa TDmhwYO+nhVbTbvifUXYT3KoqP6pN9FZFYtfz1sM9eMLJBDQDom63jsZXfmMrS2Fa9dS U3VzRniJF1KUOuqOqi3mvTJKOoVqUcxJ+h85PXdeJq+GXuwQuTzIM6+15UVOQkmubTQp aHww== X-Gm-Message-State: APt69E2F2M9DuFHmi0wo011HHTmUkUqnj3uVpLYwH0oZH+cLt4KSMDWw mY08fHbR7Ima6oig0cCQ6sG5iIJL5/Xy3rGzxVE= X-Google-Smtp-Source: AAOMgpfo7pM/S3wKEASVr5iK8y21lnZ1s+Rnhdaku/9QqW4MhiTOeCY/8YNagt3gwQfmQmNLK+H8DMC87ALJI+fPZqQ= X-Received: by 2002:ac8:100c:: with SMTP id z12-v6mr10742213qti.394.1530226619432; Thu, 28 Jun 2018 15:56:59 -0700 (PDT) Received: from 1058052472880 named unknown by gmailapi.google.com with HTTPREST; Thu, 28 Jun 2018 15:56:59 -0700 From: Brad Lindsay X-Mailer: Airmail (492) MIME-Version: 1.0 Date: Thu, 28 Jun 2018 15:56:59 -0700 Message-ID: Subject: 26.1; Behavior of buffer-offer-save not lining up with documentation To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 28 Jun 2018 19:01:19 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) I am trying to create a function that creates a new empty buffer that prompts you to save it when you kill it. Reading through the documentation, it looks like I need to set =E2=80=9Cbuffer-offer-save=E2=80= =9D to a non-nil value since the new buffer is not a file-visiting buffer. I have tried doing that, and verifying that the variable isn=E2=80=99t set an= d that the new buffer isn=E2=80=99t empty, but when I close (kill) the buffer= , I don=E2=80=99t get a prompt. Here is my function definition: (defun buffer-new () =C2=A0 "Creates a new Untitled buffer with the same modes as the current on= e." =C2=A0 (interactive) =C2=A0 (let =C2=A0 =C2=A0 =C2=A0 ((new-buffer (generate-new-buffer "Untitled")) =C2=A0 =C2=A0 =C2=A0 =C2=A0(mode major-mode)) =C2=A0 =C2=A0 (switch-to-buffer new-buffer) =C2=A0 =C2=A0 (funcall mode) =C2=A0 =C2=A0 (setq buffer-offer-save t) =C2=A0 =C2=A0 new-buffer) =C2=A0 ) In GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511)) =C2=A0of 2018-05-30 built on builder10-10.porkrind.org Windowing system distributor 'Apple', version 10.3.1641 Recent messages: Wrote /Users/bladmin/.emacs.d/init/editor.el C-c C-g is undefined Importing package-keyring.gpg...done Package refresh done C-c h is undefined Type C-x 1 to delete the help window. Mark set [2 times] Saving file /Users/bladmin/.emacs.d/init/editor.el... Wrote /Users/bladmin/.emacs.d/init/editor.el Quit Configured using: =C2=A0'configure --with-ns '--enable-locallisppath=3D/Library/Application =C2=A0Support/Emacs/${version}/site-lisp:/Library/Application =C2=A0Support/Emacs/site-lisp' --with-modules' Configured features: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS Important settings: =C2=A0 value of $LANG: en_US.UTF-8 =C2=A0 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: =C2=A0 diff-auto-refine-mode: t =C2=A0 subword-mode: t =C2=A0 display-line-numbers-mode: t =C2=A0 company-flx-mode: t =C2=A0 company-mode: t =C2=A0 desktop-save-mode: t =C2=A0 yas-minor-mode: t =C2=A0 global-origami-mode: t =C2=A0 origami-mode: t =C2=A0 projectile-mode: t =C2=A0 ido-vertical-mode: t =C2=A0 flx-ido-mode: t =C2=A0 ido-everywhere: t =C2=A0 xterm-mouse-mode: t =C2=A0 delete-selection-mode: t =C2=A0 electric-pair-mode: t =C2=A0 show-paren-mode: t =C2=A0 global-auto-revert-mode: t =C2=A0 tooltip-mode: t =C2=A0 global-eldoc-mode: t =C2=A0 eldoc-mode: t =C2=A0 electric-indent-mode: t =C2=A0 mouse-wheel-mode: t =C2=A0 menu-bar-mode: t =C2=A0 file-name-shadow-mode: t =C2=A0 global-font-lock-mode: t =C2=A0 font-lock-mode: t =C2=A0 blink-cursor-mode: t =C2=A0 auto-composition-mode: t =C2=A0 auto-encryption-mode: t =C2=A0 auto-compression-mode: t =C2=A0 column-number-mode: t =C2=A0 line-number-mode: t =C2=A0 transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug sendmail pp cl-print help-fns radix-tree mm-archive message dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived gnus-util rmail rmail-loaddefs mailabbrev gmm-utils mailheader mm-decode mm-bodies mm-encode mail-utils network-stream starttls url-cache epg rspec-mode robe inf-ruby ruby-mode vc-git diff-mode company-oddmuse company-keywords company-etags company-gtags company-files company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-bbdb company-robe cap-words superword subword display-line-numbers exec-path-from-shell web-mode disp-table pug-mode alchemist alchemist-macroexpand alchemist-company alchemist-help alchemist-complete company-dabbrev-code company-dabbrev alchemist-refcard alchemist-phoenix alchemist-compile alchemist-iex alchemist-message easy-mmode alchemist-hooks alchemist-hex alchemist-mix alchemist-info alchemist-goto alchemist-scope etags xref project alchemist-eval alchemist-interact alchemist-server alchemist-execute alchemist-report alchemist-test-mode alchemist-project alchemist-file alchemist-key alchemist-utils elixir-mode elixir-format pkg-info url-http tls gnutls url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm rmc puny find-func lisp-mnt epl elixir-smie company-flx company pcase elm-mode elm-interactive url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap subr-x elm-font-lock elm-indent elm-imenu imenu elm-format elm-tags elm-util let-alist json map f dockerfile-mode sh-script smie executable yaml-mode chruby desktop frameset cus-start cus-load yasnippet key-chord cl-extra help-mode hydra lv neotree origami origami-parsers rx cl s dash projectile grep compile comint ansi-color ring ibuf-ext ibuffer ibuffer-loaddefs thingatpt ido-vertical-mode flx-ido advice flx ido material_darker-theme xt-mouse delsel elec-pair paren autorevert filenotify edmacro kmacro 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 seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win 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 kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 478806 471794) =C2=A0(symbols 48 37892 10) =C2=A0(miscs 40 1233 376) =C2=A0(strings 32 113275 66990) =C2=A0(string-bytes 1 4372073) =C2=A0(vectors 16 68500) =C2=A0(vector-slots 8 1933976 243756) =C2=A0(floats 8 104 570) =C2=A0(intervals 56 996 636) =C2=A0(buffers 992 18)) From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 28 19:33:45 2018 Received: (at 32000) by debbugs.gnu.org; 28 Jun 2018 23:33:45 +0000 Received: from localhost ([127.0.0.1]:39017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYgQ5-000143-LE for submit@debbugs.gnu.org; Thu, 28 Jun 2018 19:33:45 -0400 Received: from mail-io0-f176.google.com ([209.85.223.176]:47054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYgQ3-00013o-Ph for 32000@debbugs.gnu.org; Thu, 28 Jun 2018 19:33:44 -0400 Received: by mail-io0-f176.google.com with SMTP id u23-v6so6819479ioc.13 for <32000@debbugs.gnu.org>; Thu, 28 Jun 2018 16:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=WdhnfQMmv7EDFwnEpopMgM8uKxbKXEI744r7FV7ZZkw=; b=ajfUf/DZcSnCXUv4shMKZsklAuqx+QQbmEzMns2hSFj0oxUnLCxR5Ar3BaETy7xIvr 3Jld3O1UJGowomwwK9CF3+lrDJPIgAqJd90ac8RddoKgxBAnQJXjnpn+3whw56LvmFfH jQ3I7G0clW9lzN2ZHQaMppsa+yAMpKbG/7Wwgy7e9qSIN685XpDEX8NCMxkbc0sC5xtC +uCrH5iPawRgJmaraiUyoQjMI2VzaGZXpe70xkaksvdgpjwJBAeG1M2HdM0XnO1Ps8Ut k0yoJmTK1uN52Tiy/oQKEmAQ/x6EhyAyjQq4Vj4jE3sySRiTU/QKwPzfTFpet+mh0yFS 1ltw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=WdhnfQMmv7EDFwnEpopMgM8uKxbKXEI744r7FV7ZZkw=; b=b+bI7VL7kBUR5cA3XxSJDppBn/fm66DS/viOb2x9g/O2HO7HdgK4lb8NoqIdRJ3wrc e4oZlaLKkcYsh0temye1tMvM7lv/LqjLlWTuLYh86zZlgi6Y4Vd2DOKBYELE2J1QPYq4 jWtxyKISFE303cKL014CH+k1pxJC7ET+b6SC68a0d4J7bZc1ern/Q+7z5vVj/chKNrWc zpcD6ijELfGFBmfO4Z5Dp7x0ih1BatuokPwN6TFRhMmMk4+9plJTB+hqbf/gQtFgvgVb Q8pVsQW6UCdcjV+YOxsQDkO/MYoa2vSbxvUdjhGk9sglOVFCZTvtr1/IqHXmO6TpHX4d K+UA== X-Gm-Message-State: APt69E2E6x9Ep+K3BZEU4AzL1a4AYPSFeh0/DcEtJMASODr2sOIvc4xs z8rDrvovN5PYa7LezFsUg75Gvw== X-Google-Smtp-Source: AAOMgpdAByOh5Oib0rdmgoigLhnzDKWONf00K1PCnekTO279wGJWoI/w0+TrKQ3Ho6FVcVzZbJxsNg== X-Received: by 2002:a6b:3942:: with SMTP id g63-v6mr9855644ioa.225.1530228818131; Thu, 28 Jun 2018 16:33:38 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id x8-v6sm23968ith.17.2018.06.28.16.33.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 16:33:37 -0700 (PDT) From: Noam Postavsky To: Brad Lindsay Subject: Re: bug#32000: 26.1; Behavior of buffer-offer-save not lining up with documentation References: Date: Thu, 28 Jun 2018 19:33:35 -0400 In-Reply-To: (Brad Lindsay's message of "Thu, 28 Jun 2018 15:56:59 -0700") Message-ID: <87in62o59s.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32000 Cc: 32000@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Brad Lindsay writes: > I am trying to create a function that creates a new empty buffer that > prompts you to save it when you kill it. Reading through the > documentation, it looks like I need to set =E2=80=9Cbuffer-offer-save=E2= =80=9D to a > non-nil value since the new buffer is not a file-visiting buffer. I > have tried doing that, and verifying that the variable isn=E2=80=99t set = and > that the new buffer isn=E2=80=99t empty, but when I close (kill) the buff= er, I > don=E2=80=99t get a prompt. buffer-offer-save is for killing Emacs or save-some-buffers, to catch buffer killing use kill-buffer-query-functions. We could probably make the docs a bit more explicit about this. Or maybe we should enhance buffer-offer-save to cover the buffer killing case too, it seems a bit silly to require setting both. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 28 20:48:51 2018 Received: (at 32000) by debbugs.gnu.org; 29 Jun 2018 00:48:51 +0000 Received: from localhost ([127.0.0.1]:39054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYhak-0002tX-Va for submit@debbugs.gnu.org; Thu, 28 Jun 2018 20:48:51 -0400 Received: from mail-qk0-f172.google.com ([209.85.220.172]:36817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYhTT-0002j3-Hx for 32000@debbugs.gnu.org; Thu, 28 Jun 2018 20:41:19 -0400 Received: by mail-qk0-f172.google.com with SMTP id a132-v6so4084091qkg.3 for <32000@debbugs.gnu.org>; Thu, 28 Jun 2018 17:41:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc:content-transfer-encoding; bh=ZRSv2WFGSKS8hRrhGb/BFOzNS73ZiAsKGDeC/8j0AJI=; b=lF/lOWrqu+C67UamkdjVizn9l1TMGq+Dm9GieZfMehDzwpYwzMxvXSCOHnrWbzX7Yn po2PlfcAlqQNPzU/XelhZ1ef6vYuvB0po6XSUkOd1Rm0S6C5YknzKJn+giBkXLCfpf6k E8TUXaUxIT9mZihbIEX2t91M0EOHyUF81kvYZ9UQAGQwVhSDBcCGV71hOgLpeKlL23o2 6UGghlwMjBsUjKldEatmYTpLlXmIN+XaC/dSCgbH9j7Sz6X/EHPhzAXdxM3LUy2s0XOD 0JtYmH0ZFiJd78xH7fO/Ql3T0UVg/3xCfv5PRE+K8tx+KedgI5MUEYExhNqPTlVcRz1+ wBEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc:content-transfer-encoding; bh=ZRSv2WFGSKS8hRrhGb/BFOzNS73ZiAsKGDeC/8j0AJI=; b=p8NzC8t4Ym3aCjs2V26xeAS/pxFW0LXYu3xxCvvRo17pRzCcpHxeYo7OaI8KFftLBf xLAmO3RUAE5zi2hxIuAZU5LQU0cX/QhGEFFFEEcBZt5zdjCIFJeymk5RIslKlpVknV0F wYdq1oVGQKZkMcrO+x2zpfWa23VdkcGTE2MhuNEliIXay7JbqOGQr8R3hkoyMKvrFAdR HyvF+AxoZV2R9ajOrQ3E1DzD3AjU+rVRfsWGiSrAb5ZWpOfKrxJk9ctiZ8FDNiAefIW1 4bV+uNjER56iUx2jrUCkrPqaFh3ljXVBPX6Yu7EVBSl2/TYFOH1xrLAveEHmFDlCC8/g dWDg== X-Gm-Message-State: APt69E3yim0Jt8f6mCn4jKivc4Jx07gYio10E81YGmyFd2wIwuuy0zkw 3edNLIC/h/Pt3LPnw7jj8o7EB/zG5KbvzN1Cntk= X-Google-Smtp-Source: AAOMgpdwRh5uNH4za32ZAQ9Jm4uOEAxjq5swCoKL4qk2ukbkoOfAX/Xr5n25RSkMH7FSzPDmhy7YCWVoUT7oRffFX8E= X-Received: by 2002:a37:4f85:: with SMTP id d127-v6mr11025470qkb.183.1530232873970; Thu, 28 Jun 2018 17:41:13 -0700 (PDT) Received: from 1058052472880 named unknown by gmailapi.google.com with HTTPREST; Thu, 28 Jun 2018 17:41:13 -0700 From: Brad Lindsay In-Reply-To: <87in62o59s.fsf@gmail.com> References: <87in62o59s.fsf@gmail.com> X-Mailer: Airmail (492) MIME-Version: 1.0 Date: Thu, 28 Jun 2018 17:41:13 -0700 Message-ID: Subject: Re: bug#32000: 26.1; Behavior of buffer-offer-save not lining up with documentation To: Noam Postavsky Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 32000 X-Mailman-Approved-At: Thu, 28 Jun 2018 20:48:50 -0400 Cc: 32000@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On June 28, 2018 at 6:33:38 PM, Noam Postavsky (npostavs@gmail.com) wrote: > Brad Lindsay writes: > > > I am trying to create a function that creates a new empty buffer that > > prompts you to save it when you kill it. Reading through the > > documentation, it looks like I need to set =E2=80=9Cbuffer-offer-save= =E2=80=9D to a > > non-nil value since the new buffer is not a file-visiting buffer. I > > have tried doing that, and verifying that the variable isn=E2=80=99t se= t and > > that the new buffer isn=E2=80=99t empty, but when I close (kill) the bu= ffer, I > > don=E2=80=99t get a prompt. > > buffer-offer-save is for killing Emacs or save-some-buffers, to catch > buffer killing use kill-buffer-query-functions. We could probably make > the docs a bit more explicit about this. > > Or maybe we should enhance buffer-offer-save to cover the buffer killing > case too, it seems a bit silly to require setting both. > I was successfully able to implement a=C2=A0kill-buffer-query-functions hook. Thanks for that pointer. I think it would be good to enhance buffer-offer-save to cover killing a buffer for any reason. Thanks, Brad From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 17:23:01 2019 Received: (at 32000) by debbugs.gnu.org; 12 Oct 2019 21:23:01 +0000 Received: from localhost ([127.0.0.1]:34350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJOqr-0004iU-Ch for submit@debbugs.gnu.org; Sat, 12 Oct 2019 17:23:01 -0400 Received: from quimby.gnus.org ([80.91.231.51]:40508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJOqp-0004iH-1o for 32000@debbugs.gnu.org; Sat, 12 Oct 2019 17:23:00 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJOqk-0000An-U8; Sat, 12 Oct 2019 23:22:57 +0200 From: Lars Ingebrigtsen To: Noam Postavsky Subject: Re: bug#32000: 26.1; Behavior of buffer-offer-save not lining up with documentation References: <87in62o59s.fsf@gmail.com> Date: Sat, 12 Oct 2019 23:22:54 +0200 In-Reply-To: <87in62o59s.fsf@gmail.com> (Noam Postavsky's message of "Thu, 28 Jun 2018 19:33:35 -0400") Message-ID: <87k199irpt.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Noam Postavsky writes: > Brad Lindsay writes: > >> I am trying to create a function that creates a new empty buffer that >> prompts you to save it when you kill it. Reading through the >> documentatio [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32000 Cc: 32000@debbugs.gnu.org, Brad Lindsay X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Noam Postavsky writes: > Brad Lindsay writes: > >> I am trying to create a function that creates a new empty buffer that >> prompts you to save it when you kill it. Reading through the >> documentation, it looks like I need to set =E2=80=9Cbuffer-offer-save=E2= =80=9D to a >> non-nil value since the new buffer is not a file-visiting buffer. I >> have tried doing that, and verifying that the variable isn=E2=80=99t set= and >> that the new buffer isn=E2=80=99t empty, but when I close (kill) the buf= fer, I >> don=E2=80=99t get a prompt. > > buffer-offer-save is for killing Emacs or save-some-buffers, to catch > buffer killing use kill-buffer-query-functions. We could probably make > the docs a bit more explicit about this. Looks like the doc string here was fixed a couple of days after this was reported, so I'm closing the bug report now. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 17:23:05 2019 Received: (at control) by debbugs.gnu.org; 12 Oct 2019 21:23:05 +0000 Received: from localhost ([127.0.0.1]:34354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJOqu-0004jL-Lt for submit@debbugs.gnu.org; Sat, 12 Oct 2019 17:23:04 -0400 Received: from quimby.gnus.org ([80.91.231.51]:40526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJOqt-0004j2-2O for control@debbugs.gnu.org; Sat, 12 Oct 2019 17:23:03 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJOqq-0000Ax-EQ for control@debbugs.gnu.org; Sat, 12 Oct 2019 23:23:02 +0200 Date: Sat, 12 Oct 2019 23:23:00 +0200 Message-Id: <87imotirpn.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #32000 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 32000 fixed close 32000 27.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 32000 fixed close 32000 27.1 quit From unknown Thu Jun 19 14:19:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 10 Nov 2019 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator