From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alin Soare Newsgroups: gmane.emacs.devel Subject: Re: Small problem with "unmark" in *Buffer List* Date: Wed, 30 Oct 2013 19:44:22 +0200 Message-ID: References: <13c9d7d0-7a2c-43f3-9ce6-0eb3a824c670@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bd75faa316b4304e9f8e227 X-Trace: ger.gmane.org 1383155072 20363 80.91.229.3 (30 Oct 2013 17:44:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Oct 2013 17:44:32 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 30 18:44:36 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VbZon-0008Pv-OM for ged-emacs-devel@m.gmane.org; Wed, 30 Oct 2013 18:44:33 +0100 Original-Received: from localhost ([::1]:53663 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbZon-0007lM-0L for ged-emacs-devel@m.gmane.org; Wed, 30 Oct 2013 13:44:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbZoj-0007lH-HD for emacs-devel@gnu.org; Wed, 30 Oct 2013 13:44:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbZoe-0005sy-6W for emacs-devel@gnu.org; Wed, 30 Oct 2013 13:44:29 -0400 Original-Received: from mail-pb0-x230.google.com ([2607:f8b0:400e:c01::230]:49501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbZod-0005rX-VT for emacs-devel@gnu.org; Wed, 30 Oct 2013 13:44:24 -0400 Original-Received: by mail-pb0-f48.google.com with SMTP id mc17so1702874pbc.35 for ; Wed, 30 Oct 2013 10:44:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=F51esFDS2lB7oeoFCfIYefoBh3Fi022CihPC8UpQd44=; b=Nqz3bEoKgszkcTH4DJMBMpUoxAFWzhJjIwEJ3wBehc87F0af8Kr2Bm3KxsighCQ/0S 0w+5cLBlWhfspx808stgDa0n7Dc/hKXeNm74pmxdN/qoNIc+OxxYYVpET3aoynyaTI9o SHuBLa8cEMBUk4GTJn5u6vHY4pLrk87QSHbEgCTchonTSWsMtd8zyz083hR/jTKvPWQk KvwqEt+Ljz6Q19dwBfsFyiQfeKdULmavqka5Cz0WdygrVXHDzYLFLGms1oz5MQAzS5Z4 1gFhxMAuYum2sE9Xdy9ULBG/mfgAX3xRYo0p3P0zydJ7a3/LZ4cK5Hh8zRmf797HyyNx QmOg== X-Received: by 10.68.198.68 with SMTP id ja4mr6509000pbc.24.1383155062890; Wed, 30 Oct 2013 10:44:22 -0700 (PDT) Original-Received: by 10.66.72.166 with HTTP; Wed, 30 Oct 2013 10:44:22 -0700 (PDT) In-Reply-To: <13c9d7d0-7a2c-43f3-9ce6-0eb3a824c670@default> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164708 Archived-At: --047d7bd75faa316b4304e9f8e227 Content-Type: text/plain; charset=UTF-8 As a 2-minute looking over the definition of buff-menu.el and over the definition of `19.5 Operating on Several Buffers`, I think I need to check whether the buffer was modified, and in case that it was, I insert '*' on the 3rd column, otherwise insert space. I remember this problem repeating for many years, but today it disturbed me again , and this is why I mailed. In fact, the patch of the function "Buffer-menu-unmark" will look something like: if "the 3rd column is S (from Save)" then (if (buffer-modified-p current-buffer-from-the-point) has-modified-flag-on then insert "*" else insert " ". This is the complete logic of the patch . Correct ? --047d7bd75faa316b4304e9f8e227 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
As a 2-minute looking over the definition of buff-menu.el = and over the definition of `19.5 Operating on Several Buffers`, I think I n= eed to check whether the buffer was modified, and in case that it was, I in= sert '*' on the 3rd column, otherwise insert space.

I remember this problem repeating for many years, but t= oday it disturbed me again , and this is why I mailed.

=
In fact, the patch of the function "Buffer-menu-unmark" will= look something like:

if "the 3rd column is S (from Save)" then
=C2=A0 =C2=A0 =C2=A0 (if (buffer-modified-p current-buffer-from-the-= point) has-modified-flag-on then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0insert "*" else
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0insert " ".
This is the complete logic of the patch . Correct ?
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0


=
--047d7bd75faa316b4304e9f8e227--