From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: How do lisp gurus truncate? Date: Thu, 23 Jul 2009 08:32:56 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1248330813 24002 80.91.229.12 (23 Jul 2009 06:33:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Jul 2009 06:33:33 +0000 (UTC) To: emacs help Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 23 08:33:26 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MTrro-0001yO-Th for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Jul 2009 08:33:25 +0200 Original-Received: from localhost ([127.0.0.1]:60075 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTrro-0004EC-8G for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Jul 2009 02:33:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTrrS-0004Dl-BG for help-gnu-emacs@gnu.org; Thu, 23 Jul 2009 02:33:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTrrN-0004CN-B6 for help-gnu-emacs@gnu.org; Thu, 23 Jul 2009 02:33:01 -0400 Original-Received: from [199.232.76.173] (port=37506 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTrrN-0004CK-67 for help-gnu-emacs@gnu.org; Thu, 23 Jul 2009 02:32:57 -0400 Original-Received: from mail-yx0-f172.google.com ([209.85.210.172]:51352) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTrrM-0003qr-SM for help-gnu-emacs@gnu.org; Thu, 23 Jul 2009 02:32:56 -0400 Original-Received: by yxe2 with SMTP id 2so1326553yxe.14 for ; Wed, 22 Jul 2009 23:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=vNU53dJMaphQffr9NLRaD07AMmd7NAJNnV+UDyL00A8=; b=PYP2hmu/pL/LebjsjBWtbf1dVusB3//4mdfvs6EjaaxNPmCcOG6eSMNT8IDzBzjfQF U7ZhWiDuwV0C/inD+WhFJD+5a5wRpXy9MRHyVVf8V/3I3lB+Of4HjzPGPOVur1rMRkyP ZQMsxQNk+GY5FA63/QVqXN9OQR9AoSCtTfclc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=gjrJmK0raJ64I4v7OEm/4NyqZL+Lr3zzEBnVU8g3tk+9R9NDMBEQVkabWnyq14tuWK m+/TQOBm59mRhIdMtBzQIv3o/AdERIhXiV9mEPNGnAj4aDOWvt+KxqV5qNUbHPmB7dW+ 5Cz+ApB9tLYScfM5+CjeRUzadTF5caGAXO6qk= Original-Received: by 10.101.66.17 with SMTP id t17mr2427173ank.41.1248330776262; Wed, 22 Jul 2009 23:32:56 -0700 (PDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66348 Archived-At: I want to truncate an ordered list if the rest of the values are bigger than some limit. I just wrote some code like this one to do that, but there must be some more standard way of doing that, or? (when nxml-where-first-change-pos (setq nxml-where-path 'dummy nxml-where-path) (let ((path nxml-where-path)) (while (cdr path) (when (> (nth 1 (nth 1 path)) nxml-where-first-change-pos) (setcdr path nil)) (setq path (cdr path)))) (setq nxml-where-path (cdr nxml-where-path)))