From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Brad Lindsay Newsgroups: gmane.emacs.bugs Subject: bug#32000: 26.1; Behavior of buffer-offer-save not lining up with documentation Date: Thu, 28 Jun 2018 15:56:59 -0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1530226806 24128 195.159.176.226 (28 Jun 2018 23:00:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 28 Jun 2018 23:00:06 +0000 (UTC) To: 32000@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 29 01:00:02 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYftQ-0006Aj-RC for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Jun 2018 01:00:01 +0200 Original-Received: from localhost ([::1]:39060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYfvY-0003e0-Bv for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Jun 2018 19:02:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYfvQ-0003dr-Kc for bug-gnu-emacs@gnu.org; Thu, 28 Jun 2018 19:02:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYfvP-0002Rl-9N for bug-gnu-emacs@gnu.org; Thu, 28 Jun 2018 19:02:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59344) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYfvP-0002RL-52 for bug-gnu-emacs@gnu.org; Thu, 28 Jun 2018 19:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fYfvO-0000Gm-Li for bug-gnu-emacs@gnu.org; Thu, 28 Jun 2018 19:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Brad Lindsay Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Jun 2018 23:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32000 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1530226881935 (code B ref -1); Thu, 28 Jun 2018 23:02:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Jun 2018 23:01:21 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) Original-Received: from 1058052472880 named unknown by gmailapi.google.com with HTTPREST; Thu, 28 Jun 2018 15:56:59 -0700 X-Mailer: Airmail (492) 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-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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:147929 Archived-At: 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))